Skip to content

Add world creation and syncing. - #163

Merged
Armored-Dragon merged 22 commits into
alphafrom
create-worlds
Aug 5, 2026
Merged

Add world creation and syncing.#163
Armored-Dragon merged 22 commits into
alphafrom
create-worlds

Conversation

@Armored-Dragon

Copy link
Copy Markdown
Member

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.

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.
@Armored-Dragon Armored-Dragon self-assigned this Jul 31, 2026
@Armored-Dragon Armored-Dragon added enhancement New feature or request om-client Issues relating to the OpenMinerva client. alpha Issues pertaining to the alpha channel client editor mode Issues relating to the Client Editor Mode, though any interface. labels Jul 31, 2026
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.
@Armored-Dragon
Armored-Dragon marked this pull request as ready for review August 5, 2026 01:33
@Armored-Dragon

Copy link
Copy Markdown
Member Author

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.
@Armored-Dragon

Armored-Dragon commented Aug 5, 2026

Copy link
Copy Markdown
Member Author

I am merging this, however there are some important issues that will need to be solved:

  • No loading into worlds, see comment Add world creation and syncing. #163 (comment)
  • This includes some slightly unrelated commits such as adding at-icons and a grid-shader swap.
  • Shaders are not synced nor networked. This is a deeper issue and would require it's own networking step outside of the scope of this PR.
  • Resources are not properly removed from memory when unused. This will be easier to do once the database is created. Resources / assets will be able to be easily tracked and removing them from the database will be easier. This is not quite a memory leak as if you save the world, close it, then re-load it the database would be recreated using only used resources.

Most of these issues will be fixable when the database functionality is created.
See #166 for database issue tracking.

@Armored-Dragon
Armored-Dragon merged commit b413074 into alpha Aug 5, 2026
@Armored-Dragon
Armored-Dragon deleted the create-worlds branch August 5, 2026 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

alpha Issues pertaining to the alpha channel client editor mode Issues relating to the Client Editor Mode, though any interface. enhancement New feature or request om-client Issues relating to the OpenMinerva client.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant