Skip to content

This is template for running raylib games and building them for web using emscripten

Notifications You must be signed in to change notification settings

Talandar99/raylib_game_template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

# 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     

Scripts

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

Getting dependencies

before building anything remember to get needed libraries

make deps                     # Download necessary dependencies and run setup_raylib_platform

Dekstop build

  • change RAYLIB_SETUP_PLATFORM to “DESKTOP” in config on top of Makefile
  • setup for desktop
make setup_raylib_platform    # Setup raylib for the selected platform
  • create build
make build                    # Build the project based on the selected platform
  • or just run game
make desktop_run              # Build and run desktop version

Web build

  • change RAYLIB_SETUP_PLATFORM to “WEB” in config on top of Makefile
  • setup for web
make setup_raylib_platform    # Setup raylib for the selected platform
  • create web build
make build                    # Build the project based on the selected platform
  • You can start web server with python
make web_run                  # Build and run web version with HTTP server

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)

Releases

No releases published

Packages

No packages published