Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / game optimization question

Author
Message
David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 18th Sep 2006 02:17
hi,my game is going to be like;

the player is in different rooms.
one room will be a forest,another a room in my mansion,another a room in mansion grounds. etc.

my question is,once my player has left room a and enters room b.
what is the best way to handle the objects from room a(previous)??

would the best way be to delete all objects,to delete them from memory.then if the player enters that room later,reload the objects??

or would the best way be to exclude those objects??
im trying to consider memory usage,since my game will probablly have more than 80 rooms.
GMan
18
Years of Service
User Offline
Joined: 16th Sep 2006
Location: TEXAS
Posted: 18th Sep 2006 02:33
At first I would recommend excluding the objects because that won't create any pauses, whereas if you delete them and reload there will be pauses in game play. However, it all depends on what kind of game you are making.
for example if your making a puzzle kind of game and all the rooms are fairly large, and players will spend a lot of time in one room alone, then you may want to delete and reload objects. But, if players in your game will be running through several rooms in a few seconds then deleting them is DEFINITELY the wrong way to go.

If the rooms are relatively small polycount then you could have half the rooms loaded and when player reaches other half of mansion you could delete and load (not showing unseen rooms).

The right man in the wrong place can make all the difference in the world.
David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 18th Sep 2006 04:23
well,im making a resident evil type game.like where u goto a door then theres an animation of a door opening.then your in the new room.
FROGGIE!
20
Years of Service
User Offline
Joined: 4th Oct 2003
Location: in front of my computer
Posted: 18th Sep 2006 22:58
Well, it depends on how long it takes to load the room, ive used a similar system for moving between levels by deleting the objects and then reloading them, and although there is a slight pause its nothing major. Another thing you could try is loading multiple rooms at the same time and then not deleting them until a few rooms later, so there is only a pause in between every 5 rooms or so. For example if your inside a smaller building/area with 4 or 5 rooms in it, load all of the rooms and then when you move out of the building or into a different area, delete these rooms and load the new area/rooms. This is better than waiting in between each room change.
Ginga
18
Years of Service
User Offline
Joined: 3rd Jul 2006
Location: Dorset, England
Posted: 19th Sep 2006 01:09 Edited at: 19th Sep 2006 01:09
I concur with Froggie, You can store alot of objects, so make use of that, outside objects use say 1-100, room 1 use 101-200, etc. and when your outside, delete the last building objects, and ait for the user to enter another building.
for instance: (not actually code)



Rather strange way of getting my forts across but hey. it works it lamens terms
David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 19th Sep 2006 01:49
so u guys agree that deleting them is probablly best??
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 19th Sep 2006 03:00 Edited at: 19th Sep 2006 03:00
Why don't you just try with "delete object" and then with "exclude object"? It would not take long to try both ways, then you would know which way is best.

jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 19th Sep 2006 05:49 Edited at: 19th Sep 2006 05:49
I have not tried this, but...what about doing the flip thing with it? Load into another object, and swap them. You might also just delete the original, and clone it from the temp.

The idea behind this is to get the load done before it is needed, and control the seam yourself programmatically...instead of handing the load off to the system.
David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 19th Sep 2006 16:01 Edited at: 19th Sep 2006 16:01
Quote: "I have not tried this, but...what about doing the flip thing with it? Load into another object, and swap them. You might also just delete the original, and clone it from the temp.

The idea behind this is to get the load done before it is needed, and control the seam yourself programmatically...instead of handing the load off to the system"


hmm,not sure what u mean.??

Login to post a reply

Server time is: 2024-09-25 09:25:56
Your offset time is: 2024-09-25 09:25:56