A 2D Game in C using the MLX42 Graphics Library 👾🕹️
https://github.com/liz753/so_long/blob/main/Makefile
https://github.com/Laendrun/42-so_long/tree/main/includes
https://42-cursus.gitbook.io/guide/rank-02/so_long
https://reactive.so/post/42-a-comprehensive-guide-to-so_long
https://github.com/madebypixel02/so_long
First I create my Project Plan :
1. Theme and Graphics
- choice of theme
- image research
- image manipulation using GIMP (transparency and resizing)
2. Code Structure
- create a Makefile that doesn't relink
- create a header file
3. Parsing
- read the map file with the C-functions
openandreadand store its content in a string - store the map in a 2D-array
- check that the map is valid
- check that the path is valid (all collectibles and exit reachable) using floodfill
- implement error messages
4. Game Coding
- keyboard input (
WASD+ arrow keys for moving andESCfor closing the game) - image conversion to
.xpm42usingxpm3_conv.py-file of the MLX42 - initialization of assets (in this case only images)
- rendering
- implement the hooks
- display the movement count in the shell
- display messages in the shell (a)when player wants to go on exit before collecting all the collectibles, b) when the player collected them all, c) when the player quit the game before finishing and d)when the player won the game)