{"id":13626688,"url":"https://github.com/zig-community/Zig-Showdown","last_synced_at":"2025-04-16T15:31:32.534Z","repository":{"id":46373900,"uuid":"312352705","full_name":"zig-community/Zig-Showdown","owner":"zig-community","description":"A community effort to create a small multiplayer 3D shooter game in pure zig","archived":false,"fork":false,"pushed_at":"2021-10-19T06:41:10.000Z","size":7525,"stargazers_count":50,"open_issues_count":11,"forks_count":12,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-08-02T22:27:35.395Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"eupl-1.2","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zig-community.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-12T17:45:29.000Z","updated_at":"2024-06-11T03:10:13.000Z","dependencies_parsed_at":"2022-09-21T20:51:29.491Z","dependency_job_id":null,"html_url":"https://github.com/zig-community/Zig-Showdown","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zig-community%2FZig-Showdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zig-community%2FZig-Showdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zig-community%2FZig-Showdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zig-community%2FZig-Showdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zig-community","download_url":"https://codeload.github.com/zig-community/Zig-Showdown/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223716688,"owners_count":17191092,"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":[],"created_at":"2024-08-01T21:02:26.621Z","updated_at":"2024-11-08T16:31:25.096Z","avatar_url":"https://github.com/zig-community.png","language":"Zig","funding_links":[],"categories":["Zig","Applications"],"sub_categories":[],"readme":"# Zig-Showdown\nA community effort to create a small multiplayer 3D shooter game in pure zig\n\n## Development\n\n### Communication\n\nThe main communication happens via the [Zig Showtime](https://discord.gg/p4bUwnf92n) discord. Please join if you want to participate!\n\n### Asset Building\n\nAssets are spread over 3 different folders:\n- `assets-src`: Source formats for the files that are from the original editor. Files here are for example blender or gimp project files.\n- `assets-in`: Intermediate asset files in commonly editable formats like png, obj. These files get compiled in the `zig build assets` step into a file into `assets`.\n- `zig-cache/bin/assets`: Contains the final assets that will be shipped with the game. This folder is completly auto-generated and the folder is not included in the repository.\n\nWhen invoking `zig build assets`, the build system will search for files in `assets-in` and will translate them into the game-custom format which are stored in `assets`.\n\nAssets that don't need to be converted will just be copied flat into the `assets` folder.\n\n#### Translation Table\n\nThis table lists all implemented (or planned) asset file associations:\n\n| Input File | Target File Extension | Resource Type |\n|------------|-----------------------|---------------|\n| `*.png`    | `.tex`                | `Texture`     |\n| `*.tga`    | `.tex`                | `Texture`     |\n| `*.bmp`    | `.tex`                | `Texture`     |\n| `*.obj`    | `.mdl`                | `Model`       |\n| `*.wav`    | `.snd`                | `Sound` (https://github.com/zig-community/Zig-Showdown/issues/9)  |\n| `*.ogg`    | `.mus`                | `Music` (https://github.com/zig-community/Zig-Showdown/issues/11) |\n\n\n#### Tools \n\nEach tool receives three cli args:\n1. **Input path:** This is a path to the file that should be converted\n2. **Output path:** This is the target file where the final asset file should be written\n3. **Asset name:** This is the identifier (file path) which is used in the game can should be used to refer to other assets\n\n### Contribution\n\n### Checkout\n\nClone the repo and all submodules:\n```sh\ngit clone https://github.com/zig-community/Zig-Showdown --recursive\n```\n\n### Committing\n\nFeel free to create a PR to this repo, but please make sure you've run `zig fmt` on your files to keep a consistent state.\n\n### Build\n\n```sh\n# Use this to build the project\nzig build assets install\n\n# Use this to run the game in a debug session\nzig build assets run\n```\n\nRecommended to be built with the latest master, but Zig 0.7.0 should be fine.\n\nThe following build targets are available:\n\n- `install`: Build the software, but without assets\n- `assets`: Compile all assets into the required format. This is a pretty lengthy step, so use only when required: This is only necessary once or when assets are changed. Source code changes usually do not require this.\n- `tools`: This only compiles the tools to preprocess assets, but does not update the assets.\n- `run`: Starts the game client.\n- `run-server`: Starts a dedicated server.\n- `test`: Runs tests on both server and client software\n\nThe following build options are available:\n\n| Option               | Allowed Values | Default Value      | Effect                     |\n|----------------------|----------------|--------------------|----------------------------|\n| `default_port`       | `u16`          | 3315               | Sets the default game port |\n| `initial_state`      | `create_server`, `create_sp_game`, `credits`, `gameplay`, `join_game`, `main_menu`, `options`, `pause_menu`, `splash`  | `splash` | Sets the initial state of the game, changing where the game starts. This allows improved debugging for stuff like `gameplay` or `options` where waiting for the normal game flow to finish is too long. |\n| `enable-fps-counter` | `bool`         | `true` when Debug  | When enabled, displays a text that shows frame time in ms and frame rate in fps. |\n| `embed-resources`    | `bool`         | `false`            | When enabled, the `assets` folder is embedded into the final executable, creating a single-file game. |\n| `renderer`           | `software`, `opengl` | `software` | Sets the given value as the rendering backend for the game. This allows to exchange the used graphics APIs. |\n| `jack`               | `bool`         | `false`            | Enables the JACK audio backend |\n| `pulseaudio`         | `bool`         | Enabled on Linux   | Enables the PulseAudio audio backend |\n| `alsa`               | `bool`         | Enabled on Linux   | Enables the ALSA audio backend |\n| `coreaudio`          | `bool`         | Enabled on MacOS   | Enables the CoreAudio audio backend |\n| `wasapi`             | `bool`         | Enabled on Windows | Enables the WASAPI audio backend |\n| `debug-tools`        | `bool`         | `false`            | Tools are usually built in `ReleaseSafe` mode for performance, but when working on the tools, it's better to compile them in `Debug` mode. Setting this flag does this. |\n\n### OpenGL Loader\n\nYou need [zig-opengl](https://github.com/MasterQ32/zig-opengl) to regenerate the binding:\n\n```sh\n# assuming we are in the project repository:\nSHOWDOWN_ROOT=$(pwd)\n\n# Prepare the opengl generator\ncd /path/to/zig-opengl\nmake generator.exe\n\n# Create our OpenGL 3.3 + GL_ARB_direct_state_access\nmono generator.exe OpenGL-Registry/xml/gl.xml $(SHOWDOWN_ROOT)/deps/opengl/gl_3v3_with_exts.zig GL_VERSION_3_3 GL_ARB_direct_state_access GL_KHR_debug\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzig-community%2FZig-Showdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzig-community%2FZig-Showdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzig-community%2FZig-Showdown/lists"}