Popups or notifications and finally some text that tells you how much things cost.

Once again I haven’t worked enough on one artifact to really write about it enough to fill a blog of 400 words. So once again I’ll just write a bit of what I’ve done this week.

I haven’t really done anything very complicated this week either, but I can start with the one that I worked the most on, a popup box, or a notification-box if you will. That is a small box that pops up in a corner of the screen that shows you some information of (hopefully) useful information.

I created a popup-box where you originally were going to take in a string as a parameter and that text will be displayed on the popup. It still does this but I never use it at all. Because we realized that there was only one popup we actually needed and that was to tell the player that they can hold tab to view the customization-screen when the player has earned enough points so buy something for the first time. And nice we didn’t need more than one we decided it was slightly easier if we just put the text on to the sprite itself this time. The code to use custom strings is still there so if we decide that the game needs more popups it will be very easy to modify the code a little bit to allow that.

The popup has a very simple behavior, it spawns outside the screen when the player have gathered enough score to upgrade something (1000 score) and moves in to the screen in a fast pace, if you click on it, it  fades away instantly at the same time as it moves a bit down and right, the same thing happens if you let it be for a little while.

I also added small squares with text that shows how much each piece of equipment costs, these are just made of sf::RectangleShape and sf::Text, there aren’t really that much else to say about them…

Other than that I created the graphics for the popup since we didn’t have any artist here yesterday, and I needed it now, I was fairly happy with it, but I’m probably going to make some small modifications to it. I was also tasked with creating a weapon in side view for one of our dead bandits, and some sliders for the options-state that Viktor worked on.

Well that’s 400 words, so that is enough, bye.

Oh, and here is the popup before I added text:

Image

Filed under: Uncategorized Tagged: 5SD023, 5SD033, Campus, design, game, gotland, Laban, Melander, programming, Universitet, University, Uppsala