The So_long project is one of three options that 42 schools offer to students at an introductory level to graphical programming. This project allows students to develop a simple top-down game using the C programming language with a graphics library called MiniLibX.
Developing C Programming Skills: To enable students to master the basic structures and functions of the C language.
Introduction to Graphics Programming: To teach basic graphical programming topics such as creating windows, managing events, drawing graphs through the MiniLibX library.
Algorithms and Data Structures: To gain the ability to use appropriate algorithms and data structures to create game logic.
Memory Management: Preventing memory leaks and raising awareness about efficient memory usage.
Game Development Fundamentals: To teach the basic concepts of game development such as game cycle, sprite management, collision detection.
Map Processing: Read a map file given as a parameter to the program, verify it and generate the game world.
Window Management: Creating a graphical window using MiniLibX and managing events (key presses, mouse movement, etc.) on this window.
Sprite Management: Loading sprites representing game characters and objects and drawing them in the correct position on the screen.
Game Logic: Setting the rules of the game and making the game progress according to these rules (e.g. character movements, collisions, winning or losing the game).
User Interaction: Detecting user interactions such as keystrokes and mouse movements and reflecting them in the game.
In summary, the so_long project allows students to learn the basic principles of game development while reinforcing their C programming skills. This project helps students build a solid foundation for developing more complex games.
- How to design a game?
- How to create and manage graphics?
- How to code game logic?
- How to avoid memory leaks?
- How to ensure user interaction?
[FORWARD] = W
[GO_LEFT] = A
[GO_RIGHT] = D
[BACKWARD] = S
[EXIT] = ESC
'0' = SPACE
'1' = WALL
'P' = PLAYER
'E' = EXIT
'C' = COLLECTIBLE
Just do make and execute with ./so_long [mapname]