In the "Huge Dungeons" tutorial, I found this code snippet for creating and texturing the primitives in a dungeon crawler:
` Wall
for i=1 to maxcubes*maxcubes
make object cube 100+i,cubesize
texture object 100+i,1
next i
` Floor
for i=1 to maxcubes*maxcubes
make object plain 10000+i,cubesize,cubesize
rotate object 10000+i,90,0,0
texture object 10000+i,2
next i
` Ceiling
for i=1 to maxcubes*maxcubes
make object plain 20000+i,cubesize,cubesize
rotate object 20000+i,270,0,0
texture object 20000+i,3
next i
My question is, why do these precise numbers cover the entire 512x512 map? I am curious because I want to expand my map to having close to a dozen objects, and I don't understand what, exactly, everything in this snippet is doing.
Also, on a side note, is there any relatively simple way to program a door? I don't know whether I'd be best just to make it a "ghost" object, or to actually try and animate it opening and closing.
Help would be greatly appreciated.