Grip or Slip

2019 · Team of 2

2D platformer where you have to swap between the two levels to complete the game, made with C++ and SDL.


Gameplay video

Description

This project was made for a university subject in a team of 2.

The requirements for this project were to make a 2D platformer with two levels and two types of enemies.


Role

We didn't have specific roles during the development of the project, instead we both did a little bit of everything.

In the next section I have detailed the features I implemented for this project.


Features

Level Design

The levels were designed taking inspiration from Super Mario Bros games, the levels are divided into areas were you can rest and areas were you have a platforming section or an enemy encounter. This is done so the player can have a moment to stop and think about the next set of actions they have to perform.

There are coins around the level to help guide the player and also give an extra challenge if you want to collect all of them, as some are in difficult to reach areas.

Coins

As interactable objects there are moving grids you can grip and move inside, they provide a small challenge forcing the player to time the jumps with the movement of the grids.

Grids

One idea I really liked was to have both levels interconnected and you had to switch between them to get keys and open locks. To achieve this I added the 'Special Boxes' which are boxes that when you latch onto them they carry you in its path.

In each level there are the same number of boxes and they are linked one to one, when one of them moves the other will move aswell in its own map and when you change the level it will appear in its new position.

Map Transition
Entity System

The entity system is a factory class that manages the creation and deletion of all the entities and ensures they are updated accordingly.

The entities are the following:

- Player: the player controled by the user, including its movement and interactions: jump, wall-jump, dash and grip.

Dash Attack

- Coins: coins you can collect that give you points.

- Grids: moving grids you can grip to advance the level.

- Enemies: there are two enemies in the game, one is grounded and the other flies. Its AI system is very straightforward: if the player enters in its range it will persue them, if not just stay put. A little detail I added for the land enemy is that when it dies, its corpse will stay there.

Enemies

- Special Boxes: keys to advance the level, interconnected with the boxes in the other level.

Special Boxes
Scene Manager

The scene manager is in charge of loading and saving the level data, and transitioning from one map to another.

The levels were done in Tiled and the maps loaded using xml.

Level 1
Level 2
UI System

The UI system is in charge of all the UI elements in the scene, used for creating all the menus and the HUD.

Main Menu Pause Menu

Music and SFX

Using SDL to manage the audio files, I added a theme for the main menu and another one for the levels. I also added some sound effects for the player interactions, like picking up a coin, killing an enemy or dying.