C++ 2D Shooter project (Htbaa's Worklog)

Build on C++ with SDL and KrasEngine! RSS Feed
Worklogs > Htbaa's Worklogs > C++ 2D Shooter project > TrueType bug solved, scoring system added

TrueType bug solved, scoring system added

Finally, my TrueType bug has been solved. When testing I was always able to dump the new created image and save it to a bitmap. But weirdly enough on Linux the texts would not show when being put onto the screen.

It turned out that the bug that was causing this was quite an easy one. In my KEText class, after I generate my new surface that will hold my text, I put it in my own KEImage format and set the clipping area. The clipping area is a rectangle, containing starting position (x,y) and ending position (w,h). I assumed if they were not set that they would always be 0 (which is the top left corner of my surface). Under Windows this was indeed what was happening. However, under Linux the x and y were set at something like -18000. Which is a blank space.

After finally having that fixed I can now continue with my 2nd milestone :-).

So I searched for some free fonts at 1001 Free Fonts and inserted them in my game. In my KEText class I added text alignment so I can align my text to the left, center or right. Neat!

My scoring system has also been implemented. It uses a multiplier to multiply any new scores gained by killing enemies. This will add some differences in the high scores that are going to be submitted for the online leaderboards. This way a player will actually have to try to score some!

On the screenshot you will see the score, aligned to the left, and the multiplier, aligned to the right :-). Nothing much really but this was one of those things that kept me away from doing further development on this game.
(Posted on February, 24th 2008, 18:21)

Comments


DTM said:
groovy

online leaderboards, now that will be fun
(Posted on February, 24th 2008, 19:57)


Htbaa said:
I thought so too! But people will also have to play the game to make the leaderboards exciting. I gues I need a wider audience that BS for that :).
(Posted on February, 24th 2008, 21:21)

Post New Comment

You must log in or register to post comments.

Worklogs > Htbaa's Worklogs > C++ 2D Shooter project > TrueType bug solved, scoring system added
Copyright © 2005 Booleansoup.com
Questions? Comments? Bug reports? Contact us!