C Board  

Go Back   C Board > General Programming Boards > Game Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 01-21-2006, 11:24 AM   #1
Absent Minded Programmer
 
Join Date: May 2005
Posts: 933
Renderable Versus Logical Objects

Is the main reason to have these two seperated so when you're doing frustrum culls, and it happens to exclude an object outside of the screen, but the computing for the object needs to be there, just not the picture, you can simply do that?

I'm thinkin if you have a troll camp just out of your view distance and theyre baking a prisoner alive you want that logical action going on, you just don't want to draw it.. so you simply delete the renderable representation of the object and then keep performing calculations for their logic..

Right?

Or am I missing the idea of the thing completely?
__________________
Sometimes I forget what I am doing when I enter a room, actually, quite often.
Shamino is offline   Reply With Quote
Old 01-21-2006, 11:50 AM   #2
Super Moderator
 
Bubba's Avatar
 
Join Date: Aug 2001
Posts: 7,811
You need to setup a distance at which logical objects are still 'alive'. Of course this distance will be relative to your game and game system. But yes you have the general idea.

If you want real-time updating of all objects in the world then your system had better be pretty fast or it will bring the game to a crawl.

One way to do it is to 'sectorize' your world and then quadtree that sector.

There is one problem with this however. It does not work well for moving objects. When an object moves out of the cell boundaries or out of the cell inside of the large cell, it is time consuming to update.
__________________
If you aim at everything you will hit something but you won't know what it is.
Bubba is offline   Reply With Quote
Old 01-21-2006, 11:59 AM   #3
Absent Minded Programmer
 
Join Date: May 2005
Posts: 933
Well, there is a game called The elder Scrolls: Morrowind, I'm pretty sure it is set up in cells, but you can see across to the next cell in outside terrains, and see objects moving...

Do they just use an override mechanism to make things that are close to you active, no matter what cell theyre in?

What would you guess?
__________________
Sometimes I forget what I am doing when I enter a room, actually, quite often.
Shamino is offline   Reply With Quote
Old 01-21-2006, 02:08 PM   #4
Super Moderator
 
Bubba's Avatar
 
Join Date: Aug 2001
Posts: 7,811
Yes I have that game.

I'm not sure how they do it, but I would imagine moving objects are not part of the quadtree. Look how many moving objects there are as opposed to non-moving. It probably wouldn't take much time to update them w/o using the quadtree.
__________________
If you aim at everything you will hit something but you won't know what it is.
Bubba is offline   Reply With Quote
Old 01-21-2006, 03:09 PM   #5
Absent Minded Programmer
 
Join Date: May 2005
Posts: 933
Good point :d
__________________
Sometimes I forget what I am doing when I enter a room, actually, quite often.
Shamino is offline   Reply With Quote
Old 01-21-2006, 03:12 PM   #6
The Right Honourable
 
psychopath's Avatar
 
Join Date: Mar 2004
Location: Where circles begin.
Posts: 1,068
Moving objects are probably rendered with LOD (Level Of Detail) technique.

-psychopath
__________________
Memorial University of Newfoundland
Computer Science

Mac and OpenGL evangelist.
psychopath is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
most efficient way to write filestream objects? darsunt C++ Programming 3 01-26-2009 05:17 PM
I believe I've found an official Answer to my Problem (Object Factories) Shamino Game Programming 60 12-20-2005 11:36 PM
Question about cout an stack object? joenching C++ Programming 8 05-08-2005 10:10 PM
chain of objects within pop framework help needed Davey C++ Programming 0 04-15-2004 10:01 AM
array of objects? *~*~*~* C++ Programming 4 05-31-2003 05:57 PM


All times are GMT -6. The time now is 08:21 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22