{"id":27720622,"url":"https://github.com/mahdialmusaad/badcraft","last_synced_at":"2025-07-27T20:05:20.071Z","repository":{"id":288154343,"uuid":"966992924","full_name":"mahdialmusaad/badcraft","owner":"mahdialmusaad","description":"A voxel game built to be performant, memory-efficient and cross compatible.","archived":false,"fork":false,"pushed_at":"2025-04-26T07:44:37.000Z","size":11854,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-27T09:58:40.302Z","etag":null,"topics":["cpp","minecraft","opengl"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mahdialmusaad.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,"zenodo":null}},"created_at":"2025-04-15T19:00:31.000Z","updated_at":"2025-04-26T07:44:35.000Z","dependencies_parsed_at":"2025-04-23T19:43:17.340Z","dependency_job_id":null,"html_url":"https://github.com/mahdialmusaad/badcraft","commit_stats":null,"previous_names":["mahdialmusaad/badcraft"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahdialmusaad%2Fbadcraft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahdialmusaad%2Fbadcraft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahdialmusaad%2Fbadcraft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahdialmusaad%2Fbadcraft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mahdialmusaad","download_url":"https://codeload.github.com/mahdialmusaad/badcraft/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251119576,"owners_count":21539194,"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":["cpp","minecraft","opengl"],"created_at":"2025-04-27T09:58:57.928Z","updated_at":"2025-07-27T20:05:20.064Z","avatar_url":"https://github.com/mahdialmusaad.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Overview\nA voxel game built for performance and efficiency.\n\n\u003cimg width=48% src=\"markdown/main_day.png\"/\u003e \u003cimg width=48% src=\"markdown/main_night.png\"\u003e\n\u003cbr\u003e\n\u003csup\u003eIn-game screenshots during the day and night\u003c/sup\u003e\n\n## Features\nThis game offers a wide variety of features to create a vast gameplay experience while allowing for new features to be trivially added.\n\nExamples include:\n- **64-bit** generation to allow worlds to span _trillions_ of blocks\n- [Dynamic skybox](src/World/Sky.cpp) with clouds, stars and the sun and moon\n- Custom [text rendering system](src/Rendering/TextRenderer.cpp) that supports different colours, sizes and other features\n- Chatting and [commands](tab=readme-ov-file#commands)\n\n## Goal\nThe purpose of this game is to achieve extreme performance using OpenGL in C++ while still offering many features and possibly serving as inspiration for others attempting to create 3D software using graphics libraries.\n\n### Possible additions\nThere are still many things that could be improved about the game. The most likely additions include:\n- Main menu with world select and saving\n- Biomes and more varied terrain (caves, structures, etc)\n- Controller support\n- Player model\n- Lighting\n\n## Commands\nCommands have been [implemented](src/Application/Application.hpp) in a way that makes creating new ones extremely trivial. The defaults allow for easy exploration and manipulation of the game and the world.\n\n### Syntax\nTo write a command, use the chat with a forward slash as the first character, immediately followed by the command name and then any (or no) arguments seperated with spaces: \n\n`/name arg1 arg2...`\n\nA message written with the first character as anything else will be treated as a chat message otherwise.\n\nAny command argument marked with an **asterik (*)** is optional. If the command has only one argument and it is optional, entering the command _without_ any arguments acts as a query for the value it changes. \n\n\u003eExample: `/time 256` will change the current game time to 256 seconds whereas `/time` will display the current time in the chat.\n\nUsing a **tilde (~)** as an argument will be treated as the current value. Any number after the tilde will be **added** to the value.\n\n\u003eExample: `/tp ~ ~10 ~` will move the player +10 blocks in the Y axis and `/tp ~ ~-10 ~` will move them downwards by 10 blocks.\n\n#### Notable examples include:\n- /tp x y z *pitch *yaw - Teleport to the specified coordinates with optional arguments to set camera pitch and yaw. Scientific notation and other keywords are allowed.\n- /fill x\u003csub\u003e1\u003c/sub\u003e y\u003csub\u003e1\u003c/sub\u003e z\u003csub\u003e1\u003c/sub\u003e x\u003csub\u003e2\u003c/sub\u003e y\u003csub\u003e2\u003c/sub\u003e z\u003csub\u003e2\u003c/sub\u003e id - Fills from the first position to the second (all inclusive) with the specified block ID\u003csup\u003e^\u003c/sup\u003e\n- /speed *n - Change the player's current speed to the specified value.\n- /rd *n - Changes the render distance to the specified value \\[0, 50\\]\n- /tick *n - Change the tick speed to the specified value, which affects the speed at which in-game time passes. \\[-100, 100\\]\n- /time *n - Change the current in-game time to the specified value.\n- /fov *n - Change the camera's field of view to the specified value.\n- /clear - Clears the chat\n\nWriting any command with the only argument as `?` (or an invalid number of arguments) will display help for that command if available.\n\n\u003csub\u003e\u003csup\u003e^\u003c/sup\u003eA full list of all the blocks and their associated IDs and properties can be found in the [following file](src/World/Generation/Settings.hpp).\u003c/sub\u003e\n\n\u003cimg src=\"markdown/cmd.png\"\u003e\u003c/img\u003e\n\u003csup\u003eIn-game screenshot with GUI enabled\u003c/sup\u003e\n\n## Controls\nThe implementations of controls can also be viewed and easily edited in [this file](src/Application/Callbacks.cpp). \n\nDefault controls are as follows:\n- Movement: **WASD**\n- Write command: **/** (forward slash)\n- Exit game/close chat: **ESC**\n\n### Toggle inputs:\n- Toggle fullscreen: **F**\n- Toggle vertical sync: **X**\n- Toggle inventory: **E**\n- Toggle gravity: **C**\n- Toggle noclip: **N**\n- Toggle chunk generation: **V**\n\n### Value inputs*\n- Change speed: **COMMA** and **PERIOD**\n- Change FOV: **I** and **O**\n- Change render distance: **[** and **]** (square brackets)\n\n### Function inputs\n- Toggle all GUI: **F1**\n- Take screenshot: **F2**\n- Free cursor: **F3**\n- Toggle debug text: **F4**\n\n### Debug inputs\n- Wireframe: **Z**\n- Reload shaders: **R**\n- Toggle chunk borders: **J**\n- Rebuild chunks: **U**\n\n\u003csub\u003e* The first input increases the value whilst the other decreases it.\u003c/sub\u003e\n## Build\nTo compile and run the game, you can simply use [CMake](https://cmake.org/).\n\nIf you are using the **CMake GUI**, you can follow these steps:\n- Specify root and build directory\n- Press 'Configure' on the left above the output section\n- Press 'Yes' on the prompt to create a new folder (if the folder does not exist)\n- Specify generator and other settings if needed and press 'Finish'\n- Press 'Configure' again then 'Generate' to create the binaries\n\nIf you are using CMake in a **terminal**, you can run the following (with your own directories and settings):\n\n```bash\n$ cmake -S [source-dir] -B [build-dir]\n```\n\nIf you encounter any problems, feel free to create a new issue so it can be resolved.\n\n\u003csup\u003eIf you are using MSVC, you can compile using the /MP flag to do so in parallel.\u003c/sup\u003e\n\n## Libraries\nThis game makes use of a few libraries to work. They can be seen in the 'libraries' folder or below. Make sure to support them, this would not be possible without them!\n\n[lodepng](https://github.com/lvandeve/lodepng) - PNG encoder and decoder\n\n[GLM](https://github.com/icaven/glm) - OpenGL maths library\n\n[GLFW](https://github.com/glfw/glfw) - Window and input library\n\n[glad](https://github.com/Dav1dde/glad) - OpenGL loader/generator\n\n[fmt](https://github.com/fmtlib/fmt) - Formatting library\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahdialmusaad%2Fbadcraft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmahdialmusaad%2Fbadcraft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahdialmusaad%2Fbadcraft/lists"}