mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-25 10:22:33 -05:00
examples/core/core_basic_window_web.c was removed on commit c17f82a so I relinked the github file page to old version.
@ -173,7 +173,7 @@ The main reason to avoid the standard game `while()` loop is related to the way
|
||||
|
||||
To avoid the loop, code must be **slightly adapted**. Basically it implies moving all your `Update` and `Draw` code to an external function, possibly called `UpdateDrawFrame()`, and consequently manage all required variables from a global context.
|
||||
|
||||
For a simple example on code refactoring for web, check [`core_basic_window_web.c`](https://github.com/raysan5/raylib/blob/master/examples/core/core_basic_window_web.c) example. For a more complex example, just check [`raylib-game-template`](https://github.com/raysan5/raylib-game-template), game template includes an already configured `Makefile` ready to compile it for web.
|
||||
For a simple example on code refactoring for web, check [`core_basic_window_web.c`](https://github.com/raysan5/raylib/blob/d97e0a8ac7ac150585e697344bf625e1583fe91c/examples/core/core_basic_window_web.c) example. For a more complex example, just check [`raylib-game-template`](https://github.com/raysan5/raylib-game-template), game template includes an already configured `Makefile` ready to compile it for web.
|
||||
|
||||
Avoiding the game `while()` loop will give better control of the program to the browser and it will run at full speed in the web.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user