Codehead's Corner
Random ramblings on hacking, coding, fighting with infrastructure and general tech
Posted: 19 Dec 2015 by Codehead
1 minute read

After ignoring the project for many years, I still get messages from people who use and enjoy Codehead’s Bitmap Font Generator. It’s great to hear the feedback and I’m glad to see that the tool is still useful. However, I don’t have time to update the code and add the features that people want.

It seems that rather than letting the code fester and fade on my HDD, it would be better to set it free and allow people to pull it apart, laugh at the warty bits and hack their own features into it.

So I’ve pushed the code to GitHub under the BSD 3-clause licence.

Enjoy! (and please don’t laugh at my code too much)


Categories: Projects CBFG
Tagged as: #Font #C
Posted: 17 Mar 2015 by Codehead
3 minute read
One of the big problems OpenGL runs into after you’ve got your first few polygons flying around the screen is the lack of a standard method for generating text within the API. A few techniques have evolved to tackle the problem: Pre-generated string textures The simplest and fastest method, a texture is pre-built for each piece of text that needs to be displayed. This is quick to render at run time, but isn’t very flexible or efficient.

Categories: Projects CBFG
Tagged as: #OpenGL #Font
Posted: 21 Jan 2009 by Codehead
1 minute read

Jazzhands Logo

TotemBall is a free XBox Live Arcade game, only downloadable by Xbox Live Vision camera owners.

The game requires the player to stand in front of the camera and wave their hands around to control the on-screen action. Anyone who has played the game for more than 2 minutes will know that your arms begin to ache very quickly, stopping you from playing the game for very long.

My solution is JazzHands, virtual hands for your computer. Simply point the LiveVision camera at the JazzHands window and control TotemBall using the cursor keys.


Categories: Projects
Tagged as: #C #OpenGL #XBox360
Posted: 12 Oct 2006 by Codehead
2 minute read

I have written a few wrappers and objects for OpenGL during the development of AMBER. The first was a general OpenGL wrapper. This used the top left of the screen as the origin for orthographic projections, mainly because I was used to it being there and it avoided problems with mouse coordinates.

Next came the CBFG text class. This was intended to be dropped into other people’s code, so I used a bottom left origin as seems to be standard in OpenGL.

More recently I’ve incorporated my GUI class into the GL wrapper and bolted my text object onto it to provide textboxes, lists, etc…

This is where the problems began, the GL class and the GUI object use the top left as origin and the text class uses the bottom, so all the text in the controls was upside down.

I’ve rewritten the GL class and GUI class to use the bottom as the origin as this is the OpenGL way. However, it seems strange that every other system I’ve used treats the top of the screen as the Y axis origin. Why does GL have to be different? Is there any gain to be had by doing this? Or could I just fudge the projection matrix to use the top as the origin?

Ah well, it’s done now, I may re-visit this during optimisation, but that’s a long way off.


Categories: Projects AMBER CBFG
Tagged as: #OpenGL #Rant
Posted: 22 Sep 2006 by Codehead
1 minute read

The underlying mechanism of the actual combat within AMBER is starting to come together. Not much to see, so no eye candy I’m afraid. However, it does bring the prospect of a playable version closer.

I’ve ended up using a huge switch/case statement to break the turns down into phases, beyond even the Initative, Move, Attack, Resolve and Heat from the original game. I’m not sure if this is the most efficient method, but it allows me to work on individual states without affecting all the others, plus extra states to be added in easily.

If I can just stay off the eye candy for the time being, I should make some good progress.


Categories: Projects AMBER
Posted: 20 Sep 2006 by Codehead
1 minute read

AMBER Logo
AMBER Subtitle

AMBER is a long running personal project that aims to produce a 3D multiplayer version of the Battletech board game.

The project started in 1999, and has been developed with Borland C++, MS VC++6, VC.NET, Bloodshed’s Dev-Cpp and Visual Studio. Target platforms have included MS-DOS, Windows GDI, DirectX and OpenGL.

The current version is being developed for Windows with OpenGL and may be ported to Linux.

To say that AMBER is a slow moving project is an understatement. I have a busy job and a young family. Development tends to happen in random chunks whenever I can get 5 minutes to myself.


Categories: projects amber
Posted: 23 Jun 2006 by Codehead
2 minute read

Some progress on the in-game model handling….

Skeletal Animation!

The previous in-game model format was MD3. The format uses snapshots of the mesh for each frame, creating huge model files which require the vertex normals for each frame to be calculated at startup. The normal calculations alone took 30-45 seconds per model. The files were over 1Mb each and had a huge memory footprint. It also made the workflow for modelling a nightmare and very much a one way process.


Categories: Projects AMBER
Tagged as: #C++ #OpenGL #DevBlog
Posted: 17 Jun 2006
1 minute read
The locust model has been converted UV mapped and skinned. (Click for a bigger pic) Joseph’s original is on the right. My skinned, lowpoly version on the left. Whad’ya think? You can download the mesh from the Mech List.

Categories: Projects AMBER
Tagged as: #DevBlog
Posted: 14 Jun 2006 by Codehead
1 minute read

I’ve decided to create this dev diary as a blog rather than keep updating the ‘News’ page. It’s easier for me to keep this up to date than to keep adding stuff to a webpage.

Currently, AMBER is going slower than ever. I’ve re-jigged the GUI system and I’m in the middle of developing a content manager to ease loading resources into the game.

On the eye candy front, the Locust and Warhammer models are currently getting their UV maps sorted out.


Categories: Projects AMBER
Posted: 6 Jun 2005 by Codehead
2 minute read

GLSandbox Logo

GLSandbox is a tool that I developed to help out on my OpenGL projects. I seem to spend a great deal of time tweaking blending parameters and fiddling with alpha testing to get things to look right.


Categories: Projects GLSandbox
Tagged as: #OpenGL
Site powered by Hugo.
Polymer theme by pdevty, tweaked by Codehead