Project maintained by ch0m5Hosted on GitHub Pages — Theme by mattgraham
Get Hooked by ch0m5
This is a university project made by a CITM (Centre de la Imatge i la Tecnologia Multimedia) student of the TTC (Talent Tech Center) in Barcelona, in which I made my own 2D platformer in C & C++. I also used the Tiled Map Editor software, and the SDL and pugixml libraries.
Installation
No previous installations is required to play the game, just download and execute the .exe file Get Hooked from releases.
The game features several modules that manage the entire game workflow, like textures, renderization, window setup, fonts, etc.
Both entities and GUI elements are managed by a detailed object tree and modules that handle their logic, fabrication and destruction.
Object polymorphism has been exploited to maximum possible efficiency, meaning that there’s several layers so that each class has only has the members and methods that it really needs so new types of objects with similar characteristics can be created with ease. For example, a PhysicalEntity has all data related to colliders, while his child Creature has “alive” data.
All modules, entities, and GUI elements follow a similar step-by-step workflow. The last two have a second workflow layer, where the conditions like position, movement and inputs are read, a new state is decided, and then all changes are applied. Inputs can come from player or other sources, enemies’ “inputs” are based on the player’s character.
All entities are related to the player by radius. Attack, movement, pathfinding, and their logic workflow are conditioned to the player to skip uneeded processes, like updating if far away from the player.
User Interface Elements have a parent and children class so they can be linked through each other for different functions, like cursor dynamic moving or positioning.
The Button template class is an image with a function pointer which return and parameters can be decided on the creation of the element. This makes the creation of buttons with different functionalities very easy. A Button is something clickable that calls a function on press, and that’s it, while its child ActionBox includes 4 sprites, one per button state.
A delta time is embedded into the game, and allows to change from a cap of 30 fps to unlimited, this applies to both logic and animations.
Innovation
Living entities accelerate and deaccelerate when moving, on ground they deaccelerate automatically.
Entities that are outside the player activation radius do not update.
Player can attack, a collider is created mid-animation when the attack is visually being made, set by a “start” and “finish” frames.
Player collider changes shape and position depending on his current animation.
Player can crouch to evade things that could hit his head area.
Player slides with a different deacceleration when trying to crouch while moving.
Player can jump in the air once making a somersault.
Enemies have a detection and attack radius which they use to input movement and other special attacks.
Enemies are briefly stunned if still alive, backing off from the player. If they die, they dissapear after a set time.
Button is a template class with a function pointer that allows easy creation of new and different buttons with different functionalities, as you can decide which return and parameters will their allocated function use.
Some Original Debug Functionalities.
Gameplay Showcase
Disclosure
We do not own any of the sprites, tilesets or music presented in this game. Authors credited below.