Data structure and loading times
Hello everyone,
one of the most basic things to decide is the data structure.
The first question I asked myself was: "I have two locations. One in front of the house and one inside. How do I store all this and how do I get from A to B?"
In my first approach, I had a big map where in one corner was location A and in another corner was location B.
If you now enter the house, there is a teleport from A to B within the map. This was also a good implementation for this example, but not really scalable. The number of different scenes would have required a huge map.
The next approach was to create a scene for each location. If you travel from location A to B, the player is simply moved to the other scene.
If you have loaded the scene before, this works without any delay. But here was the crux of the matter again. Loading everything completely takes several seconds. Since I am not a fan of loading times (and certainly not for such a game) they had to disappear into the background.
So the single scenes were combined in maps. Which scene goes into which map depended on how accessible it is. So if you travel to another city, the old city (without traveling back) is not so easily accessible and doesn't have to be in memory anymore.
Now only the transition was missing. Since there is a cutscene at the end of each act/map that drives the story forward, I decided to load the following map there.
So when entering the cutscene a trigger is triggered, which causes the loading in the background of the next map. This takes only 5-20 seconds, but if you load everything at once it would add up very fast (apart from the increased memory consumption)
So when starting a new game, only the intro has to be loaded, which takes less than 5 seconds. This is an acceptable time for me. From there on the rest would be loaded in the background.
If you leave the game and resume the game, you might have to load a bigger map with several scenes. To make the waiting time (of about 20-30 seconds) a bit more bearable, I display some loading screen texts. This can be a "Heating coffee" for an office scene that is loaded up to "Fill coffins" for a cemetery scene. By reading the screen the player is a little more distracted and does not necessarily notice the waiting time.
Get Stupid Stories
Stupid Stories
Travel through time and relive your grandfather's exciting adventures, or at least how he remembers them.
Status | Released |
Author | Umpfi |
Genre | Adventure |
Tags | 2D, Funny, Singleplayer, Time Travel, Top Down Adventure |
Languages | German, English |
More posts
- Aaaand we are done...Dec 04, 2020
- It is done...Dec 01, 2020
- Chicken!Nov 15, 2020
- Trailer!Nov 10, 2020
- Fine tuningNov 05, 2020
- Urgs... graphics...Oct 23, 2020
- "How is the game played" vs. "How did I assume it is played"Oct 09, 2020
- Settings and SoundsOct 02, 2020
- Walking sounds and interface updateSep 11, 2020
- Clippy is back!Aug 27, 2020
Leave a comment
Log in with itch.io to leave a comment.