Commit ab49be23 authored by guillaume's avatar guillaume

init Raylib Project

parent 0bdc2bc3
build
raylib
\ No newline at end of file
cmake_minimum_required(VERSION 3.10)
project(networld LANGUAGES C)
# Activate C99 standard:
SET(CMAKE_C_FLAGS "-std=c99 -Wall -Wextra" )
# RayLib:
find_package(raylib 2.0 REQUIRED)
# project configuration :
include_directories(${PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/src)
add_executable(nw-test src/test.c)
#set(raylib_VERBOSE 1)
target_link_libraries(nw-test raylib)
# NetWorld - Game Engine for IAs competition # NetWorld - Game Engine for IAs competition
## Installation sour linux (Ubuntu):
**recomandé...**
Installer gcc, CMake et git:
Dans un terminal:
```bash
sudo apt update
sudo apt install gcc CMake
```
Installer Raylib sous linux [[cf. raylib-wiki](https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux)] en suivant le 'Build raylib using CMake':
```bash
git clone https://github.com/raysan5/raylib.git raylib
cd raylib
mkdir build && cd build
cmake -DSHARED=ON -DSTATIC=ON ..
make
make install
cd ..
```
First test of RayLib:
```bash
gcc -o nw-test src/test.c -lraylib -lGL -lm -lpthread -ldl -lrt -lX11
./nw-test
```
With CMake:
```bash
mkdir build
cd build
cmake ..
make
./nw-test
```
## Idée de jeux induit:
## Optimisation de routage dynamique (Pb. réseaux)
Générer des robots et les déplacer pour couvrir au mieux un réseaux.
- être résiliant aux pannes
- Réseau en constance augmentation
- Circonscrire les Zones defectueuse....
## WarBot
/*******************************************************************************************
*
* raylib [core] example - Basic window
*
* Welcome to raylib!
*
* To test examples in Notepad++, provided with default raylib installer package,
* just press F6 and run [raylib_compile_execute] script, it will compile and execute.
* Note that compiled executable is placed in the same folder as .c file
*
* You can find all basic examples on [C:\raylib\raylib\examples] directory and
* raylib official webpage: [www.raylib.com]
*
* Enjoy using raylib. :)
*
* This example has been created using raylib 1.0 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
*
* Copyright (c) 2013-2020 Ramon Santamaria (@raysan5)
*
********************************************************************************************/
#include "raylib.h"
int main(void)
{
// Initialization
//--------------------------------------------------------------------------------------
const int screenWidth = 800;
const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window");
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//----------------------------------------------------------------------------------
// TODO: Update your variables here
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment