SkillAgentSearch skills...

Cub3D

πŸ“¦ Raycasting project inspired by "Wolfenstein 3D" (1992) video game

Install / Use

/learn @romanwrites/Cub3D

README

cub3D

<img src="img/cub3D.png" alt="cover"/> Raycasting project (21-school / Ecole 42)

How it looks:

<img src="img/cub3D.gif" alt="gameplay"/>

Setup and usage

git clone https://github.com/kukinpower/cub3D.git
cd cub3D/cub3D
make
./cub3D map.cub

Controls

W A S D					move
←					turn left
β†’					turn right

Configuration file map.cub

Config file called `map.cub`

R 					resolution
C					ceiling rgb color
F					floor rgb color
NO SO WE EA				paths to textures
S					path to sprite
					empty lines

valid map is surrounded by walls (1) and can contain these characters
1					wall
0					player can move here
2					sprite/item
N S E W					player position and view direction
space					empty space (player can't see them)

map can't be splitted by empty lines

Example of a valid config file: <img src="img/conf.png" alt="valid configuration file"/>

πŸ•΅πŸ½β€β™€οΈ Research

Core

I built the graphics engine using this guide: Lode's Computer Graphics Tutorial

And peer2peer communication

Maths

Graphics

Generate BMP

Others (not used in final project)

Texture credits

  • Art: Wassily Kandinsky
  • Lego: <span>Photo by <a href="https://unsplash.com/@omarg247?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Omar Flores</a> on <a href="https://unsplash.com/s/photos/lego?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></span>
  • Pink bricks: <span>Photo by <a href="https://unsplash.com/@pawel_czerwinski?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">PaweΕ‚ CzerwiΕ„ski</a> on <a href="https://unsplash.com/s/photos/pink-brick?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></span>
  • Binary: me
  • Coin: https://creazilla.com/nodes/60815-golden-dollar-coin-clipart
  • Crate: MostafaElTurkey36

Author

Roman Kukin

developer <br/> school 21 (Ecole 42) student

linkedin <span style="margin: 50px">github</span> twitter

View on GitHub
GitHub Stars4
CategoryContent
Updated1y ago
Forks0

Languages

C

Security Score

60/100

Audited on Jan 23, 2025

No findings