# SAPIENS — PHP port*Il y a cent mille ans… / A hundred thousand years ago…***SAPIENS** is the prehistoric adventure game by **Didier & Olivier Guillion** (1986: Thomson, AmstradCPC, PC; 1987: Atari ST; 1996: MacOS / Windows; freeware in 2017). In 2018 Myriad published its Csources under the **GNU GPL v3**. This repository is a faithful port of those sources to **PHP**, onthe [JumPHP](https://github.com/davidnurdin/jumPhp) framework: the same code runs on the desktop(PHP + SDL2) and in the browser (PHP compiled to WebAssembly), on computers and phones.Play online: see the game site (link in the GitHub description).## Le jeuYou are Torgan, a young hunter of the *Pieds-Agiles* tribe. Explore the valley in first-person view,survive hunger, thirst and fatigue, hunt, knap flint to make weapons, talk and trade with the othertribes (Yeux-Malins, Bras-de-Roc, Hyènes-Folles), fight in side view, and complete the quests of yourchief Hognor… until the law of strength names the new chief.## Run it```bashgit clone https://github.com/davidnurdin/jumPhpgit clone https://github.com/davidnurdin/sapiensPhp jumPhp/games/sapienscd jumPhpbin/jumphp install sapiensbin/jumphp run sapiens # desktop window (Docker, X11 / Wayland)bin/jumphp engine:build # once: the WebAssembly enginebin/jumphp build sapiens # browser build in games/sapiens/dist/webbin/jumphp serve sapiens # http://localhost:8080```## Controls| | Computer | Phone ||---|---|---|| Menus (bottom of the screen) | mouse | tap || Landscape: turn / speed | arrows | joystick || Landscape: map | Space | CARTE || Side view: walk / crouch | arrows | joystick || Side view: strike / change weapon | Space / Return (or right click) | FRAPPER / ARME || Leave the view | Escape or click | SORTIR || Second player | numeric keypad (8 2 4 6, 1 strike, 3 weapon) | |## How the port worksSee [AGENTS.md](AGENTS.md): one PHP trait per C file with the C function names, an 8-bit 640x400offscreen like the original Mac version, the original sprites (`.BRT`), sounds and texts read as theyare. The original files of the 2018 archive that were converted are in `assets/` (see `tools/`).## Credits & license- SAPIENS © Didier & Olivier Guillion — Myriad, 1986-2017. Music by Gilles Soulet (1986), rendered with the instruments of the original `.mux` files.- Sources and data: GNU GPL v3 (Myriad, 3 April 2018): <https://www.myriad-online.com/fr/products/sapiensopensource.htm>. This port: GNU GPL v3, see [LICENSE](LICENSE).