datalurkur / Mountainhome

A detailed and intricate worldsim borrowing from the Dungeon Keeper-style dungeon-building mechanic
You're lookin' at it.
6 stars 2 forks source link

Add a loading state #55

Closed StLoch closed 14 years ago

StLoch commented 14 years ago

This will remove the various creation responsibilities from GameState and give us a good place to put special input handling and visualizations for loading. The LoadingState will create the UIManager, the World, the Terrain, etc... and push the Terrain through the various Terrain generation steps. As for rendering, we can handle either handle it simultaneously, with threads, by doing things by steps in the update call, or by using callbacks. When everything is done, it will pass the created objects over to the GameState.

datalurkur commented 14 years ago

There is now a loading state! Currently, it exists in a state of unity with what will eventually be the main menu state (unless those are actually the same, but somehow I doubt that). We need to figure out this whole concurrent rending and loading thing, though.

datalurkur commented 14 years ago

What was the loading statue is now MenuState, which currently adds a loading message and waits for finish before switching directly to the GameState.

Whether we want to render the world while it's being generated is something to consider, as well as whether we want other things to happen during loading.

We need to define clearly how this transition will take place, when worldgen happens (and to what extent the user gets to interact with it), and decide whether we need a third LoadingState or if MenuState and GameState will suffice.

datalurkur commented 14 years ago

Loch added a LoadingState, so this is done...ish.