2023-10-26 11:23:45 +02:00
|
|
|
# Cub3D
|
|
|
|
Cub3D is a simple raycasting game using the mlx library
|
2023-10-25 13:56:45 +02:00
|
|
|
|
|
|
|
---
|
2023-10-26 11:23:45 +02:00
|
|
|
## Todo
|
|
|
|
### Parsing
|
2023-10-29 17:22:15 +01:00
|
|
|
- Flood fill the map starting from the player to check if it is a closed map
|
2023-10-26 11:23:45 +02:00
|
|
|
- Check if all needed elements are present in the closed part of the map
|
|
|
|
### Raycasting
|
2023-10-29 17:22:15 +01:00
|
|
|
- Replace walls with textures
|
2023-10-26 11:23:45 +02:00
|
|
|
### Bonus
|
|
|
|
- Doors
|
|
|
|
- Minimap
|
|
|
|
- Animated Sprites
|
|
|
|
### Extra
|
2023-10-29 22:32:27 +01:00
|
|
|
- Help screen?
|
2023-10-26 11:23:45 +02:00
|
|
|
- Levels?
|
2023-10-29 18:24:24 +01:00
|
|
|
- Barrels?
|
|
|
|
- Collectables
|
2023-10-26 11:23:45 +02:00
|
|
|
- Enemies?
|
2023-10-29 17:22:15 +01:00
|
|
|
- Moving Enemies?
|
2023-10-26 11:23:45 +02:00
|
|
|
- Weapon Sprite that fires?
|
2023-10-29 18:24:24 +01:00
|
|
|
- Zoom with right mouse button?
|
2023-10-29 17:22:15 +01:00
|
|
|
- Skybox?
|
|
|
|
- Sounds?
|
|
|
|
- Music?
|
2023-10-29 18:24:24 +01:00
|
|
|
- A Start Menu?
|
2023-10-26 11:23:45 +02:00
|
|
|
- Jumping?
|
|
|
|
- Vertical Aiming?
|
2023-10-25 13:56:45 +02:00
|
|
|
|
2023-10-29 17:22:15 +01:00
|
|
|
---
|
|
|
|
## Features
|
|
|
|
### Mandatory
|
|
|
|
- Parsing .cub file for colors and sprites
|
|
|
|
- Parsing .cub file for the map
|
|
|
|
- Set floor and ceiling color based on .cub file
|
|
|
|
- Set Player starting direction based on letter in map
|
|
|
|
- Render walls by raycasting
|
|
|
|
- Walk in 4 directions
|
|
|
|
- Rotate with arrow keys
|
|
|
|
### Bonus
|
|
|
|
- Wall Collision
|
|
|
|
- Rotate with the mouse
|
|
|
|
### Extra
|
|
|
|
- FPS counter
|
|
|
|
- Player can walk in 8 directions
|
|
|
|
- Player can Run
|
2023-10-29 22:32:27 +01:00
|
|
|
- Map sizes up to 1 Megabyte (1000x1000)
|
2023-10-29 17:22:15 +01:00
|
|
|
|
2023-10-25 13:56:45 +02:00
|
|
|
---
|
|
|
|
## Bugs
|
2023-10-29 17:22:15 +01:00
|
|
|
- Player gets stuck in walls
|
2023-10-29 18:24:24 +01:00
|
|
|
- Player walks twice as fast when holding W and A or W and D
|
2023-10-25 13:56:45 +02:00
|
|
|
|
|
|
|
---
|
|
|
|
## Usage
|
|
|
|
1. Simply clone or download the repository
|
|
|
|
2. Run `make` in the cloned directory
|
2023-10-26 11:23:45 +02:00
|
|
|
3. Start the game with `./cub3d`
|
2023-10-25 13:56:45 +02:00
|
|
|
|
|
|
|
---
|
|
|
|
[This project is part of the studies at 42](https://42.fr/en/homepage/)
|