Skip to content

develop a simple top-down game using the C programming language with a graphics library called MiniLibX.

Notifications You must be signed in to change notification settings

Uchimann/so_long

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Purpose of the Project

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.

Project Activities

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.

With this project, students will be able to find answers to questions such as

  • 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?

Keys for qwerty keyboard ⌥ :

[FORWARD] = W

[GO_LEFT] = A

[GO_RIGHT] = D

[BACKWARD] = S

[EXIT] = ESC

How to build a map 🗺 :

'0' = SPACE

'1' = WALL

'P' = PLAYER

'E' = EXIT

'C' = COLLECTIBLE

How to launch ?

Just do make and execute with ./so_long [mapname]

About

develop a simple top-down game using the C programming language with a graphics library called MiniLibX.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published