Archived

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

ultra fast simplistic indoor scenes

This topic is 5154 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

im writing a game, entirely in C++ and opengl, for the first time (other game''s ive programmed were in other languages) the game is basically like doom/doom2/wolfenstien, kill tons of enemies in a maze-like level with small puzzles (keys and doors) im not wanting spectacular graphics, maybe quake 2 type stuff would be the MOST quality this game would ever see and i was wondering what kind of tips you could offer for ultra fast indoor environments... if it helps, you might want to consider that all my work in open gl prior to this has been with brute force rendering of heightmap/terrain. I could never effectively implement a quadtree or octree (due to tutorials using formats i was not going to be using).. so you might want to keep that into perspective i want the levels to be doomish, not quake 3 ish. The simplicity is important, (i think doom didnt have many height changes correct?) also any terms that i could search for would help too this game is basically a single player "shoot everything you see and get out alive" type of game

Share this post


Link to post
Share on other sites
Personaly i think you should take the time to get some sort of culling in there, if you''re not going to have hight changes then a Quad-tree would work nicely, more so if combined with a pvs (potentialy visable set) setup so you could limit the possibly areas you have to deal with.

I was going to say more but tiredness has just over taken me, i''ll have to leave it to others to add more ideas for now...

Share this post


Link to post
Share on other sites
Even if you don''t do any culling besides backface removal, a plane jane raycaster in opengl/polygons isn''t going to be very many polys; one md2 model will have as many poly''s as an entire level, so screw it! Let the fragging begin...

Share this post


Link to post
Share on other sites
but i dont want it to work like quake 2, quake 2 uses bsp format, and a buntch of extra special junk that this game doesnt need...

this is a fun project, something to do to learn more about open gl, C++, and actually making an entire playable game

[edited by - fireking on November 7, 2003 7:53:25 AM]

Share this post


Link to post
Share on other sites
If you need indoor culling you can use different methods

1) Use sectors (a set of polygon in a certain area/room) and cull its bounding box

2) Use sectors and portals

This second solution is the simplest...the difficult is to create portals!!!
However you can use a simple map (something similar to an old ASCII-maze) and 'portalize' your map.

this is a recursive pseudo code



Start with f = view_frustum and s = this_sector

Render(sector s, frustum f)
{
for_each_polygon(p)_in_sector(s)
{
if(f->IsVisible(p))
{
if(p->IsPortal())
{
Render(p);
}
else
{
// clipped_poly = f.clip(p); // optimization!

newfrustum = ShadowFrustum(observer, clipped_poly);
Render(p->linked_sector, newfrustum);
}
}
}



The difficult of course, if you have not experience, is to compute the correct view-frustum and polygon-clip. But if you want something more than brutal force you have to deal with these topics.




[edited by - blizzard999 on November 7, 2003 9:30:12 AM]

Share this post


Link to post
Share on other sites