The timing is right!

Well this week started off pretty badly with me feeling like I’ve got a flu. It turned out to be a little bit worse when I went to the doctor and now I have to pop pills that make me sleepy and stay away from people so I don’t spread the illness.
This couldn’t have come at a worse time either right before the alpha for the game is supposed to be done.
Needless to say I’ve not got much work done this week at all.

But I’ve been trying to keep busy now later in the week and will probably work on things I’ve missed during the weekend.
But today I’ve been working on the timer for the game it will be a part of the HUD so that you can see how long you’ve been playing.

Image

This is an example of the ingame HUD made by Ahmad Ali
The making of the timer started with me reading up on how and with what “tools” to do this task.
But I quickly ran into problems while making this at first I tried to use the sf::clock class which is not ideal for what I wanted to do. Instead I use sf::time which got me further along but soon enough I had a new problem which was how do I get a float into a string.
Float in a string.At first I simply tried to brute force it in there by just trial and error but after an hour or so of doing that. I decided to call up a friend who had apparently done this already and there is a built in function called “std::to_string()” this seemed to work.

But after I thought I was done with the timer and started the game up I saw to my dismay that it didn’t work.

And I will continue with the work on the timer into the small hours of the night today.

What’s still needed and planned for the HUD.

  • The currently held weapon or the noise maker. (The noise maker will be a two way radio that you can throw and it will attract the guards to it.)
  • If you are in possession of a key card or not that allows you to open locked doors.
  • And if you are carrying the mission objective a file that contains the secrets that you are after.

These will be pretty simple to add onto the game since it will just be different if() statements that say you can pick up the item or if you already carrying something in that slot.