Namespace and delay

Completely lost any work yesterday due to brother’s birthday, not good.

Today i worked on getting a method of handling inputs, my plan was to use the system from the example task we did during classes, however it turned out to be more trouble than i had expected. The method uses one variable for each button or mouse cursor position which is set in a function named notify. the problem was that the notify function took an argument of the type OSEvent which i had no idea what it was. I realized that the game state class would need to inherit from a class named OSEventListener in order to use the argument type. After figuring out how to make a class inherit from two other classes (Putting a , between them. Incredibly complicated.) i still couldn’t call the OSEvent variable type. As it turned out after a lot of trial and error, the original code from the class had placed this segment in the abstractgame class which declared different namespace. In the end, the solution to my problem was to write the type name (helium::OSEvent* event) instead of just (OSEvent* event).
With that working i reused the notify function which uses the OSEvent to determine what buttons are currently being pressed and set the different variables accordingly. Right now it uses the same specifics as the example but it can be changed later depending on which keys we assign to what.
Next i reworked the update function of the gamestate, rather than just loop through every object in the game and calling their individual update functions I gave the game object manager a function which gets the list of objects. It then checks the objects to find the player objects and will call a function for rotating left or right. There will most likely be a static cast function done there as well to make each player object respond to the right inputs based on an internal variable unless i can think of another way to do it.
Finally i added a very simple collision checker to the collision manager which simply uses the radius of the bounding volume around each object to determine if they are close enough to collide with each other. Since the player object is the only object which inherits from the game object class rather than being a game object class i gave it a static_cast function in case i would need to use any specific functions, but i might just add a handlecollision function to the game object class.

Tomorrow is nothing special other than week planning and a lot of work. I swear, if we need to write a report of this before the hand in…