Pocket Dungeon
Moderators: Timedude, Olothontor
- Robot Monkey
- My Little Pony
- Posts: 1935
- Joined: Tue Nov 02, 2010 8:47 pm
- Location: The Edge
- thade
- Cannon Fodder
- Posts: 358
- Joined: Mon Jul 06, 2009 7:23 pm
- Location: permanantly trapped in my own twisted imagination
*Facepalm*
I have only been working on this for a VERY SHORT TIME! The dungeon generator is a very complicated set of checks and formulas.
Here's a relatively small chunk of code.
That code takes data from several othe chunks of code about the same size, and one giant chunk of code in a seperate instance.
I have only been working on this for a VERY SHORT TIME! The dungeon generator is a very complicated set of checks and formulas.
Here's a relatively small chunk of code.
Code: Select all
while (createtile=true)
and not global.roomnumber <1
and not global.tilenumber <1
{
createtile=false
spawndir=choose(1,2,3,4,5,6,7,8,9,10)
switch spawndir
{
case 1:
case 2:
if place_free(x+8,y+8)
{
instance_create(x,y+16,obj_floor)
createtile=false
;;break;
}
else
{
spawndir=choose(2,3,4)
continue
}
case 3:
case 4:
if place_free(x+16,y-8)
{
instance_create(x+16,y,obj_floor)
createtile=false
;;break;
}
else
{
spawndir=choose(1,3,4)
continue
}
case 5:
case 6:
if place_free(x+8,y-24)
{
instance_create(x,y-16,obj_floor)
createtile=false
;;break;
}
else
{
spawndir=choose(1,2,4)
continue
}
case 7:
case 8:
if place_free(x-8,y-8)
{
instance_create(x-16,y,obj_floor)
createtile=false
;;break;
}
else
{
spawndir=choose(1,2,3)
continue
}
case 9:
;;break;
case 10:
;;break;
}
}
I don't level the playing field, I level the playing field.
- ForlornCreature
- Cannon Fodder
- Posts: 486
- Joined: Mon Jun 28, 2010 9:05 am
- Location: Checking back in between animations for Warhead's follow up to ZZD
JESUS MCDONALDS FREE INTERWEB IS SLOW IT TOOK 20MINS TO GET THIS DONE.
Although I suspect the asian guy down the row might be chewing through all the bandwidth...
Anyway when I found the Minotaurus had survived on top of my bunk bed, I went to make a lego PD (prepare for big pics):

After a few different methods, this seemed to work the best and had relatively few problems until you started connecting rooms with ones that were made earlier.
And a LDD version I made, no price tag yet, (not able to do the 120MB update, let alone 2MB for thade's game WIP) but it'll cost waaay too much to ship because LEGO.com's starting P&H price is like, $25.


YAY I FINALLY GOT THAT DONE. SEE YOU IN ANOTHER THREE DAYS.
And in use
Although I suspect the asian guy down the row might be chewing through all the bandwidth...
Anyway when I found the Minotaurus had survived on top of my bunk bed, I went to make a lego PD (prepare for big pics):

After a few different methods, this seemed to work the best and had relatively few problems until you started connecting rooms with ones that were made earlier.
And a LDD version I made, no price tag yet, (not able to do the 120MB update, let alone 2MB for thade's game WIP) but it'll cost waaay too much to ship because LEGO.com's starting P&H price is like, $25.


YAY I FINALLY GOT THAT DONE. SEE YOU IN ANOTHER THREE DAYS.
And in use

- Robot Monkey
- My Little Pony
- Posts: 1935
- Joined: Tue Nov 02, 2010 8:47 pm
- Location: The Edge
- Robot Monkey
- My Little Pony
- Posts: 1935
- Joined: Tue Nov 02, 2010 8:47 pm
- Location: The Edge
- Robot Monkey
- My Little Pony
- Posts: 1935
- Joined: Tue Nov 02, 2010 8:47 pm
- Location: The Edge
- Robot Monkey
- My Little Pony
- Posts: 1935
- Joined: Tue Nov 02, 2010 8:47 pm
- Location: The Edge
- ForlornCreature
- Cannon Fodder
- Posts: 486
- Joined: Mon Jun 28, 2010 9:05 am
- Location: Checking back in between animations for Warhead's follow up to ZZD
- Olothontor
- Clown-Face Bologna

- Posts: 2193
- Joined: Fri Dec 14, 2007 9:29 pm
- Location: Lounging in a commercial Starliner of his own design.
- Contact:
- RagnarokRose
- u a MILLION wus and only then shall you become the MISTRESS

- Posts: 3941
- Joined: Sun Sep 21, 2008 7:03 pm



