Welcome to the Wolfenstein project! This README provides an overview of the game's features, setup instructions, and how to contribute to the development. Dive into a dynamic and immersive world built using C++ and SDL, where you'll experience real-time combat and a rich environment.
- Dynamic Combat: Engage in fast-paced action using a variety of weapons.
- Pathfinding with A*: Enemies dynamically navigate the environment using the A* algorithm.
- Player Interactions: Smooth controls for movement and combat.
- Static Maps with Dynamic Elements: Navigate a static map populated with dynamic objects and enemies.
- State Design Pattern: Enemies utilize a flexible state system with the following behaviors:
- Idle
- Walk
- Attack
- Pain
- Death
- State Design Pattern: Weapons use states for the following functionalities:
- Loaded
- OutOfAmmo
- Reloading
- Synchronized Execution: All weapon and enemy animations are synchronized with the main game clock to maintain fluid gameplay.
- Pathfinding and Navigation: A* algorithm is used for efficient enemy movement and navigation. For more details on the implementation, see my path-planning project.
- Ray Casting with DDA: The Digital Differential Analyzer (DDA) algorithm is used for efficient ray casting, creating realistic field of view.
- Templates and Type Traits: Advanced template programming ensures modular and reusable code.
- Instant State Transitions: Transitions between states happen instantly, ensuring smooth gameplay.
- C++ Compiler: Ensure you have a modern C++ compiler (C++17 or higher).
- SDL Library: Install SDL for rendering, sound, and input handling.
- Clone the repository:
git clone https://github.com/bilalkah/wolfenstein --recurse-submodules cd wolfenstein
- Install dependencies:
./scripts/install_deps.sh
- Build the project using
cmake
or your preferred build system:./scripts/compile.sh # or you can your own way to build
- Run the executable:
./build/bin/wolfenstein
- Movement: Use
W
,A
,S
,D
to move around. - Attack: Use
Left Click
to attack enemies. - Select Weapon: Use
Left Arrow
,Right Arrow
, andSpace
to navigate and select your weapon.
We welcome contributions! Here are a few ways you can help:
- Report Bugs: Submit issues on the GitHub repository.
- Suggest Features: Share your ideas to improve gameplay.
- Write Code: Fork the repository and submit a pull request with your improvements.
- Create a new branch for your feature:
git checkout -b feature-name
- Commit your changes:
git commit -m "Description of changes"
- Push the branch and open a pull request:
git push origin feature-name
- Performance drops:
- Use caching mechanism to prevent extensively running pathfinding algorithm.
- Optimize pathfinding algorithms to enemies do not block each other.
- Better to have:
- Collision check with static and dynamic objects
- Expand maps and introduce new enemy types.
Thank you for checking out the first version of my Wolfenstein game! This release represents my learning journey, including experimenting with game design, state management, and spatial data handling. I hope you enjoy playing it as much as I enjoyed creating it.
Additionally, I would also like to share the source of motivation and inspiration for me to do this project. 95% of the assets were obtained from the relevant source.
https://github.com/StanislavPetrovV/DOOM-style-Game
https://www.youtube.com/watch?v=ECqUrT7IdqQ
This project is open-source and available under the MIT License. See the LICENSE
file for details.
For questions or feedback, reach out at:
- Email: [email protected]
- GitHub: bilalkah
Enjoy the game and happy coding!