2D Level Design

Started by
5 comments, last by eXperto 22 years, 7 months ago
Any ideas for 2D level design without using tiles? i don''t want my level designer be tile based that uses repeated blocks like mario or whatever... i want my game to be something like earthworm jim.... anybody has any idea how they made their levels in this game?
-=eXperto=-
Advertisement
Earthworm jim is a tile based game just like every side scroller. Only difference is the tile sizes vary unlike games lik mario.
Is it? so how do they define the allowable path for the movement of characters?

What about worms2 level editor? making a huge jpeg that contains the wole level then apply some processing on it? is this good for 2D side scrolling games with the 3D style of earthworm jim?
-=eXperto=-

You can set up an attribute layer, separate from the graphics layer, which defines how your character can interact with the map. You could set up the following values:

#define ATTR_SOLID (0x01)  // solid tile#define ATTR_UP_45 (0x02)  // angled up at a 45 degree angle#define ATTR_DN_45 (0x03)  // angled down at a 45 deg angle//// etc ...// 


Then if your character is walking on a tile with attribute 0x02, you''d move him up at a 45 degree angle while he walks. You could set up 22.5 degree angle tiles too, or whatever.

This would reduce the illusion that you are in a blocky tiled world.

Plus remember that your attribute layer can be different dimensions than your map. Say your screen is 20x15 tiles big, you could make the attribute layer have 40x30 tiles per screenful, so each graphic tile would be overlayed by 4 (2x2) attribute tiles.

Alternately you could define your solid surfaces and whatnot by actual polygonal areas, although this would be more complex.

For small levels (only a few screens big) a JPEG file is a good way to go, then overlay that with attribute information, however, for a big platformer game (like EJ) using a big JPEG or multiple JPEG files might become unweildy in size. Plus it is more difficult to make changes.
Ok! attribute layer is really a good idea... but i don''t think that i''ll define these attributes by hand for each tile... right?
is there some automated method or something that can let me define these attributes only on the surface edges (platforms) tiles on my map?
-=eXperto=-
The map should be indecies of tile definitions.

You can create all of your tiles in a set like so: (psuedo C)

Tile
{
(attributes go here)
}

Tile tileset[256];
tileset[0] = empty tile
tileset[1] = brick wall
tileset[2] = brick ramp
tileset[3] = water

If you keep the tileset to a max of 256, all indecies of your map can be kept in a single byte.

typedef BYTE Tile::Index;

Tile::Index map[Height][Width] =
00000000000000000
00000000000000000
00020000000000000
11113331111111111

See?

(And tile sizes usually and should always be the same size... if you want bigger tiles, build them up from smaller tiles.)

travois

This topic is closed to new replies.

Advertisement