Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/talandar99/raylib_game_template
This is template for running raylib games and building them for web using emscripten
https://github.com/talandar99/raylib_game_template
c emscripten emsdk example game-development raygui raylib raylib-c template wasm web-assembly
Last synced: 28 days ago
JSON representation
This is template for running raylib games and building them for web using emscripten
- Host: GitHub
- URL: https://github.com/talandar99/raylib_game_template
- Owner: Talandar99
- Created: 2024-01-23T08:38:53.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-11-29T21:09:02.000Z (about 1 month ago)
- Last Synced: 2024-11-29T21:29:57.383Z (about 1 month ago)
- Topics: c, emscripten, emsdk, example, game-development, raygui, raylib, raylib-c, template, wasm, web-assembly
- Language: Shell
- Homepage:
- Size: 9.77 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
README
* raylib_game_template
This is template for running raylib games and building them for web using emscripten or desktop** Configuration
edit variables on top of Makefile before running command
#+begin_src bash
# pick platform "WEB" or "DESKTOP"
RAYLIB_SETUP_PLATFORM="DESKTOP"
# set to true or false based on preferences
# RAYGUI raygui is immediate-mode-gui library.
RAYLIB_USE_RAYGUI=true
# RPNG is library to load/save png images and manage png chunks.
RAYLIB_USE_RPNG=false
# raudio is audio library based on miniaudio.
RAYLIB_USE_RAUDIO=false
# rres is file-format to package resources
RAYLIB_USE_RRES=false
# NBNET is library designed to implement client-server architecture
RAYLIB_USE_NBNET=false
#+end_src
** Scripts
#+begin_src bash
make help # Show this help message
make deps # Download necessary dependencies and run setup_raylib_platform
make setup_raylib_platform # Setup raylib for the selected platform
make build # Build the project based on the selected platform
make web_run # Build and run web version with HTTP server
make desktop_run # Build and run desktop version
make clean # Clean the build and dependencies
#+end_src
** Getting dependencies
before building anything remember to get needed libraries
#+begin_src bash
make deps # Download necessary dependencies and run setup_raylib_platform
#+end_src** Dekstop build
- change RAYLIB_SETUP_PLATFORM to "DESKTOP" in config on top of Makefile
- setup for desktop
#+begin_src bash
make setup_raylib_platform # Setup raylib for the selected platform
#+end_src
- create build
#+begin_src bash
make build # Build the project based on the selected platform
#+end_src
- or just run game
#+begin_src bash
make desktop_run # Build and run desktop version
#+end_src
** Web build
- change RAYLIB_SETUP_PLATFORM to "WEB" in config on top of Makefile
- setup for web
#+begin_src bash
make setup_raylib_platform # Setup raylib for the selected platform
#+end_src
- create web build
#+begin_src bash
make build # Build the project based on the selected platform
#+end_src
- You can start web server with python
#+begin_src bash
make web_run # Build and run web version with HTTP server
#+end_src
- go to this address: http://0.0.0.0:8000/main.html
** Dependancies
- gcc with all libraries (needed to build code)
- make (needed in build)
- git (needed to pull dependancies)
- bash (needed in order to run bash scripts)
- python3 (for running server)
- LINUX based operating system (untested on other)