Hi Thomas,

In my experience, simple number lists like game environments, however large, isn't what consumes resources in a game. The real crook is the DirectSound mixer. If you really want to save on performance, make it so that in your sound positioning code you calculate the total distance and resulting volume decrease effect for each sound as either the player or the sound source moves. If the volume level is lower than some threshold you have decided like -5000 or -6000 in DirectSound, you simply stop the file. Of course you start it again once the player comes within this threshold again, making sure it is just low enough so that it's not noticeable. That's how I sped up Q9 so much between 1.0 and 1.1, so that it could even run on a horrendous netbook. Q9 is not nearly as large as what you're describing, of course, but the same principle still applies. I don't think all the recalculation and array nightmare work is worth it just to save a tiny bit of ram. Instead, make sure the data for each square is compact and stored as efficiently as possible; e.g. with the smallest datatype that will work and bitfields for flags etc


Hope this helps some.

Kind regards,

Philip Bennefall
----- Original Message ----- From: "Thomas Ward" <thomasward1...@gmail.com>
To: <gamers@audyssey.org>
Sent: Monday, December 06, 2010 12:42 AM
Subject: [Audyssey] Creating game levels to scale?


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.

Reply via email to