Catnap Games

In-game video capture

Posted by Tom, 2009-05-26 (2 comments) Permalink Latest posts List of all posts

Fraps is nice. But it is really choppy on my computer when recording at full resolution. I need to be able to play the game at full speed and deal with encoding later.

I need to record game videos for two things:

1. Promotional purposes (Trailers, etc.)
2. As a reference for the audio guy - see www.catnapgames.com/blog/2… for details.

So I decided to do my own video recorder built into the game.

For that, I created a "proxy" input device that reads all mouse and keyboard input events, adds timestamps to them and writes it all into a file. This is only a few kilobytes of data when I apply GZip compression. Recording the input doesn't slow down the game at all.

Then I run the game again without actually touching the keyboard or mouse and instruct the input recorder to do the exact opposite of what it did before - read the input events from the file and inject them into the game's event queue. Meanwhile the renderer saves each rendered frame into a separate image file.

Finally I run ffmpeg to encode the image files into a single video file.

Optionally I can record audio as well using Audacity and add it to the video using VirtualDub.

Most of this is done automatically via the command line. I get a nice compressed AVI file at the end that I can upload to YouTube.



Font aliasing problem solved

Posted by Tom, 2009-05-23 Permalink Latest posts List of all posts

I just found out a way to fix the font aliasing problem I wrote about a few days ago (here: www.catnapgames.com/blog/2…)

The font rasterizing utility I'm using, BMFont from Angelcode, writes the images as PNG files with transparency. The problem is that somehow, the antialiasing that BMFont does actually makes some of the fonts' pixels very DARK.

So the solution to this is to open the resulting PNG in Photoshop and crank up the brightness. It doesn't affect the transparency but makes the edges more visible and the resulting text looks much more full and solid.

Before:



After:



The fix:



In-game GUI design

Posted by Tom, 2009-05-21 Permalink Latest posts List of all posts

I felt it would be nice to have the main menu choices implemented as gameplay elements. For example In Braid, you start the game by guiding the character across the screen.

I tried to do an equivalent of that and while it first seemed that the mechanics of this game would make it super easy and natural, it didn't really work.

So I'm doing a fully featured GUI system for the game menus.

I have it working already but one area that's really bothering me is the quality of font rendering.

Compare this Photoshop mockup



to the working in-game dialog:



Another try with different settings:



Even after hours of tweaking, the fonts still don't look as good. I'm seriously considering having all the text pre-rendered in Photoshop and importing it as sprites, which is not a very nice solution but if it is the only way to guarantee nice looking text then so be it.

I may give the gameplay mechanics menu one more try later on but it would probably be just a "start the game" command, not the options and save/load menus.



Devastro screenshots

Posted by Tom, 2009-05-20 (3 comments) Permalink Latest posts List of all posts

Since I've replaced the Devastro page with a redirect to a simple minisite that doesn't contain any screenshots, I'm placing them here now for reference.


Mission objective: kill all enemy!


That'll teach them.


All violence is funny. You can't spell slaughter without laughter!


You hit things with your car and they die.


One of colonel Alligator Porter's vacation photos. In the picture you can see pv. Scumbag Higgins, sgt. Lightning Bolt Berg and maj. Barbecue Pablo enjoying a sightseeing tour.


Winter sports.


Mission accomplished, one man down.


What are we going to do about them?


Bring all the ammo you can get your hands on, because open season just arrived - big time!


"Maybe next time."

Oh and the minisite is here: www.devastrogame.com



Devastro reviewed by Bytten, scores 80%

Posted by Tom, 2009-05-18 Permalink Latest posts List of all posts

Here's the link: bytten.com/gamereview.php?…

I like the fact that they spotted many of the movie and game references that I put into the game. A very nice and thorough review.