KPHP Game
About
This is a game written in PHP using kphp-sdlite library.
Gameplay video: https://www.youtube.com/watch?v=L44l4Tqm4Fc
This game features:
- Audio processing (music, sound effects)
- Animations (spell effects)
- Text rendering and UI components
- Event polling (keyboard controls)
It's a showcase that KPHP can be used to build applications like this.
Note that this game is written in 1 day during a hackathon. The code quality may be lacking.
Building a game
You will need a KPHP that supports FFI. If Pull295 is not merged yet, you'll need to build a kphp2cpp from that branch.
Our build scripts expect a symlink to an appropriate kphp2cpp in the root of the project.
Example layout:
kphp-game/
kphp2cpp <- this is a symlink you need to provide
scripts/...
src/...
# If successfull, game binary can be found at ./bin/game
$ make game
Tested on:
- Ubuntu (amd64 platform)
- Mac OS (amd64 platform)
Running with PHP
$ make run-with-php
Playing the game
Controls:
Q
- use first spell, fireballW
- use second spell, ice shardsE
- use third spell, thunder- arrows (left, right, up, down) - move
Esc
- exit gamey
(when asked) - acceptn
(when asked) - decline
Credits
This game uses some sounds and artworks from existing video games.
All assets keep their original copyright and can't be considered to be MIT-licensed.
The authors of this game have no copyrights of these assets.