{"id":13792272,"url":"https://github.com/quasilyte/kphp-game","last_synced_at":"2025-03-19T10:30:54.076Z","repository":{"id":45939596,"uuid":"411978153","full_name":"quasilyte/kphp-game","owner":"quasilyte","description":"Simple KPHP game, a proof of concept thing (demo)","archived":false,"fork":false,"pushed_at":"2021-11-27T01:17:30.000Z","size":16544,"stargazers_count":26,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T06:11:26.201Z","etag":null,"topics":["ffi","game","hackathon","kphp","kphp-ffi","php","sdl"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quasilyte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-30T08:10:23.000Z","updated_at":"2024-02-29T09:55:25.000Z","dependencies_parsed_at":"2022-08-28T14:20:28.661Z","dependency_job_id":null,"html_url":"https://github.com/quasilyte/kphp-game","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quasilyte%2Fkphp-game","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quasilyte%2Fkphp-game/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quasilyte%2Fkphp-game/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quasilyte%2Fkphp-game/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quasilyte","download_url":"https://codeload.github.com/quasilyte/kphp-game/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244407773,"owners_count":20447846,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ffi","game","hackathon","kphp","kphp-ffi","php","sdl"],"created_at":"2024-08-03T22:01:10.458Z","updated_at":"2025-03-19T10:30:53.616Z","avatar_url":"https://github.com/quasilyte.png","language":"PHP","funding_links":[],"categories":["Table of Contents"],"sub_categories":["Games"],"readme":"## KPHP Game\n\n![preview](readme_pic.jpg)\n\n## About\n\nThis is a game written in PHP using [kphp-sdlite](https://packagist.org/packages/quasilyte/kphp-sdlite) library.\n\nGameplay video: https://www.youtube.com/watch?v=L44l4Tqm4Fc\n\nThis game features:\n\n* Audio processing (music, sound effects)\n* Animations (spell effects)\n* Text rendering and UI components\n* Event polling (keyboard controls)\n\nIt's a showcase that KPHP can be used to build applications like this.\n\nNote that this game is written in 1 day during a hackathon.\nThe code quality may be lacking.\n\n## Building a game\n\nOur build scripts expect a symlink to an appropriate kphp2cpp in the root of the project.\n\nExample layout:\n\n```\nkphp-game/\n  kphp2cpp \u003c- this is a symlink you need to provide\n  scripts/...\n  src/...\n```\n\n```bash\n# If successfull, game binary can be found at ./bin/game\n$ make game\n```\n\nTested on:\n\n* Ubuntu (amd64 platform)\n* Mac OS (amd64 platform)\n\n## Running with PHP\n\n```bash\n$ make run-with-php\n```\n\n## Playing the game\n\nControls:\n\n* `Q` - use first spell, **fireball**\n* `W` - use second spell, **ice shards**\n* `E` - use third spell, **thunder**\n* arrows (left, right, up, down) - move\n* `Esc` - exit game\n* `y` (when asked) - accept\n* `n` (when asked) - decline\n\n## Credits / Attribution\n\n* Tiles: https://opengameart.org/content/lots-of-free-2d-tiles-and-sprites-by-hyptosis (Hyptosis and Zabin)\n* Units: https://pipoya.itch.io/pipoya-free-rpg-character-sprites-32x32 (Pipoya)\n* Special effects: https://ppeldo.itch.io/2d-pixel-art-game-spellmagic-fx (Ppeldo)\n* Background music: https://www.fesliyanstudios.com/royalty-free-music/download/land-of-fantasy/3\n\nAll assets keep their original copyright and can't be considered to be MIT-licensed.\n\nThe authors of this game have no copyrights of these assets. The game (code from this repository) is provided as a demonstration and is not a commercial product.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquasilyte%2Fkphp-game","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquasilyte%2Fkphp-game","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquasilyte%2Fkphp-game/lists"}