Tuesday, January 7, 2014

Day 12, Some progress

I have left yesterdays mess behind me and today it went very well.
I cleaned up some stuff from yesterday and added some new things.
I  added a ButtonObject class that will take care of objects that can be clicked with the mouse like Start/Quit buttons. I had to do some work on the InputManager as well to get it all to work.

So I worked on the StartState and added the buttons and functionallity.
The buttons can be clicked but with no sound or animation. The menu button don't lead anywhere at the moment.


I also added some functionallity in game. You now lose a life when the ball goes outside the screen past the player. When all lives are lost, (Start + 3 lives) the GameState is stopped and you are sent to a black screen for 3 seconds(Game Over screen...work in progress).
Same goes when you destroy all bricks and win. Then you're also sent to the black screen.

I want a text on the win and game over screen and a score and some other text so I started working on how to solve that. I read up some on TTF and SDL and decided to download that.
I made a Textobject class and a TextManager that works basiclly as the Sprite class and SpriteManager class from the school workshop with Tommi.

I also drew some new sprites that i will use for animation and also an instruction sprite.



Tomorrow I will probably keep working on getting text into the game.


No comments:

Post a Comment