"Huge Worlds" Episode 2 - Levels but not "levels"?

Posted By: Kamiomi

"Huge Worlds" Episode 2 - Levels but not "levels"? - 02/26/04 12:28

I have a question similar, yet slightly unrelated to the "Huge Worlds" thread below.

I want to create a city in sections, where only one section needs to be loaded at a time (like "neighborhoods"), BUT these are not "levels" that the player completes and moves to the next one.

Can I create different city sections as levels, but allow the player to run around between them at any time? How do I keep the player's variables, like her health, or inventory, or numeric values related to a current "quest", when she is moving between levels?

(before switching over to 3DGS, I've been prototyping my game in the Aurora Neverwinter Nights Toolset, and in NWN changing between areas doesn't disturb global variables or "reset" anything, but I don't know how to do that in 3DGS. the NWN toolset has all kinds of handy placeholders for functions and variables, and I would love to be able to do the same kind of thing in 3DGS)

I'm sure it can be done, I just don't know how. I appreciate any advice

Kami

Posted By: fastlane69

Re: "Huge Worlds" Episode 2 - Levels but not "levels"? - 02/26/04 15:39

For shizzle it can be done!

I don't rightly know the specifics, so I'd be curious for the more informed to answer, but I imagine you would have to store these values on teh server computer or a database and then reload them upon entering the new zone. I think there is a discussion of this on the forums or in the manual ???

BTW to help you speech, you can refer to one actual "server level" as a ZONE or SESSION and free up your level talk..

Posted By: Virtual_User

Re: "Huge Worlds" Episode 2 - Levels but not "levels"? - 02/27/04 01:13

I am curious as to why you would want to do this? If it is to save on frame rate, there are better methods.

Keep in mind that you would have two options, levels and zones. Levels would be a little bit faster than zones but in reality it would create a very noticeable freeze in the game as you switched between either a level or zone therefore ruining the illusion that you are traveling down a street in a neighborhood.

If you are wanting to save frame rates then just keep track of your players position and create and destroy sections of your city as the user travels near or away respectively.

Keeping skills while traveling from level or zone to zone is documented in other ares throughout the forum. do some searching and you will find many examples.

Good Luck!

Posted By: JimFox

Re: "Huge Worlds" Episode 2 - Levels but not "levels"? - 02/27/04 01:31

How would you create and destroy levels made with blocks?
Posted By: Christopher_Summer

Re: "Huge Worlds" Episode 2 - Levels but not "levels"? - 02/27/04 01:59

Quote:

How would you create and destroy levels made with blocks?




Map entities. If they are used good, they can be used wiet good for that.

By the way, to get away this freeze while loading a new part of the level, all of the used map entities could get loaded into the level when it gets started.
Posted By: Cellulaer

Re: "Huge Worlds" Episode 2 - Levels but not "levels"? - 02/27/04 02:42


You want level_load(). Global variables stay the same between level loads. You can also use:

game_save(string name,var number,var mode) with the mode set to SV_VARS - save all the global user defined variables except var_info and var_nsave. Then game_load(string name,var number).

You can create multiple WMP files that all point at the same WDL file and level_load() between them.
Posted By: fastlane69

Re: "Huge Worlds" Episode 2 - Levels but not "levels"? - 02/27/04 02:50

I guess it depends on your networking future.

If you want networking, then your best bet is to load in separate zones since that way, all users will have see the same thing.

If you don't want networking (single player), then the level loading described above is optimal since the only state you need to worry about is your own as the player.

Posted By: Kamiomi

Re: "Huge Worlds" Episode 2 - Levels but not "levels"? - 02/27/04 17:34

I should be more clear about the result I'm looking for - but it's good to hear the confident replies

First of all, this is not multi-player.

Second, this particular city is underground and is logically divided into huge chambers that make up each neighborhood (you would probably either go to some "airlock" type door, or a train station or something, to get to other parts of town). So, I naturally thought of designing each environment separately.

The end result I want is that the player can run all over town, go back to where they came from, et cetera, without resetting anything for loading a new "level".

I could just make it one gigantic environment, but I'd rather make it in sections I'm just not sure how to allow the player to move freely through all those sections at all times.

Thanks

Kami
Posted By: fastlane69

Re: "Huge Worlds" Episode 2 - Levels but not "levels"? - 02/28/04 04:50

Then what cell suggested is best and forget I ever mentioned sessions!:)


Posted By: feature_creature

Re: "Huge Worlds" Episode 2 - Levels but not "levels"? - 03/03/04 02:25

Yes, if the pause between levels is not a problem, level_load will save your global variables, but maybe you mean something slightly different...

Let's say you have a train that travels through one section of the town on a certain schedule. And if the player leaves the section with the train and comes back 5 minutes later, the train is still "on schedule": the train acts like it still exists even when the level is not loaded.

To do this, just make sure the train's position is based on global variables (like the total time passed). As long as the time variable is updated the train will be in the right place.

This could be complicated if you had a bunch of different things depending on each other (spies who travel by train, and agents that track spies and can modify the train schedule) but in theory, you can update these global variables even when the level isn't loaded.

You could use a starter function that always runs regardless of which level you're on.

Hope I'm helping and not confusing the issue.
Posted By: Virtual_User

Re: "Huge Worlds" Episode 2 - Levels but not "levels"? - 03/05/04 17:25

I just posted something that could be of use to this thread....

http://www.conitecserver.com/ubbthreads/showflat.php?Cat=&Board=UBB15&Number=354535&Main=354364#Post354535

Good Luck.
© 2024 lite-C Forums