// TODO : onfocus on wasm ? (pause game) require ('/src/src/vendor/autoload.php'); // utilise setTimeout function sdl_update_events($app) { // maximum speed (we stop sdl) ! // $app->game->disableSdl = true ; $app->game->gameLoop->start(1); // $app->game->disableSdl = false ; } // utilise animatedRequest function sdl_frame($app) { if ($app->game->sdl->renderer->getRenderer() == null) return ; //$app->game->disableSdl = false ; $app->game->gameLoop->start(1); } $app = include ('/src/src/app.php');
Array Keys , => Camera control : 2 8 6 4 and 5 to recenter , F3 F4 change level ! (dont touch other) Source here :
https://github.com/davidnurdin/php-wasm-sdl/
And here :
Sonic game php source