2d Terrain

BlitzMax Forums/BlitzMax Programming/2d Terrain

zambani(Posted 2008) [#1]
Hi
Anyone know of a routine that can generate data that can be used to create 2d terrains?


Brucey(Posted 2008) [#2]
That's a wee bit general... 2d terrain... you might want to be more specific.


plash(Posted 2008) [#3]
Top-down, or Isometric (like Age of Empires, for example)?

Your question can be interpreted broadly..


Brucey(Posted 2008) [#4]
or side-scroller tiled... etc


ImaginaryHuman(Posted 2008) [#5]
2d as in worms?

Various methods around. I think I posted something on using several subdivision stages to create a variegated landscape. You could use random numbers in some way. Textured polygon routines might help or being able to draw strips from an image - or draw a landscape image and remove the sky?


MGE(Posted 2008) [#6]
tile maps, scrolling backgrounds?


CS_TBL(Posted 2008) [#7]
Perhaps just a rectangular texture/heightfield, used to erect a 3d landscape..


plash(Posted 2008) [#8]
Ahem..

Maybe something like this?


zambani(Posted 2008) [#9]
Hi,
I'm thinking of a 2d Isometric tile based landscape. But the main thing is the edges for example between land and water are not always square-like looking.

Apparently in My Tribe, the island is generated procedurally
Here is a pic
http://grubbygames.com/mytribe/screenshots.php?screen=3


InvisibleKid(Posted 2008) [#10]
i have nothing concrete yet but on and off i'm working on a very side project for some future project ideas that i have, and the way (atleast for now) i plan on going about it is with a series of tiles.

ex:
solid water tile
solid sand tile
water + sand left edge
water + sand right edge
water + sand top edge
water + sand bottom edge

and then a combination of the edges around the sand until you finally end up with say a little island surrounded by water

and draw the tiles in layers, water,sand,grass,mountians as an example.

i can't remember the exact number, but i believe i had 20+ to 30+ tiles per element(water,sand,grass,...etc) in the test set that i made.

in the code start off with laying down random spots per element depending on a percentage you want for each (55%water, 15%sand, 20%grass, 10%mountain), and then depending what each surrounding tile is, have it lay down the coresponding edge tile that will match that tile plus all the surrounding tiles for the new piece.

i hope that makes some sence. there might be/probably are better ways to do it, this is just a way i started testing out awhile back.