Hi Dennis,

Right. I'm aware of how a lot of mainstream developers do it, and when
we are talking any kind of game using graphics using a 3d coordinates
system is essential to make sure if the player has encountered a wall,
door, whatever.  On the other hand the way I'm doing it currently
using an array has a lot of advantages as it gives me instant access
to the information i need without performing a bounded box calculation
to see if the player has encountered anything.  It has disadvantages
too as it has limits and is good for spheres and other shapes that
aren't square or rectangular in design.

On 12/5/10, Dennis Towne <s...@xirr.com> wrote:
> Thomas,
>
> Using a fixed set of arrays like you've mentioned below allows you
> instant access to any element in the array, but it really limits what
> you can do in terms of large scale constructs with many small items.
>
> I'd recommend taking a look at how first person shooters construct
> their game world, because they have arbitrarily large environments
> with small sections that have very fine detail.  As I understand it,
> they simply have an infinite coordinate system, then they put walls
> and objects where they're needed to make things like the ground, edges
> of the map, ceiling, etc.
>
> The down side of doing a coordinate based system is that you have to
> do some kind of edge or bump detection, so you know when you run into
> a wall.  But for that cost, you get rid of the scaling issues you've
> encountered, and you can make things arbitrarily free-form.
>
> Good luck!
>
> Dennis Towne
> Alter Aeon MUD - http://www.alteraeon.com
>
> On Sun, Dec 5, 2010 at 6:42 PM, Thomas Ward <thomasward1...@gmail.com>
> wrote:
>> Hello everyone,
>>
>> I was wondering if some gamers and especially other game developers
>> could give me their input on this matter. Tonight I am sitting here
>> doing a bit of work on the Genesis 3D engine when it ocurred to me I
>> might be doing things the wrong way, or at least I don't have to do
>> things the way I'm currently doing it.
>>
>> You see, when I draw a map of a game level I draw everything in it
>> completely to scale. Like if I draw a chasm or lava pit, and let's say
>> it is 10 feet in length, it ends up using at least 10 elements of the
>> array to hold it in memory. Now, obviously the larger the level the
>> more memory the game is going to use because everything is drawn
>> completely to actual scale. This would be fine for games where the
>> levels are small, where the levels are restricted to a 2d world, but
>> tonight while working on the engine and creating a test level for Star
>> Wars Mysteries of the Sith I soon realized that in order to draw 3d
>> levels according to actual scale would be huge. Oh, the computers of
>> today can certainly handle it as memory is no object its just the
>> principle of the thing why create a (100, 100, 100) 3d array to store
>> the game level when I could acomplish the same thing with a (10, 10,
>> 10) array that has everything scaled down by a factor of 10.
>>
>> So to use my earlier example the chasm that is 10 feet in length would
>> be reduced to 1, and therefore would only use up 1 element in the
>> array. Therefore instead of the player taking a step of 1 he or she
>> would move only 0.1 units per step. Things like that basically means
>> that I could make the level 10 times smaller, saving memory, and still
>> draw large objects and rooms.
>>
>> However, scaling things down isn't without its problems either. For
>> example, since you can't store anything in an array that is smaller
>> than 1 unit in size a door that would normally only be two or three
>> feet wide would now be 10 feet wide because that is the smallest I
>> could make it and store it in the array. Same would go for chasms,
>> fire pits, and anything else. Basically, I'd have to make the jumps
>> longer in order to clear a trap that was only three or four feet
>> accross, but thanks to the weird skaling and technical issues with the
>> array would be no smaller than 10 feet. Any thoughts on this?
>>
>> Cheers!
>>
>> ---
>> Gamers mailing list __ Gamers@audyssey.org
>> If you want to leave the list, send E-mail to
>> gamers-unsubscr...@audyssey.org.
>> You can make changes or update your subscription via the web, at
>> http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
>> All messages are archived and can be searched and read at
>> http://www.mail-archive.com/gam...@audyssey.org.
>> If you have any questions or concerns regarding the management of the
>> list,
>> please send E-mail to gamers-ow...@audyssey.org.
>>
>
> ---
> Gamers mailing list __ Gamers@audyssey.org
> If you want to leave the list, send E-mail to
> gamers-unsubscr...@audyssey.org.
> You can make changes or update your subscription via the web, at
> http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
> All messages are archived and can be searched and read at
> http://www.mail-archive.com/gam...@audyssey.org.
> If you have any questions or concerns regarding the management of the list,
> please send E-mail to gamers-ow...@audyssey.org.
>

---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gam...@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.

Reply via email to