Add world creation and syncing. - #163
Conversation
Home scene is now the scene loaded into at boot.
New Empty scene. When joining a server, the client will load the Empty scene, and populate the world based upon the database provided by the host.
When a client connects to a server, they try to spawn themselves twice, this adds a bandage fix for this issue.
This rewrites the entirety of the spawnable loading procedure. In this state the world loading is not fully functional, but I need a checkpoint so that I can revert back to this state later if needed. The next step is to handle reconstruction of the sub_resources.
client-side. This is not multiplayer safe yet, but this is functional. I am making a checkpoint for functional code.
This makes it so that the asset database on the server is synced to the client. However the client does not yet know how or where to use these resources.
This fixes several issues and now makes the joining process feature-compatible from before worlds were hard-coded and hard-loaded from disk. Sparing all bugs and other issues.
This is more of an enforcement change so that only the host when initializing the world needs to reparent the nodes.
Not needed now!
More outdated TODOs / HACKS removed.
This is the rough initial implimentation of saving a world. Right now the app will dump it into the spawnable folder instead of separating it to a dedicated folder.
When saving a world, the copy of the world that is saved will use the current instance name.
This expands the "remove player controller" function to strip out more nodes before saving the file to disk. Introduce the "persistent" metadata field to easily prevent saving nodes.
|
Initially I had wanted to include the ability to load directly into saved worlds akin to creating a new world. However upon consideration I have decided to hold back on that until there is a database system in place (see #166 for tracking). In the current state you can kind of load into a saved world by spawning into a gridspace, spawning the saved world from inventory, and deleting the currently present world. This would in effect "load" the world, but obviously this is not a good way to load a world. I am having an issue in determining what "spawnables" are in-fact worlds. I concluded that having a dedicated relational database that can map 'spawnable types' to a given spawnable listing would be the correct solution. |
I didn't like the previous shader, and I forgot where it came from. This shader I can source and I like it more.
|
I am merging this, however there are some important issues that will need to be solved:
Most of these issues will be fixable when the database functionality is created. |
This PR adds world syncing on join, and dynamic world loading from a tscn file. This will make it so that worlds are not strictly hard-loaded from the disk and instead go though the spawnable system so the world can be interacted with and edited.
This will also make it so that worlds can be saved and loaded at run time outside of the default scenes.