https://github.com/ahaddad98/cub3d
This project will enable you to explore ray-casting. Your goal will be to make a dynamic view inside a maze, in which you’ll have to find your way.
https://github.com/ahaddad98/cub3d
c minilibx pixel ray raycasting rgb
Last synced: 12 months ago
JSON representation
This project will enable you to explore ray-casting. Your goal will be to make a dynamic view inside a maze, in which you’ll have to find your way.
- Host: GitHub
- URL: https://github.com/ahaddad98/cub3d
- Owner: ahaddad98
- Created: 2021-03-26T13:43:58.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-20T21:41:33.000Z (about 5 years ago)
- Last Synced: 2025-04-12T06:52:00.708Z (about 1 year ago)
- Topics: c, minilibx, pixel, ray, raycasting, rgb
- Language: C
- Homepage:
- Size: 1.04 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cub3D
This project will enable you to explore ray-casting. Your goal will be to make a dynamic view inside a maze, in which you’ll have to find your way.
# First : MiniLibX
The keystone of the 42 graphics branch is learning to use MiniLibX
Besides some old videos on intra, you are given the source and the man pages to figure it out.
To help demystify the man pages I took a moment and formatted them for markdown.
MiniLibX is described in the following man pages:
mlx : MiniLibX overview
mlx_new_window : manage windows
mlx_pixel_put : draw inside window
mlx_new_image : manipulate images
mlx_loop : handle keyboard or mouse events
Take some time and read these pages, if you want to read them in the console:
man minilibx/man/man1/mlx.1
# RayCasting !
Raycasting is the process of shooting an invisible ray from a point, in a specified direction to detect whether any colliders lay in the path of the ray.
# Resources
https://lodev.org/cgtutor/raycasting.html
https://wiki.fileformat.com/image/bmp/
https://engineering.purdue.edu/ece264/17au/hw/HW15
https://stackoverflow.com/questions/13354892/converting-from-rgb-ints-to-hex
https://qst0.github.io/ft_libgfx/man_mlx.html
https://qst0.github.io/ft_libgfx/man_mlx.html

