Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

eXperto

2D Level Design

This topic is 6307 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Earthworm jim is a tile based game just like every side scroller. Only difference is the tile sizes vary unlike games lik mario.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster

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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster

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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!