https://github.com/f0rkr/cub3d
Ray-casting game for wasting productive time.
https://github.com/f0rkr/cub3d
Last synced: 6 months ago
JSON representation
Ray-casting game for wasting productive time.
- Host: GitHub
- URL: https://github.com/f0rkr/cub3d
- Owner: f0rkr
- Created: 2021-05-02T15:30:36.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-23T13:50:56.000Z (over 4 years ago)
- Last Synced: 2025-04-23T12:28:17.860Z (9 months ago)
- Language: C
- Size: 509 KB
- Stars: 11
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cub3D
The goal of ``Cub3D`` is to make *something* using raycasting from scratch with low level C ✨ (like [Wolfenstein 3D](https://fr.wikipedia.org/wiki/Wolfenstein_3D)).

Making this game gave me a basic idea on how games are made, it's was a fun experience.
Althoug It was pain in the arse, managing all memory leaks and function that's *C* makes you do on your own.
Enjoy it 🎴
# Usage
``f0rkr@shell» make``
``f0rkr@shell» ./cub3D map.cub``
You can edit map.cub to change textures and player position, sprites textures, colors and map form.

It also has the feature to screenshot the game and save in a bmp format simply by adding --save to your command.
use:
``f0rkr@shell» ./cub3D map.cub --save``
# Resources I used:
* [Playable Wolfenstein 3D](http://users.atw.hu/wolf3d/)
* [Raycasting in JS](http://www.playfuljs.com/a-first-person-engine-in-265-lines/)
* [Some X11 event numbers](https://github.com/qst0/ft_libgfx)
* [Full tutorial in English](https://lodev.org/cgtutor/raycasting.html)
* [Full tutorial in French (translation of the English tutorial)](http://forums.mediabox.fr/wiki/tutoriaux/flashplatform/affichage/3d/raycasting)
* [Images in minilibx](https://github.com/keuhdall/images_example)
* [BMP format on StackOverflow](https://stackoverflow.com/questions/2654480/writing-bmp-image-in-pure-c-c-without-other-libraries)
* [BMP format explanation](https://web.archive.org/web/20080912171714/http://www.fortunecity.com/skyscraper/windows/364/bmpffrmt.html)