Debug Text Render

January 4, 2010

The result of the DebugFont renderer.

When working on games, I often find it useful to be able to quickly and easily display text strings on the screen for debugging purposes. A long time ago I wrote a simple little piece of code which could draw text onto a bitmap, and without having a dependency on anything else - it doesn't use any other classes, functions or libraries, and it doesn't need any external data - the font bitmaps are included in the source file, as a static array. This system, in all its simplicity, have turned out to be very, very useful, and I've used it for most of my stuff for the last 10 years or so.

I recently spent a little time cleaning it up a little, and thought I'd release it to anyone who's interested. As usual, it's public domain, so use it in any way you like.

You can download the DebugFont source code here.

To draw text on any bitmap, you simple include "DebugFont.h", and do something like this:

DebugFont font;
font.Blit(pixelDataPtr,w,h,20,30,"My text"); // 20,30 is the x,y position of the text

Where pixelDataPtr is a pointer to the pixel data of the bitmap we want to draw onto, and w and h are the width and height (in pixels) of that pixel data area. The pixel data of the bitmap to draw on, can be 8-, 16- or 32-bit data.

As I finish the refactoring of more parts of my Pixie game engine, I'll try and post more of these little useful, stand-alone code snippets which can just be dropped into any project - let me know if you find any of them useful :-)

2 comments      Write a comment      Bookmark and Share



Complete List of Blog Entries

New Characters for Jade Figurines

September 16, 2009

I've been making some more characters for my Jade Figurines game recently, so just thought I'd post some pics of them, along with some close-ups of some of the characters which is already in the game:

First up, a captain for the Watch, to go along with the guards - a bit tougher, a bit meaner: 

Captain of the WatchWatchman

Also, another wizard (the story I have in mind calls for two of 'em): 

The new wizard The old wizard


I'm also going to have elves in the game. Now, elves are quite different from humans, and have their own agenda - you can never fully trust them, and they are as often an ally as they are your enemy: 

An elf 


And finally, I'm having Orcs as well - but not your ordinary "hordes of darkness and evil" Orcs, but rather a wild and primitive people, proud warriors who fights fiercely and have their own culture and values, but are not outright evil: 

A fierce Orc 


There's more to come, of course, but these are the latest additions...

4 comments      Write a comment      Bookmark and Share



Complete List of Blog Entries

Dungeon Master-style game

August 29, 2009

The last few days, I've been experimenting a bit with art for a type of game I've been wanting to make for quite some time: a game in the style of good old Dungeon Master. Did you use to play it, or other similar games? If so, I'd like to hear about what sort of things you remember from it, what made it fun and what would make you want to play a new game in the same style :-)

Anyway, here's a few examples of what my game will look like:

My "Dungeon Master" style game - A nasty troll

My "Dungeon Master" style game - Spider! I hate spiders...

My "Dungeon Master" style game - This dragon is not happy to see you...

36 comments      Write a comment      Bookmark and Share



Complete List of Blog Entries

Video: Jade Figurines

August 24, 2009

I've put a video on youtube of the Jade Figurines game I made recently. The video doesn't really do the game justice though (it's much smoother than in the video), so you're still better off downloading it.

If you have any thoughts, suggestions or ideas, I'd love to hear them.

1 comments      Write a comment      Bookmark and Share



Complete List of Blog Entries

48 hour Sidescrolling RPG Competition

August 6, 2009

RPGDX Sidescrolling RPG competition

RPGDX is having another one of their friendly mini-competitions, where you're trying to make games (mostly RPGs) in a limited time period. The competitions are just for fun, and you don't win anything besides the bragging rights... and the winner is voted by the participants.

This time, the theme of the competition is to make a sidescrolling RPG in 48 hours, and is set for August 15-16. Basicly, you start when you wake up on saturday morning, and try to finish something before going to bed at sunday night, and you do as much as you want to in between. You can use any engine, tool or language you like, and for any platform.

As 48 hours is a rather short time to make a game, it usually results in quite small games, and it is important to stay focused. It is a great learning experience: having to make quick decisions, stick to them and not be too particular with what you do - the important thing is to have something playable in the end.


More details about the competition can be found here: http://forums.rpgdx.net/viewtopic.php?t=2237

0 comments      Write a comment      Bookmark and Share



Complete List of Blog Entries