yvesns / Godot-MMORPG-Client

3 stars 2 forks source link

Can this work for Godot 4+ games with multiplayer and open world chunks? #1

Open WithinAmnesia opened 6 months ago

WithinAmnesia commented 6 months ago

Test chunks link: https://github.com/WithinAmnesia/ARPG/discussions/15

I'm trying to find a way to seamless load and unload chunks for a 2D multiplayer game project to make an open world with a working server using Godot 4.2.1.NET.

How can this work for multiplayer and what is needed for this to potentially work? What options can be used for chunk loading and unloading seamlessly in Godot 4.2.1.NET? Please give feedback.

yvesns commented 6 months ago

Could you elaborate a little?

Loading and unloading chunks seems like something client-related. For multiplayer you could just share the world state through the default Godot 4 multiplayer workflow and render the chunks accordingly in client code.

What are you trying to do exactly?

WithinAmnesia commented 6 months ago

Here is an update since I last posted. https://jonathaneeckhout.itch.io/jdungeon For the goal right now it is easy to play this but imagine it has seamless chunk loading and unloading. As instead of the black world boundary a new chunk loads in seamlessly. What are your suggestions and thoughts?

Update: https://github.com/WithinAmnesia/ARPG/tree/ARPG-Infinite-Worlds Here is the 128x128 with 32x32 pixel tile chunk to test.

My initial testing seems to feel even faster combat with the 128x128 chunk. This 128x128 chunk has the same amount of entities as the 256x256 chunk. For I moved all of the entities over into the 128x128 chunk. This 128x128 chunk is a good test for using the Infinite-Worlds using the BinarySerializer for Godot 4.2+ from Theraot: https://gist.github.com/theraot/31515e28e2d8bfea33f6c6d5bcd852f6 . There needs to be some testing how to make the chunks seamlessly load and unload. https://gamedev.stackexchange.com/questions/209002/looking-for-help-godot-4-multiplayer-seamless-open-world-chunks

WithinAmnesia commented 6 months ago

Could you elaborate a little?

Loading and unloading chunks seems like something client-related. For multiplayer you could just share the world state through the default Godot 4 multiplayer workflow and render the chunks accordingly in client code.

What are you trying to do exactly?

Well the server runs the entities and the client interacts with the entities so its all related its seems, the clients and server need to work together? Theraot has a good lead but I'm not sure what else should be done to solve this puzzle?

It seems like the community could have lots of ideas and insights on what to do next for seamless chunk loading and unloading. I'm looking for help and thoughts and insights and a bit of guide on what to do next. What are your thoughts and feelings and like if you run the test 128x128 chunk demo what should be done to help integrate seamless chunk loading and unloading?

Its a big puzzle to solve that probably needs a community of open minds but once its solved the whole community can benefit and Godot can make multiplayer with practically infinite worlds. Any feed back is welcome.