The "so_long" project at 42 School is a programming project designed to familiarize students with creating small 2D games using the MinilibX graphics library.
The So_Long project is an introduction to 2D game development for students at 42. Using the Minilibx library, you will create a 2D game that includes:
4-way character movement (W, S, A, D)
A move counter
A map that must be a rectangle with a valid path
A variety of restrictions/conditions to complete the project
Here are some additional details about the project:
The game must be developed using the C programming language.
The game must use the Minilibx library for graphics and input handling.
The game must have a start and end point.
The player must be able to move around the map.
The player must be able to collect objects on the map.
The player must avoid obstacles on the map.
The game must have a win condition and a lose condition.
From the start, I wanted to move away from the original project and explore a different path. My ambition was to create a top-down hack'n slash game that promised a fluid and enjoyable gameplay loop for the user. However, the time constraints forced me to favor a more familiar approach, while still keeping the two key points mentioned above.
This is how this "remastered Mario" was born, taking up the iconic gameplay loop of this legendary game. You start on one of the game's maps, with the mission of collecting as many coins as possible. But be careful, you may not be alone on this treasure-filled path!
I opted for a 2D oblique view, offering a dynamic and immersive perspective. The graphic elements were recovered from the Kenney website (free assets) and then reworked in Photoshop to integrate perfectly with the Minilibx environment.
In order to enrich the gameplay and bring an additional challenge, I introduced high structures and enemies. The player will thus be able to jump to overcome obstacles or dodge hostile monsters.
(The UI outlines (heart, coins, and step counter) are in black because my WSL has transparency issues with Minilibx, which will work correctly once on MacOS. I'm sorry again for this inconvenience, which bothers me slightly.)
Breadth-First Search (BFS) algorithm: Used to determine if an exit is possible from the player's position on the map.
Jumping ability: The player can now jump and descend more quickly by pressing the down arrow while in the air.
Various animations: Added animations for monsters, coins, and the player.
Player HUD: Displays information such as health, coins collected, and move count.
Basic AI for monsters: Monsters follow a simple path and have a hitbox that can damage the player.
Player-centered camera: To create a sense of progression in the game.
Improved hitboxes and asset clipping: To prevent collision issues and improve the overall look of the game.
Win and lose screens: To indicate the end of the game and provide feedback to the player.
Scaling assets to 100x100: To reduce the player's X-axis and provide a better sense of movement.
# Clone this repository
$ git clone https://github.com/HaruSnak/So_Long.git
# Go into the repository
$ cd So_Long
# To compile the program
$ make
# Execution example
$ ./so_long {NAME_MAP}.ber
# Allows you to do a complete cleaning of your construction environment
$ make fclean # Or make clean
Requirements for Linux
MinilibX only support TrueColor visual type (8,15,16,24 or 32 bits depth)
gcc
make
X11 include files (package xorg)
XShm extension must be present (package libxext-dev)
Utility functions from BSD systems - development files (package libbsd-dev)
e.g. sudo apt-get install gcc make xorg libxext-dev libbsd-dev (Debian/Ubuntu)
.
βββ πso_long
βββ Makefile
βββ πassets
βββ πheart
βββ heart.xpm
βββ heart_empty.xpm
βββ πmonsters
βββ monster_b.xpm
βββ monster_w.xpm
βββ πplayer
βββ ply_base.xpm
βββ ply_base_dps.xpm
βββ ply_base_r.xpm
βββ ply_jump.xpm
βββ ply_jump_r.xpm
βββ ply_walk.xpm
βββ ply_walk1.xpm
βββ ply_walk1_r.xpm
βββ ply_walk2.xpm
βββ ply_walk2_r.xpm
βββ ply_walk3.xpm
βββ πtiles
βββ bg.xpm
βββ cloud_center.xpm
βββ cloud_left.xpm
βββ cloud_right.xpm
βββ coin.xpm
βββ coin_r.xpm
βββ exit.xpm
βββ flag.xpm
βββ grass.xpm
βββ grass_center.xpm
βββ grass_l_c.xpm
βββ grass_left.xpm
βββ grass_r_c.xpm
βββ grass_right.xpm
βββ other_1.xpm
βββ other_2.xpm
βββ other_3.xpm
βββ platform.xpm
βββ sign_right.xpm
βββ start.xpm
βββ wall.xpm
βββ water_down.xpm
βββ water_up.xpm
βββ πui
βββ eight_coin.xpm
βββ five_coin.xpm
βββ four_coin.xpm
βββ main_menu.xpm
βββ nine_coin.xpm
βββ one_coin.xpm
βββ seven_coin.xpm
βββ six_coin.xpm
βββ ten_coin.xpm
βββ three_coin.xpm
βββ two_coin.xpm
βββ walk.xpm
βββ πincludes
βββ πlibft
βββ Makefile
βββ πchar
βββ ft_isalnum.c
βββ ft_isalpha.c
βββ ft_isascii.c
βββ ft_isdigit.c
βββ ft_isprint.c
βββ ft_tolower.c
βββ ft_toupper.c
βββ πconv
βββ ft_atoi.c
βββ ft_itoa.c
βββ πgnl
βββ get_next_line.c
βββ πincludes
βββ libft.h
βββ πlst
βββ ft_lstadd_back_bonus.c
βββ ft_lstadd_front_bonus.c
βββ ft_lstclear_bonus.c
βββ ft_lstdelone_bonus.c
βββ ft_lstiter_bonus.c
βββ ft_lstlast_bonus.c
βββ ft_lstmap_bonus.c
βββ ft_lstnew_bonus.c
βββ ft_lstsize_bonus.c
βββ πmem
βββ ft_bzero.c
βββ ft_calloc.c
βββ ft_memchr.c
βββ ft_memcmp.c
βββ ft_memcpy.c
βββ ft_memmove.c
βββ ft_memset.c
βββ πprintf
βββ ft_conv_primary.c
βββ ft_conv_specifies.c
βββ ft_conv_suit.c
βββ ft_printf.c
βββ πput
βββ ft_putchar.c
βββ ft_putchar_fd.c
βββ ft_putendl_fd.c
βββ ft_putnbr.c
βββ ft_putnbr_fd.c
βββ ft_putstr.c
βββ ft_putstr_fd.c
βββ πstr
βββ ft_split.c
βββ ft_strchr.c
βββ ft_strdup.c
βββ ft_striteri.c
βββ ft_strjoin.c
βββ ft_strlcat.c
βββ ft_strlcpy.c
βββ ft_strlen.c
βββ ft_strmapi.c
βββ ft_strncmp.c
βββ ft_strnstr.c
βββ ft_strrchr.c
βββ ft_strtrim.c
βββ ft_substr.c
βββ so_long.h
βββ πmaps
βββ error1.ber
βββ error10.ber
βββ error11.ber
βββ error2.ber
βββ error3.ber
βββ error4.ber
βββ error5.ber
βββ error6.ber
βββ error7.ber
βββ error8.ber
βββ error9.ber
βββ map1.ber
βββ map2.ber
βββ map3.ber
βββ mini2.ber
βββ mini3.ber
βββ πminilibx-linux
βββ πsrcs
βββ πbonus
βββ πmonster
βββ monster.c
βββ πplayer_bonus
βββ player_coin.c
βββ πerrors
βββ errors.c
βββ πgame
βββ settings.c
βββ πmap
βββ draw.c
βββ path_include.c
βββ πparsing
βββ parsing.c
βββ path_bfs.c
βββ path_valid.c
βββ πplayer
βββ player.c
βββ player_animation.c
βββ player_collision.c
βββ player_gravity.c
βββ so_long.c
βββ πui
βββ hud.c
βββ main_menu.c
Write the build Instruction here.
You can optionally add a FAQ section about the project.
Below you will find the links used for this project: