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 setup question

Author
Message
David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 31st Oct 2005 07:31 Edited at: 31st Oct 2005 07:32
hi,i need advice on how i would code going to a different room.

example:




????
Antidote
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: San Francisco, CA
Posted: 31st Oct 2005 13:13
What I would do is at the start of the game(after the menu, before room 1) load/make all the objects/sprites/images/lights/cameras/sounds/music that will occur in every room.

Then before room 2 once you fulfill requirements for room 1 delete everything not important to room 2 and make/load everything important to it.

RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 31st Oct 2005 14:03
Well usually you would just have the entire map file containing all of the rooms, not seperate objects that make up the rooms. They kind of balance eachother out in terms of lag, eg:

Using one huge map file can cause lag if it has lots of polygons
However, you won't have to program anything for moving creating or deleting objects which can save you time.

Using a bunch of seperate room models can remove some lag in the long run but would require a much longer loading screen which would be weird, having a loading screen come up as the user enters each room, and would get annoying.

The method most of the gaming companies use is just making the entire map file, with all the rooms and objects in it. Sure they might delete some things that aren't going to be seen ever but really if you take for example...Halo 2, their map files are all just single map files, not a bunch of objects positioned. If you do it this way you don't need any code to detect if the user is in the next room, just let them move there themselves.

David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 31st Oct 2005 14:22 Edited at: 31st Oct 2005 14:26
ok,my main game im working on is going to be mainly indoors with lots of different rooms.which way would be better as far as framerate,& using as little cpu power as possible?

1 load my entire indoor level with every little detail already positioned ,rotated etc in every room,at very start of game?

or

2 as the player gets to each individual room ,load that room-along with everything in it & delete rooms not currently being used.also if the player goes back to a previous room,reload all of that..

3 a way i havent mentioned..

?
Antidote
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: San Francisco, CA
Posted: 31st Oct 2005 15:08
Go with number one. I thought you were talking about each room as a different level kind of thing.

David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 1st Nov 2005 02:32
ok thanks.i guess that way would be less confusing.
Heckno
20
Years of Service
User Offline
Joined: 8th Sep 2004
Location: Palm Coast, FL
Posted: 1st Nov 2005 06:11
the other part to think about is that the system will not try to render all of the objects that are not in camera view....

make sure your transition areas are not too much off balance from one another or your game will experience laggy areas. There is alot more to this thought I just cant elaborate more tonight because of work tommorrow....

Login to post a reply

Server time is: 2024-09-24 07:25:29
Your offset time is: 2024-09-24 07:25:29