{"id":17672175,"url":"https://github.com/mbn-code/bitwars","last_synced_at":"2026-05-04T01:32:45.763Z","repository":{"id":258660746,"uuid":"868297038","full_name":"mbn-code/Bitwars","owner":"mbn-code","description":"Bitwars - Cpp raylib project ","archived":false,"fork":false,"pushed_at":"2024-11-01T00:27:27.000Z","size":45607,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-05T17:11:38.438Z","etag":null,"topics":["arm64","cpp17","game","game-deve","gui-application","macos","make","makefile","modern-cpp","raylib","raylib-c","raylib-cpp","raylib-game","wargame","windows","windows-10"],"latest_commit_sha":null,"homepage":"https://mbn-code.dk","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mbn-code.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-06T02:12:36.000Z","updated_at":"2024-11-01T00:27:30.000Z","dependencies_parsed_at":"2024-10-24T06:21:09.156Z","dependency_job_id":"9bc8949b-4cb8-4602-89f6-4c07a4e64018","html_url":"https://github.com/mbn-code/Bitwars","commit_stats":null,"previous_names":["mbn-code/bitwars"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbn-code%2FBitwars","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbn-code%2FBitwars/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbn-code%2FBitwars/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbn-code%2FBitwars/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbn-code","download_url":"https://codeload.github.com/mbn-code/Bitwars/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246336378,"owners_count":20761044,"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":["arm64","cpp17","game","game-deve","gui-application","macos","make","makefile","modern-cpp","raylib","raylib-c","raylib-cpp","raylib-game","wargame","windows","windows-10"],"created_at":"2024-10-24T04:07:13.626Z","updated_at":"2026-05-04T01:32:45.733Z","avatar_url":"https://github.com/mbn-code.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ⚔️ Bitwars - War Simulation Game\n\n**Bitwars** is a simple war simulation game developed using C++ and the **Raylib** graphics library. In this game, players engage in combat by spawning units and managing a base, trying to outlast the opposing NPC forces. The game includes mechanics like combat handling, points accumulation, and a high score system.\n\n---\n\n## 🗂️ Project Structure\n\nThe project is organized into several directories and files, each serving a specific purpose. Here's a brief overview:\n\n### 📁 Directories\n\n- **`.vscode/`**: Contains Visual Studio Code configuration files.\n  - `c_cpp_properties.json`, `launch.json`, `settings.json`, `tasks.json`: Configuration files for setting up the C++ environment and build tasks.\n\n- **`assets/`**: Contains game assets such as images and sounds.\n  - `generated/`: Holds dynamically generated assets.\n  - `main.py`: Script for asset generation.\n\n- **`bin/`**: Contains the compiled binaries for the game.\n  - `Bitwars/`, `Bitwars.exe`: The game executable files.\n\n- **`includes/`**: Contains header files for various game components.\n  - `GameDataStructures.hpp`: Defines the data structures used in the game.\n  - `HandleCombat.hpp`: Header for combat-related functionality.\n  - `PointMultiplier.hpp`: Header for point multiplier logic.\n\n- **`lib/`**: External libraries and headers used by the game.\n  - `GLFW/`: GLFW library files.\n  - `libraylib.a`: Static Raylib library.\n  - `raylib.h`, `raymath.h`: Raylib header files.\n  - `windows/`: Windows-specific Raylib files.\n\n- **`src/`**: Contains source code files.\n  - `main.cpp`: Main game loop and logic.\n  - `main.hpp`: Header for the main source file.\n\n### 📄 Key Files\n\n- **`makefile`**: Defines how the project is built. Supports building for macOS and Windows.\n- **`README.md`**: The main documentation for the project.\n- **`.gitignore`**: Specifies files and directories to be ignored by Git (e.g., build artifacts).\n\n---\n\n## ⚙️ Building the Project\n\n### macOS\n\nTo build the game on macOS, run:\n\n```bash\nmake PLATFORM=macos\n```\n\n### Windows\n\nTo build the game on Windows, run:\n\n```bash\nmake PLATFORM=windows\n```\n\n---\n\n## 🕹️ Running the Game\n\nOnce the project is built, you can run the game using the compiled executable.\n\n### macOS Run\n\n```bash\n./Bitwars\n```\n\n### Windows Run\n\n```bash\nBitwars.exe\n```\n\n---\n\n## 🎮 Game Mechanics\n\n### 🏠 Bases\n\n- **Player and NPC Bases**: Each side (player and NPC) has a base represented by the `Base` struct.\n- **Attributes**:\n  - `health`: Represents the base's health.\n  - `points`: Accumulated points based on game progress.\n\n### 👥 Units\n\n- **Spawning**: Both the player and NPC can spawn units to attack the opposing base.\n- **Control**: Units are controlled by both the player and NPC.\n- **Combat**: Units engage in combat automatically when they collide with enemy units.\n\n### ⚔️ Combat\n\n- **Handling**: Combat is managed by the `HandleCombat` class, which handles logic for units fighting each other.\n- **Points System**: Points are awarded based on unit health and combat outcomes.\n\n### 🏆 High Scores\n\n- **Handling**: Managed by the `HandleHighScore` class.\n- **Storage**: High scores are stored and retrieved to track the player's best performance.\n\n### 🔢 Point Multiplier\n\n- **Mechanics**: The `PointMultiplier` class manages conditions for increasing the player's points under certain conditions, adding a strategic layer to gameplay.\n\n---\n\n## 🤝 Contributing\n\nContributions are welcome! Please follow the standard [GitHub flow](https://guides.github.com/introduction/flow/) when contributing:\n\n1. **Fork** the repository.\n2. **Create** a new branch for your feature or bugfix.\n3. **Commit** your changes and **push** them to your fork.\n4. **Submit** a pull request and provide a clear description of the changes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbn-code%2Fbitwars","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbn-code%2Fbitwars","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbn-code%2Fbitwars/lists"}