Simple KPHP game, a proof of concept thing

Overview

KPHP Game

preview

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, fireball
  • W - use second spell, ice shards
  • E - use third spell, thunder
  • arrows (left, right, up, down) - move
  • Esc - exit game
  • y (when asked) - accept
  • n (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.

You might also like...
A game-mode for Minecraft: Bedrock Edition

HardCoreFactions This is an unpaid commission that was only released for educational purposes, consider using it as a reference rather than having it

Rules to detect game engines and other technologies based on Steam depot file lists

SteamDB File Detection Rule Sets This is a set of scripts that are used by SteamDB to make educated guesses about the engine(s) & technology used to b

Encuentra_Al_Puffle-Game Es un juego sencillo, lo cuál desarrollé a modo de práctica y por gusto
Encuentra_Al_Puffle-Game Es un juego sencillo, lo cuál desarrollé a modo de práctica y por gusto

Encuentra_Al_Puffle-Game Es un juego sencillo, lo cuál desarrollé a modo de práctica y por gusto. Tomando como referencia a los puffles (frailecillos)

Steam store auto add to cart game

Steam store auto add to cart game use it for steam trading card farm How does it work? link.php explode and find link from link.txt and next open all

🚀 An open source multiplayer space strategy game.
🚀 An open source multiplayer space strategy game.

Badges Introduction The game story takes place in a virtual galaxy where randomly generated planets produce various raw materials which can be used by

A console noughts and crosses game written in php

Tic-tac-toe A console noughts and crosses game written in php To play, simply clone the file Navigate to the file directory on your terminal and run t

Web typing game

Welcome in Typing Game by Cards™ Introduction This game consist of typing 5 french expressions, the fatest you can ! Get Started Clone the repository

SpawnInLobby Pocketmine-MP plugin. With this plugin the player will always join the game at the default world spawn point

SpawnInLobby Pocketmine-MP plugin. With this plugin the player will always join the game at the default world spawn point

Game of life developed in PHP with TDD approach

What is Game of Life: https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life Project structure: Engine is in App\Services\LifeEngine.php Tests are in T

Comments
  • fix assets path not valid

    fix assets path not valid

    Hello.

    kphp-ffi is awesome. when i run the game in my pc, i have problem with the assets path. then i fixed the assets path problem using $_ENV['KPHP_GAME_ASSETS_PATH'].

    opened by zjsxwc 0
Releases(v0.1.0)
Owner
Iskander (Alex) Sharipov
Iskander (Alex) Sharipov
Proof of concept for a WordPress plugin check tool.

Plugin Check Proof of concept for a WordPress plugin check tool. For now, this is limited to WP-CLI usage. Eventually, the real plugin checker should

Felix Arntz 10 Sep 27, 2022
CVE-2022-29221 Proof of Concept Code

CVE-2022-29221-PoC This is a very basic Smarty sceleton app with a single template that shows the Proof of Concept code for CVE-2022-29221. Injection

S Bani 12 Nov 4, 2022
KLua is a FFI-based Lua5 library that can be used in both PHP and KPHP

KLua KLua is a FFI-based Lua5 library that can be used in both PHP and KPHP. Installation Since this is a FFI library, it needs a dynamic library avai

Iskander (Alex) Sharipov 7 Nov 4, 2022
Simple game server with php without socket programming. Uses the Api request post(json).

QMA server Simple game server with php without socket programming. Uses the Api request post(json). What does this code do? Register the user as a gue

reza malekpour 3 Sep 4, 2021
A simple but scalable FFA Practice Core featuring one Game Mode & Vasar PvP aspects.

A simple but scalable FFA Practice Core featuring one Game Mode & Vasar PvP aspects. An example of this Plugin can be found in-game at ganja.bet:19132!

null 6 Dec 7, 2022
Moodle plugin to limit the access to course content according to the user level in Block Game.

Moodle plugin to limit the access to course content according to the user level in Block Game.

null 4 Oct 18, 2022
A useful PocketMine-MP plugin that allows you to create crates in-game!

ComplexCrates A useful PocketMine-MP plugin that allows you to create crates in-game! Commands Main command: /crate Sub commands: create

Oğuzhan 8 Aug 26, 2021
Game Boy Camera Wifi Photo Extractor

Game Boy Camera Fast Wifi Adapter Plug in your Game Boy Camera, turn it on, and you can have the photos on your phone in under 2 minutes! Why I Made I

Matt G 71 Dec 16, 2022
The game is implemented as an example of scalable and high load architecture combined with modern software development practices

Crossword game The game is implemented as an example of scalable and high load architecture combined with modern software development practices Exampl

Roman 56 Oct 27, 2022
This plugin adds custom pets to game for PocketMine-MP!

ComplexPets A plugin that adds pets to game made by OguzhanUmutlu for PocketMine-MP. Command Simply type /pets and summon your favorite animal! Featur

Oğuzhan 10 Aug 12, 2021