An open API service indexing awesome lists of open source software.

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.

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.

Screen-Shot-2021-05-20-at-10-02-32-PM
# 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.

raycastgrid


raycastmiss

# 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