GithubHelp home page GithubHelp logo

itsyakub / raylibgametemplate Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 23 KB

This is the general-purpose raylib project template in C++.

License: MIT License

CMake 60.28% C++ 39.72%
game game-development gamedev madewithraylib raylib raylib-game template template-project template-repository

raylibgametemplate's Introduction

Raylib Game Template ๐ŸŽฎ

Overview:

This is the general-purpose raylib project template in C++.

Prerequesites:

Setup

1. Build For Desktop:

  • Pull all the necessary submodules:
git submodule update --init
  • Create a binary diretory:
mkdir bin
cd bin
  • Use the following command:
cmake ..

2. Build For WEB:

  • Pull all the necessary submodules:
git submodule update --init
  • Go to the emscripten submodule:
cd lib/emsdk
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
cd ../..
  • Create a binary diretory:
mkdir bin
cd bin
  • Use the following commands:
emcmake cmake .. -DPLATFORM=Web
emmake make

(WARNING: if those commands returns an error, make sure that your project is set correctly: directory relations are correct, path to the shell file is correct, path to the resources is correct, resources directory exists etc.)

  • To test your final executable (*.html, *.json, *.wasm, *.data, *.mem) you can use the following command:
emrun ./{game_title}.html

NOTE: This CMake workflow is managed from the position of the binary directory; if you want to use CMake from the main project's directory, modify the CMake file respectively (mainly: --shell-file and --preload-file).

Credits

Licence

This template is originally under the MIT Licence, but you can modify it to suite your needs. You can use licenses/license-templates to get the free licence template.

raylibgametemplate's People

Contributors

itsyakub avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.