top of page

Game Engine Code Samples

Vectors 

My own Vector.h and .cpp class that the player and enemies use. This is mainly to control movement and normalize it as well as firing bullets:

G_E_Pic_1.png
G_E_Pic_3.png

Implementation of players shoot origin and aim direction (inside of game.cpp):

G_E_Pic_4.png

Bullets

The bullet.h and .cpp which adds the bullet with collisions to them which are destroyed when going oput of bounds from the game window.

Bullet implementation in game.cpp (shoot cooldown, adding bullets when fired and delete bullets when colliding with window bounds):

G_E_Pic_10.png
G_E_Pic_9.png
bottom of page