Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Help with this code snippet?

Author
Message
daxy10
12
Years of Service
User Offline
Joined: 8th Apr 2013
Location:
Posted: 8th Apr 2013 03:55
In the "Huge Dungeons" tutorial, I found this code snippet for creating and texturing the primitives in a dungeon crawler:



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.
Mobiius
Valued Member
22
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 8th Apr 2013 20:18
Quote: "for i=1 to maxcubes*maxcubes"

These are the lines which determine how many objects are created.

If MaxCubes = 10, then there will be 10 * 10 cubes.
If MaxCubes = 512, then there will be 512 * 512 cubes.

Doors can be done many ways. It all depends on what you want. Do you want a mario 64 style door where it'll animate opening and closing, or a silent hill type door where the screen fades to black when moving rooms? Once you've decided that then we can talk door details.

I live for video games! (And beers, and football, and cars!)
See what I live for here: [url]http:\\www.TeamDefiant.co.uk[/url]

Login to post a reply

Server time is: 2025-05-17 15:47:37
Your offset time is: 2025-05-17 15:47:37