-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
164 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Bilal Kahraman | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,138 @@ | ||
# Project-Wolfenstein | ||
# Wolfenstein Project | ||
|
||
## Views from the game | ||
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. | ||
|
||
![](images/screenshot1.png) | ||
![](images/screenshot2.png) | ||
![](images/screenshot3.png) | ||
![](images/minimap.png) | ||
## View from the game | ||
|
||
<p float="left"> | ||
<img src="images/game_view_with_mp5.png" width="400" /> | ||
<img src="images/game_view_with_shotgun.png" width="400" /> | ||
</p> | ||
|
||
--- | ||
|
||
## Features | ||
|
||
### Core Gameplay | ||
- **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. | ||
|
||
### Environment | ||
- **Static Maps with Dynamic Elements**: Navigate a static map populated with dynamic objects and enemies. | ||
|
||
### Enemy Behavior | ||
- **State Design Pattern**: Enemies utilize a flexible state system with the following behaviors: | ||
- Idle | ||
- Walk | ||
- Attack | ||
- Pain | ||
- Death | ||
|
||
### Weapons | ||
- **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. | ||
|
||
--- | ||
|
||
## Technical Highlights | ||
|
||
- **Pathfinding and Navigation**: A* algorithm is used for efficient enemy movement and navigation. For more details on the implementation, see my [path-planning](https://github.com/bilalkah/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. | ||
|
||
--- | ||
|
||
## Setup Instructions | ||
|
||
### Prerequisites | ||
1. **C++ Compiler**: Ensure you have a modern C++ compiler (C++17 or higher). | ||
2. **SDL Library**: Install SDL for rendering, sound, and input handling. | ||
|
||
### Build Instructions | ||
1. Clone the repository: | ||
```bash | ||
git clone https://github.com/bilalkah/wolfenstein --recurse-submodules | ||
cd wolfenstein | ||
``` | ||
2. Install dependencies: | ||
```bash | ||
./scripts/install_deps.sh | ||
``` | ||
3. Build the project using `cmake` or your preferred build system: | ||
```bash | ||
./scripts/compile.sh # or you can your own way to build | ||
``` | ||
4. Run the executable: | ||
```bash | ||
./build/bin/wolfenstein | ||
``` | ||
|
||
--- | ||
|
||
## How to Play | ||
|
||
- **Movement**: Use `W`, `A`, `S`, `D` to move around. | ||
- **Attack**: Use `Left Click` to attack enemies. | ||
- **Select Weapon**: Use `Left Arrow`, `Right Arrow`, and `Space` to navigate and select your weapon. | ||
|
||
--- | ||
|
||
## Contribution Guidelines | ||
|
||
We welcome contributions! Here are a few ways you can help: | ||
|
||
1. **Report Bugs**: Submit issues on the GitHub repository. | ||
2. **Suggest Features**: Share your ideas to improve gameplay. | ||
3. **Write Code**: Fork the repository and submit a pull request with your improvements. | ||
|
||
### Development Workflow | ||
1. Create a new branch for your feature: | ||
```bash | ||
git checkout -b feature-name | ||
``` | ||
2. Commit your changes: | ||
```bash | ||
git commit -m "Description of changes" | ||
``` | ||
3. Push the branch and open a pull request: | ||
```bash | ||
git push origin feature-name | ||
``` | ||
|
||
--- | ||
|
||
## Troubleshooting | ||
|
||
### Common Issues | ||
1. **Performance drops**: | ||
- Use caching mechanism to prevent extensively running pathfinding algorithm. | ||
- Optimize pathfinding algorithms to enemies do not block each other. | ||
2. **Better to have**: | ||
- Collision check with static and dynamic objects | ||
--- | ||
|
||
## Future Plans | ||
|
||
- Expand maps and introduce new enemy types. | ||
|
||
--- | ||
|
||
## License | ||
|
||
This project is open-source and available under the MIT License. See the `LICENSE` file for details. | ||
|
||
--- | ||
|
||
## Contact | ||
|
||
For questions or feedback, reach out at: | ||
- Email: [email protected] | ||
- GitHub: [bilalkah](https://github.com/bilalkah) | ||
|
||
Enjoy the game and happy coding! | ||
|
||
## Install dependencies and build | ||
```batch | ||
./scripts/install_deps.sh | ||
./scripts/compile.sh | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.