D-Daria / cub3D

First RayCaster with miniLibX as Scool21/Ecole42 group project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cub3D

mrhyhorn and sshield group ๐Ÿ‘ฉ๐Ÿปโ€๐Ÿ’ป ๐Ÿง‘๐Ÿปโ€๐Ÿ’ป at School21

Content

Summary

Game

How to run

Useful links and sources

๐Ÿ“„ Summary

Graphic project with use of miniLibX.

This project is inspired by the world-famous Wolfenstein 3D game. It aims to explore ray-casting. The goal is to make a dynamic view inside a maze, in which the player has to find the way.

๐ŸŽฎ Game

โ€ข The left and right arrow keys of the keyboard allow to look left and right in the maze.

โ€ข The W, A, S, D keys allow to move the point of view through the maze.

โ€ข Pressing ESC and red cross of window close the window and quit the program.

Map

All maps are stored in maps directory

The map itself is composed of 6 characters:

  • 0 for an empty space
  • 1 for a wall
  • N,S,E or W for the playerโ€™s start position and spawning orientation

You can create your own map using the combination of characters mentioned above.

Map rules

  • Map should be surrounded by wall and must not have empty lines.

To validate the map we used flood-fill algorithm

Minimap

โ€ข The minimap is displayed in the top left corner with player moving as you press the keys.

Game preview

๐Ÿ How to run

The project can be compiled on both Mac OS and Linux.

make && ./cub3D maps/choose_your_map

Example

make && ./cub3D maps/irregular.cub

or

./cub3D maps/lab.cub

๐Ÿ”— Useful links and sources

Raycasting

๐ŸŒ Lode's Computer Graphics Tutorial - Raycasting

๐ŸŒ ะžะฑัƒั‡ะตะฝะธะต ั‚ะตั…ะฝะพะปะพะณะธะธ ray-casting, ั‡ะฐัั‚ัŒ 1

๐ŸŒ permadi.com - Raycasting tutorial

โ–ถ๏ธ Make Your Own Raycaster Part 1

Movements

โ–ถ๏ธ Rotation matrice

๐ŸŒ Custom frame rate counter

Map validation

๐ŸŒ How can I tell if an object in a tile grid is surrounded?

๐ŸŒ Flood fill algorithm

๐ŸŒ Convert hex string to int

Textures

๐ŸŒ OpenGameArt.org

๐ŸŒ Free Texture Pack for Realtime 3D

๐ŸŒ itchio.io

About

First RayCaster with miniLibX as Scool21/Ecole42 group project.


Languages

Language:C 71.2%Language:Roff 16.0%Language:Objective-C 10.6%Language:Makefile 1.9%Language:Perl 0.2%