Archived

This topic is now archived and is closed to further replies.

alex997

Scale used for game...

Recommended Posts

alex997    122
Are there any rules-of-thumb/limitations on the scale I use in an OpenGL game? For example my last attempt had the whole gameworld 1 GL unit across. This time I''d like to base it on "real" units, i.e. 1 open GL unit is 1 meter, gravity is 9.81units/sec/sec etc. I was just wondering if there are any limits due to bit accuracy, depth buffer accuracy etc. Any comments/thoughts much appreciated.

Share this post


Link to post
Share on other sites
Monder    993
Well you can choose any scale for your game as long as the datatypes you are using to store your data can hold the numbers involved accurately. 1 unit being 1 meter sounds like a perfectly good idea.

Share this post


Link to post
Share on other sites
Kazade    1019
You need to keep in mind that the accuracy of the Z buffer gets worse the larger the scale, but a small scale (i.e. 0.01GL units = 1 meter), would be difficult to use so its best to find a balance.

1GL = 1M is fine, but if you are making a game that needs to see far into the distance e.g 1000+ metres you might experience Z fighting.

"When I first came here, this was all swamp. Everyone said I was daft to build a castle on a swamp, but I built in all the same, just to show them. It sank into the swamp. So I built a second one. That sank into the swamp. So I built a third. That burned down, fell over, then sank into the swamp. But the fourth one stayed up. And that''s what you''re going to get, Lad, the strongest castle in all of England."

Share this post


Link to post
Share on other sites
Krohm    5030
quote:
Original post by Kazade
1GL = 1M is fine...
I agree with that. Anyway, the best of everything would be to have different scales when needed. This is, anyway, too difficult to implement in the beginning.
I also was tempted to choose that dimensionality since it's also very easy to work with.

Anyway, gravity really does not need to be so accurate (at least for games). Sometimes game physics need to be adjusted to be more "funny" or something (I like games in which I can fall 10+ meters taking only 2% damage).

[edited by - Krohm on March 27, 2004 2:07:34 PM]

Share this post


Link to post
Share on other sites
alex997    122
Thanks for the replies. Z-fighting was exactly what I was thinking about, so I value your opinions. Sounds like it''s fine, so I''ll go with it and keep an eye out for any Z-fighting!

Share this post


Link to post
Share on other sites