Sign in to follow this  
yodaman

loading points...

Recommended Posts

Im doing some research right now for several different topics, however with this topic, im a little lost. Basically, in most modern rpgs the world seems to just continue without having a level system. However, most of them do have levels but they do a good job on hiding this. What im having a hard time figuring out is this: say theres a case where you can see a city ahead of you. This city is actually another level. You get a little closer and "loading..." then you are right back where you were before loading took place. Logically, what was loaded was the characters and scripts, etc within the city structure. Now, you decide to walk back to the other area and "loading..." (think of half-life). As pointed out, it's obvious what was loaded, however what I can't figure out is what should be deleted? Should the characters you can still visibly see but are just on the opposite side of the loading zone just dissapear. or should the entities that spawned that you didn't destory just be deleted? Now im thinking that the entire terrain can be loaded for the entire scene and so can the various static objects that are used a lot such as trees. Dynamic objects such as npcs can spawn at certain times when triggerd. Now, most rpg's and such do tend to have different worlds. This is the only time all of the old data is flushed and all new data is loaded and is what ill probably have and I guess how the character gets there would be left up to the game designer ;) Im very interested to hear what you all have to say about this. ~Jason

Share this post


Link to post
Share on other sites
That's a bad way to setup load triggers. When you change map, the trigger that leads back to the previous map must be set further into the direction of the previous map than it was before. This also means that both maps must have an small area that exists in both maps.

Example (WARNING, crappy ASCII art!):


--------------------
| map1 ->|(to map2)
--------------------
----------------------
(to map1)|<- map2 |
----------------------
------
| |
------
(this area exists in both maps)



In a seamless loading system, you'd need to be able to keep both map1 and 2 in RAM at once for a while.

Example: The player is in map 1. Map 1 contains the joint map. When the player enters the joint map, you start loading map 2. When the player leaves the joint area and enters map 2 you start removing map 1 from RAM.

Share this post


Link to post
Share on other sites
What about tiling your world into small pieces, like it is done for images for example. Then have a sorted list of those tiles. Whenever memory runs out, throw away the oldest pieces in the list according to some LRU algorithm. You may also preload data depending on the direction where the player is moving. This way you can avoid "Loading..." screens.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this