top of page
Animator.png

Bob the Intergalactic Bog Cleaner

Forsbergs School Project

2D Top Down

C++ / SDL

Team: Solo

Duration: 2 weeks

Role: C++ specific coding practices, references, pointers, header files, sprite sheet animations

C++

Animator.png

Function Pointer

FUNCTION POINTER points to a function rather than data. m_pPlumbingStartCallback points to a function that takes in "m_CurrentTriggerID" as an argument and determines if the player is already plumbing.

RunTime Polymorphism

This is used several times in the code to allow how a method is implemented to be determined at runtime. In these cases, I have allowed for overloading of several methods depending on the arguments passed in at runtime.

Simple DirectMedia Layer (SDL)

End screen.png

SDL gives low-level access to graphics hardware via OpenGL as well as keyboard, mouse, and audio. This allowed basic use of sprite art in games, from the GUI to the pop-up animated GIFs to the game animations.

Sprite Sheet & Animation

Plumber.png

Animation in this instance is handled in code passing in the location of the image on the sprite sheet rather than clipping out individual sprites. Various animations in the game were handled this way, from the player character Bob, to the overflowing green slime.

Design Pattern

Singleton.png

This game uses a singleton design pattern over several classes to ensure that only one instance of each class exists and to provide access to that instance. In this case, the singleton pattern is implemented as a template class that other classes inherit from, which guarantees that only one instance of each class exists in the game. InputHandler, RenderDevice, TextureHandler, and Application are all singletons that inherit from the Singleton class.

Useful Links

bottom of page