Oh boy, it’s been a while since my last blog update! I was kindly reminded today that it’s been around 2 months since my last post! In short, I’m still working on my upcoming project, and I’m working on a big update to my first game “Leyenda”. I’m also farming, which has actually eaten up most of my time. That and Diablo III.
Despite the lack of free time to invest into game development, I did manage to work on a problem I’ve encountered when working with tile maps, and I think I’ve come up with a potential solution.
But first, what is a tile map? In short, a tile map is a way for game developers to take a small image, break it into parts and to reuse those parts over and over to create a much larger image. As an example, a tile map engine can turn this:
Texture pack used to create desert themed maps
Into the image show below by reusing and stitching together the “tiles” within the texture pack:
Tile map composed out of images from a texture pack.
If you’ve played a 2D video game, odds are it probably used tile maps to create the world your character explored. Mario, MegaMan and Pokemon are (probably) good examples. This method has many advantages, such as keeping the size of your assets small, improving rendering performance, and allowing for basic collision detection and scripting events to be easily implemented. It seems like an all around sweet deal, and so I started playing with a tile map editor and tinkering with code with the eventual goal of setting up an engine I could use to create a side scrolling adventure game.
As seen in my last post, I’ve managed to get collision detection, basic physics and player controls, and the tile map all playing nice together. The only problem is that it’s ugly. Or at least it was:
Since I’m aiming for something that looks a little more organic, the blocky appearance of the level and the pattern appearing in the grass texture was not acceptable. My solution is the following:
I create a tile map out of a simple texture pack. In my case, I only use two different tiles. One is for normal ground and the other is for one way platforms.
A simple tile map
Then, using the magic of photoshop, I can create a second image that I superimpose over the tile map above in order to enhance the appearance of the level. The example below shows a character running through the level shown above after the photoshop treatment. You’ll notice that the far left side of the level still looks like it’s made out of tiles:
This allows me to use most of the benefits of a tile map, while still giving the game a more organic, hand drawn look. I say “most of the benefits” because I’m still going to have to draw entire levels and save them as massive bitmaps. This will take up a lot of valuable space (I’m trying to keep the game under 50mb) and so it may turn out not to be such a great idea after all. However, I like the way it looks (or could look, this was a quick test an so I didn’t spend a lot of time drawing the level) and so I plan on playing around with the idea a bit more to see how practical it is.
Oh, and in case anyone is curious, I’m using a general purpose tile map editor called “Tiled” as a level editor. It’s super flexible and free, so if you’re at all interested in tile map editing you should check it out!