{"id":17280147,"url":"https://github.com/akuli/3d-game-experiment","last_synced_at":"2026-01-21T16:01:41.556Z","repository":{"id":45222609,"uuid":"274479318","full_name":"Akuli/3d-game-experiment","owner":"Akuli","description":"My experiment at creating a 3D game without libraries for doing 3D stuff","archived":false,"fork":false,"pushed_at":"2024-07-23T18:31:21.000Z","size":3509,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T09:28:28.169Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","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/Akuli.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-23T18:25:48.000Z","updated_at":"2024-07-23T18:31:24.000Z","dependencies_parsed_at":"2024-12-19T18:41:53.462Z","dependency_job_id":null,"html_url":"https://github.com/Akuli/3d-game-experiment","commit_stats":null,"previous_names":[],"tags_count":45,"template":false,"template_full_name":null,"purl":"pkg:github/Akuli/3d-game-experiment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akuli%2F3d-game-experiment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akuli%2F3d-game-experiment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akuli%2F3d-game-experiment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akuli%2F3d-game-experiment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Akuli","download_url":"https://codeload.github.com/Akuli/3d-game-experiment/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akuli%2F3d-game-experiment/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28635926,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T15:01:31.228Z","status":"ssl_error","status_checked_at":"2026-01-21T14:42:58.942Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-10-15T09:19:34.824Z","updated_at":"2026-01-21T16:01:41.467Z","avatar_url":"https://github.com/Akuli.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 3D game experiment\n\nThis is a dual-player 3D game with no libraries used for drawing the 3D stuff.\n\n![screenshot](screenshot.png)\n\n\n## Setup\n\nIf you are on Windows, you can download this game by clicking \"Releases\" on GitHub.\nUnzip it and run `build\\game.exe`.\n\nTo develop this game, you need some other operating system other than Windows. Run these commands:\n\n```\n$ sudo apt install git gcc make libsdl2-dev libsdl2-mixer-dev libsdl2-ttf-dev\n$ git clone https://github.com/Akuli/3d-game-experiment\n$ cd 3d-game-experiment\n$ git submodule init\n$ git submodule update\n$ make -j2 \u0026\u0026 ./game\n```\n\nI don't know what you should do if you don't have `apt`.\n\n## Key Bindings\n\nIn the game:\n- Moving around and flattening: right player uses arrow keys, left player uses W, A, S and D imagining that they are arrow keys.\n- Dropping guards behind: left player uses F, right player uses zero.\n  If there's no zero key next to the arrow keys on your keyboard, then\n  please [let me know](https://github.com/Akuli/3d-game-experiment/issues/new)\n  which key would be more convenient for you.\n\nIn the player and map choosing screen, you can click the buttons or press these keys:\n- Player chooser: right player uses left and right arrow keys, left player users A and D.\n- Map chooser: up and down arrow keys, or W and S. The purpose is that both players can use the map chooser.\n    - Edit: click button or press E\n    - Delete: click button or press the Delete key\n    - Copy: click button or press C\n    - Moving map (default maps can't be moved): Shift + arrow keys, Shift + W, Shift + S, drag and drop\n- Play button: enter or space\n- Quit button: Escape\n\nIn the game over screen, you can again click buttons or press these keys:\n- Play again button: F5. This is for compatibility with games where you can play again by refreshing the browser window.\n- Player and map chooser button: enter or space.\n\nMap editor:\n- Selection: arrow keys\n- Wall mode: W\n- Enemy mode: E\n- Jumper mode: J\n- Remove selected wall, enemy or jumper: Delete key or right-click\n- Move wall, enemy or jumper, or resize the place: drag and drop, or arrow keys while enter pressed\n- Rename place: press F2 or click the name\n- Done renaming: press Enter or click something else than the name\n- Done editing: Escape\n\nMap editor's delete confirming dialog:\n- Yes: Y\n- No: N or Escape\n\n\n## Broken Things\n\n- With low enough fps and high enough player speed, it's possible to run\n  through a wall. This happens when the player can get to the other side\n  of the wall before the each-frame-running collision check. Current\n  workaround is to not make the players go so fast that this would\n  happen at 30fps. (Yes, I know that 30fps is really slow for any gamer)\n\n\n## Feature Ideas\n\n- spinning game over display\n- stereo sound: if left player jumps then jump sound (mostly?) to left speaker\n- network multiplayer lol?\n- A player that looks exactly like an enemy\n\n\n## Conventions in this project\n\n- To avoid a global variable, it's fine to do this...\n\n    ```c\n    struct Foo *get_foos()\n    {\n        static struct Foo res[N_FOOS];\n        static bool ready = false;\n        if (ready)\n            return res;\n\n        for (int i = 0; i \u003c N_FOOS; i++)\n            res[i] = create_foo();\n        ready = true;\n        return res;\n    }\n    ```\n\n    ...except when that takes a long time on startup. In that case, I use a\n    global variable instead. This isn't as bad as you might think because:\n    - As opposed to lazy-loading everything, I can display meaningful\n      \"Loading bla...\" texts while the game starts.\n    - I don't need to pass around a lot of variables everywhere.\n    - All global variables are intended to be immutable, and there should be no\n      mutable global state to cause problems.\n\n- My coding style is linux-kernel-ish, but I'm not at all nit-picky about it.\n  Contributions are welcome, although I usually don't get many, especially in\n  projects written in C.\n\n\n## Windows Build\n\nGitHub Actions builds a Windows `.exe` file of this game when pushing to master.\nSee the config files in `.github/workflows/` and use `make clean` generously\nif you need to do it without GitHub Actions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakuli%2F3d-game-experiment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakuli%2F3d-game-experiment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakuli%2F3d-game-experiment/lists"}