/42so_long

a small 2D game with minilibx

Primary LanguageC

42 result

code-size last-commit

Table of Contents
  1. Summary
  2. Project Structure
  3. Environment
  4. Compile
  5. Execute
  6. Example
  7. Links

So Long

And thanks for all the fish!

This project is a small 2D game with MinilibX. You'll learn about textures, sprites and tiles.

Summary

This project is a very small 2D game. It is built to make you work with textures, sprites. And some very basic gameplay elements.

Program name so_long
Makefile all, clean, fclean, re, bonus, test, debug
Arguments a map in format *.ber
External functs. - open, close, read, write, printf, malloc, free, perror, strerror, exit
- All functions of the MinilibX
Libft authorized Yes
Description a small 2D game where a player escapes map after eating some collects before leaving the place.

Project Structure

./
├── libs		# libraries: libft, MinilibX, Get-Next-Line
├── includes 	# c header files
├── src			# c source files
├── image		# game textures
├── maps		# game maps
├── Makefile
└── README.md

Environment

  • MacOS 11.4(Big Sur, Intel)

Developed and tested in this environment.

Compile

Mandatory

To compile the mandatory version, run the lines below.

$ git clone https://github.com/srngch/42so_long
$ make all

Bonus

  • Movement count is displayed on the game screen.

To compile the bonus version, run the Mandatory part above then run the following additional lines.

$ make bonus

Execute

Run compiled executable file in the root folder.

$ ./so_long [map_filename]

# example
$ ./so_long maps/10x10.ber

Controls

  • ESC or Q to exit a game
  • ARROW KEYS or WASD to move

Example

capture

Links