Let’s talk about sets, baby

Let’s talk about geometry
Let’s talk about all the ways
To tessellate tiles sets
Let’s talk about sets
Let’s talk about sets
Let’s talk about sets
Let’s talk about sets

I considered doing this whole post to the tune of Salt ‘n’ Pepa’s Let’s Talk About Sex, but I’m just going to jump straight into discussing autotiling tilesets and how I’ve been using them in Not Without My Kittens.

Since I last wrote here, I took the game to an IDGA meet up which was really useful in watching people play the game and get their feedback.

We’ve also been making more levels and I started to think that maybe the 2.5D perspective with all levels painted as one giant background wouldn’t be practical if we wanted to finish making all the levels of the game any time soon. Did you hear about the guy who spent 13 years to finish making his game? Yeah, I don’t want to do that. It’s cool that he eventually finished it but I’d like to have made more than just Not Without My Kittens in 13 years from now.

So I’ll be using tilesets for most levels in the game that automatically tile (more about that later…) and for the occasional level I’ll do a painted 2.5D perspective with the background as one single image. For most levels though it’ll be 2D tilesets.

I could still use a 2.5D perspective if I made tiles such as these:

20090106_tiles_composite

That platform has a decorative layer of tiles in the background that has no collision with the player:

20090106_tiles_separated_top

20090106_tiles_joint_top

(The above images are from this blog post I was reading.)

The trouble with using a tileset like that though is that I don’t know how to make it automatically tile together correctly. Autotiling is great because it saves you from manually placing down every tile which can be very time consuming when there can be thousands of tiles in a room. If I have to make a choice, I’d rather use 2D tiles that autotile and have no diagonals, instead of 2.5D tiles that allow me to have diagonal platforms but don’t autotile.

For autotiling, I’m using a set of 47 tiles known as “The Blob”.

The following image from this site shows the pattern:

The Blob

(There’s more useful information about The Blob that I found here too

To get autotiling working I’ve been using this tutorial from Shaun Spalding. I recommend checking out his YouTube tutorial videos if you’re interested in learning how to use GameMaker.

The autotiling script he uses from what I can understand, is a series of nested if statements that looks at all blocks around each tile and determines which of the 47 tiles should be displayed in order for them to correctly connect together. I suppose the script could be amended to allow for more than 47 tiles to include decorative tiles that go in the background and give a 2.5D perspective, but for now I’m not sure how.

I can’t stress how nice it is to be able to place tiles down and know that they will connect up automatically. Each tile is really a sprite that contains the 47 possible images. When you place down a tile in GameMaker you only see the default tile in the editor:

NWMK_28-06-2014(inGM)

But then when you run the game, all the tiles connect together correctly:

NWMK_28-06-2014

If anyone has any ideas how that script can be amended to allow for extra background decorative tiles like this then I’d love to know!

There’s more information here on the GameMaker forums where the original autotile script was posted that Shaun Spalding based his script on.

If you’re using Unity, then Tidy Tile Mapper by Doppler Interactive is a neat autotiling system to use for that platform.

For now I’m just going to keep making more tilesets in the 47 tile format of The Blob, and if I find out a way later on to amend the script in GameMaker to have more than 47 tiles then I can adjust my tileset sprite sheets then.

This entry was posted in Games, Not Without My Kittens and tagged , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s