summaryrefslogtreecommitdiffhomepage
path: root/templates/simple_game
diff options
context:
space:
mode:
authorRay <[email protected]>2020-02-06 16:56:01 +0100
committerRay <[email protected]>2020-02-06 16:56:01 +0100
commit4b4f052fea4f21a43c1eadadd9afa496066b6881 (patch)
tree945f5e9587143f341653605797e9ecc396c8b909 /templates/simple_game
parent2de92e3c07151a96ebc6bc948d62d61df73d77bd (diff)
downloadraylib-4b4f052fea4f21a43c1eadadd9afa496066b6881.tar.gz
raylib-4b4f052fea4f21a43c1eadadd9afa496066b6881.zip
Review game templates
Diffstat (limited to 'templates/simple_game')
-rw-r--r--templates/simple_game/Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/templates/simple_game/Makefile b/templates/simple_game/Makefile
index cc1d1e42..04345a99 100644
--- a/templates/simple_game/Makefile
+++ b/templates/simple_game/Makefile
@@ -25,8 +25,8 @@
# Define required raylib variables
PROJECT_NAME ?= simple_game
-RAYLIB_VERSION ?= 2.5.0
-RAYLIB_API_VERSION ?= 2
+RAYLIB_VERSION ?= 3.0.0
+RAYLIB_API_VERSION ?= 3
RAYLIB_PATH ?= ../..
# Define default options
@@ -164,7 +164,7 @@ ifeq ($(PLATFORM),PLATFORM_RPI)
endif
ifeq ($(PLATFORM),PLATFORM_WEB)
# HTML5 emscripten compiler
- # WARNING: To compile to HTML5, code must be redesigned
+ # WARNING: To compile to HTML5, code must be redesigned
# to use emscripten.h and emscripten_set_main_loop()
CC = emcc
endif
@@ -240,6 +240,11 @@ ifeq ($(PLATFORM),PLATFORM_WEB)
# --preload-file resources # specify a resources folder for data compilation
CFLAGS += -s USE_GLFW=3 -s TOTAL_MEMORY=16777216 -s EMTERPRETIFY=1 -s EMTERPRETIFY_ASYNC=1
+ # NOTE: Simple raylib examples are compiled to be interpreter by emterpreter, that way,
+ # we can compile same code for ALL platforms with no change required, but, working on bigger
+ # projects, code needs to be refactored to avoid a blocking while() loop, moving Update and Draw
+ # logic to a self contained function: UpdateDrawFrame(), check core_basic_window_web.c for reference.
+
# Define a custom shell .html and output extension
CFLAGS += --shell-file $(RAYLIB_PATH)/src/shell.html
EXT = .html