Summer Programming 2014 – Dev. Post 14
|
For the duraction of the project I’ve had some trouble with getting the sprites to be drawn the way I want them to. I’d load an image but all I got was a giant white rectangle, today I finally had the time to sit down and fix this and it turns out it’s all because of what I tried to do with the Sprite class. To reiterate: I made a personal variant of the sf::Sprite class simply called Sprite, which then inherited from sf::Sprite. I thought that this would be enough to draw the sprite but it turns out it didn’t work as intended and while it drew something it only had access to the sf::Drawable class’ public variables and couldn’t draw an image of any kind. I fixed this by making the sf::Sprite simply a part of the Sprite class instead of inhereting from it and the problem wa ssolved. So now instead of drawing a giant rectangle the game draws three smaller ones (because that’s the sprites I am willingg and able to makefor this game). Otherwise I’ve been making headways for the standard pickup object that enemies will drop when defeated, simply put: they will change color, rotate at different speeds and fall in different directions. I’ve also finished a simple HUD for the game info to take place on. The HUD will display, current score, current High Score and current lifes remaining. |