HELP NEEDED: Generation Algorithms
Posted: Tue Jan 08, 2013 10:00 pm
Me and a friend have recently started a game which is developed in the Love2D engine (of course) and we want to make a somewhat rouge like game where every room you progress through is random so every play through is different, think of it like binding of isaac.
The problem is, we don't have any idea on algorithms at this current moment in time. We are using a tile based map system were there is 7 different tile textures which that tile could be (0-6).
That code shows an example of what it could look like, obviously it cannot just be randomly generated for random tiles to be dotted everywhere it actually needs to form a basis of a room. I have no idea how I would do this at all so I was hoping for some advice. If you need further information to how the map system works feel free to ask
Thanks in advance everyone
The problem is, we don't have any idea on algorithms at this current moment in time. We are using a tile based map system were there is 7 different tile textures which that tile could be (0-6).
Code: Select all
-- tiles
-- 0=black, 1=cobblegrnd, 2=dirtgrnd, 3=woodgrnd
-- 4=cobblewall, 5=dirtwall, 6=woodwall
--example map
map={
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,6,6,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,6,3,3,3,3,6,0,0,0,0,0,4,4,4,4,4,6,6,6,6,0,0,0,0,0,0,0,0},
{0,0,6,3,3,3,3,6,4,4,4,4,4,4,1,1,1,1,3,3,3,6,6,6,6,0,0,0,0,0},
{0,0,6,3,3,3,3,3,1,1,1,1,1,1,1,4,1,4,6,3,3,3,3,3,6,0,0,0,0,0},
{0,0,6,6,3,6,6,6,4,4,1,4,4,4,1,1,1,4,6,3,3,3,3,3,6,0,0,0,0,0},
{0,0,0,5,2,5,5,0,0,4,1,4,0,4,4,1,4,4,6,6,6,6,6,6,6,0,0,0,0,0},
{0,0,0,5,2,2,5,0,0,4,1,4,0,0,4,1,4,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,5,5,2,5,5,5,4,1,4,4,0,4,1,4,5,5,5,5,5,5,5,5,5,5,0,0,0},
{0,0,0,0,5,2,2,2,2,1,1,1,4,4,4,1,1,2,2,2,5,5,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