Monday 7 January 2013

OpenTTD 32bpp Part 1 - Making a Massive Graphics Update

If you didn't know OpenTTD is an open source remake of the classic "Transport Tycoon Deluxe" by Chris Sawer, the maker of Rollercoaster Tycoon. It still has a huge cult following! Unfortunately the original Transport Tycoon graphics, which can be used in OpenTTD, look slightly dated (1994/5)...

 The original graphics

Originally OpenTTD relied on the graphics from the original game. In an effort to make the game fully free to play the graphics were redrawn from scratch, a massive project that took nearly 3 years to finish. Unfortunately these were subject to the same technical limitations as the original Transport Tycoon graphics:
 The free graphics replacement

The biggest problem with these graphics is their size. The game was originally designed to be played on a screen only 640x480 pixels in size. Modern screens (like an HD display) are nearly 3 times wider/taller with 9 times the area. In an effort to make the game more playable extra zoom levels were added: now the view can be zoomed in 4x further, but the result is not pretty:
 I can see pixels!

The solution? Redraw all the graphics. Again. The result is totally worth it though:
One retina display-safe set of graphics.

OpenTTD uses a (now quite outdated) method for displaying game graphics in which every in-game object is a single image called a sprite, like this:
 
One construction stage of one building.

In some ways this makes a complete, high resolution, graphics replacement is simple; all you have to do is draw the big brother of each sprite:
The same sprite, 4 times larger and with better colour depth and full transparency.

While this this sounds simple it is still a mammoth task. There are currently 11949 sprites (11949 separate images) required for OpenTTD. These cover all the objects, buildings, vehicles, industries, etc. to cover all the four different world environments you can play in... Some of these don't need to be replaced (like the sprites used for the fonts) but it is still a huge number of images.

So could I possibly go about doing this? In short, automation and 3D rendering.

Continued here: OpenTTD 32bpp Part 2 - Moving to 3D

Software featured:
OpenTTD: The game!

No comments:

Post a Comment

Note: only a member of this blog may post a comment.