Sign in
EN

JumPHP, the PHP game engine for retro 2D games

Write your game in PHP once: it runs in a window on Windows, macOS and Linux, and in the browser, on computers and phones alike. Free and open source (MIT license).

What is JumPHP?

JumPHP is a framework for writing retro 2D games in PHP. On the desktop, the game runs on PHP 8.5 with the SDL2, OpenGL and OpenAL extensions: a real window, sound, gamepads. In the browser, the same PHP 8.5 and the same extensions are compiled to WebAssembly: OpenGL becomes WebGL, OpenAL becomes Web Audio, and the game is a plain static web page.

Everything (PHP, Composer, Emscripten, web server, tests) runs in Docker, behind a single command: bin/jumphp.

What the engine provides

  • Scenes, entities, animated sprites, a camera and ready-made menus.
  • Tile maps (Tiled editor or rows of text), collisions with slopes and one-way platforms.
  • Keyboard, gamepad, mouse and touch controls, described in a file of actions.
  • Generated or loaded sounds (wav, ogg, mp3), music and positional sound.
  • 3D and post-processing with OpenGL / WebGL, below or above the 2D.
  • Online multiplayer through a relay server, HTTP requests, saves, translations.
  • Heavy work in threads or Web Workers, without ever blocking the frame.
  • Tests that really play the game, and screenshots without a screen.

What you can make with it

Platformers, arcade, shooting or racing games, remakes of 8-bit games from their original Amstrad CPC disk, and also desktop applications (HTML pages and PHP, with Tauri), graphic applications without HTML and command-line programs.

A finished game becomes a web page, a single executable for Linux and Windows, an installer, an Android or Apple app, or is published on this playground.

Get started

composer create-project jumphp/jumphp my-games
cd my-games
bin/jumphp new breakout "BREAKOUT"
bin/jumphp install breakout
bin/jumphp run breakout

The new game is a small but complete platformer (menu, level, player, coins) to turn into yours; bin/jumphp build makes it a web page. From then on Docker is enough: PHP, Composer and Emscripten run in its containers.

Or describe your game in the studio: your Claude writes it with JumPHP and publishes it here. Create a game →

Going further

Frequently asked questions

Is JumPHP free?

Yes. JumPHP is open source under the MIT license, and the jumphp.net playground is free, to play as well as to publish.

Do I need to install PHP to make a game?

No. Everything runs in Docker behind the bin/jumphp command: PHP 8.5, Composer, Emscripten and the tests. Players only need a browser, or the game's executable.

Does the same code work on the desktop and in the browser?

Yes: the browser runs the same PHP 8.5 and the same extensions, compiled to WebAssembly. A few rules are enough: never block the frame, and go through the engine for the network and files.

Can I use Composer packages?

Yes, as long as they are written in pure PHP: no extra PHP extension exists in the browser.