🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Simple Visiblity Problem

Started by
5 comments, last by AngryLlama 23 years, 11 months ago
I have run into a problem. My 3d game has a map that works like a big Grid. So basically you move around on a huge piece of graph paper if you goto http://www.radioactivesoft.com/screenshots.htm you can see how the map looks by looking at the map editor, and how it gets drawn to the Gl Scene. The problem i run into is this: the level is 60x60 Tiles.. and each tile is 10x10 Gl Units. The visibility is about 50 units deep... I couldn''t just go a loop thru all 3600 tiles!! that makes the FPS drop to about 6. If you goto http://www.radioactivesoft.com/vis.gif you can see an illustration on my problem, and what i need as a solution. Thank You with any help you can provide! ~Paul Giblock
Advertisement
see world builder here
http://members.xoom.com/myBollux/home.html
this world is 64x64 , use c to change the camera to a free one and use q to change between culling the world with a quadtree and drawing everything notice drawing everything is often quicker than doing culling. esp 60x60 at 128x128 its quicker to do culling (of course this is all hardware dependant). what will defintly speed it up is LOD, also use tri_strips and or tri_fans
But with it being tiles, I image the Culling code will be quicker then for a terrain..

my problem is just, i don''t know where to begin.

-Paul
hmmm had a look at your mpa editor why cant you find out what tile is at the upper left corner , find how many tiles wide are on the screen same as height and go
for (x=0;x< width;i++)
{ for (y=0;y{ draw[upperleft.x+x][upperleft.y+y];
}
}
sure that works for the Map editor.. that is what i use for the map editor..

but the game!!! do you see the difference?? The game is not the map editor.

-Paul
I think you just need to include everything that is within the range of view (your primary culling) using some kind of circle for FOV. Then you cull it to be everything that is in front of you and in FOV then continue as otherwise.

-Chris Bennett ("Insanity" of Dwarfsoft)

Check our site:
http://www.crosswinds.net/~dwarfsoft/
Check out our NPC AI Mailing List :
http://www.egroups.com/group/NPCAI/
made due to popular demand here at GDNet :)
have a look at the opengl faq theres code there how to se if someits in the view frustum

This topic is closed to new replies.

Advertisement