godotengine / godot-docs

Godot Engine official documentation
https://docs.godotengine.org
Other
3.6k stars 2.97k forks source link

Godot 4+ Multiplayer Seamless Open-World Chunks #8981

Closed WithinAmnesia closed 4 months ago

WithinAmnesia commented 4 months ago

Describe the project you are working on

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.

What can work for seamlessly loading and unloading chunks Godot 4+ games with multiplayer and open world construction? 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. Example: https://www.youtube.com/watch?v=uE36MVjB5-8

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.

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

Describe the problem or limitation you are having in your project

The chunk sizes are too small and the combat and server lags with large areas. I think seamless chunk loading and unloading is the solution in most MMORPGs and large open world multiplayer games like Minecraft and Terraria. Unfortunately there is a lack of working examples for how to implement this 20+ year old critical feature and make near-infinite open worlds for multiplayer games in Godot 4.2.1.NET.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Seamless chunk loading and unloading is the solution in most MMORPGs and large open world multiplayer games like Minecraft and Terraria. This enables large open world games with multiplayer and still use relatively reasonable hardware to run the world client and server. There is a lack of examples for this so a demonstration or guide or anything that works to follow and replicate would be greatly appreciated. A proper demonstration / guide / solution would open up the community creatively and practically where people can follow the example and build upon it to make near infinite multiplayer open worlds. This will take away near exclusive game making features from competitors such as Unity and Unreal engines and make these critical world building features forever free for the entire world.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

As in most MMORPGs like World of Warcraft, RuneScape, Everquest and multiplayer voxels games Minecraft and Terraria and other multiplayer large open world games: When the player / client reaches a chunk border threshold (set by the developer) the closest chunks to the player load. This is done so that the systems running the game and player game field of play are seamlessly able to transition to the new chunk and unload the unused previous chunks. This creates the ability to seamlessly explore a large to even near infinite open worlds in multiplayer with using smaller chunks to keep the server and client working smoothly. There just is not an easy to find or known example of this in Godot 4.2.1.NET multiplayer.

If this enhancement will not be used often, can it be worked around with a few lines of script?

I am not sure if this is applicable this seems like a larger kind of request. Hey if it works I am all ears. Please anything that can work well would be great. There is a lack of working examples for Godot 4.2.1.NET so anything that works would be incredibly helpful.

Is there a reason why this should be core and not an add-on in the asset library?

This is a world building feature and with other game engines like Unreal and Unity there are features built into the 'core' that handle this kind of serious multiplayer open world seamless chunk loading and unloading. This would be a great addition to the capabilities of Godot engine and would make large open world multiplayer games reasonably accessible to the entire world and every large scale game could start to be practically built from the ground up in Godot. Anyone could make Massively Multiplayer Online games and the community can democratize the powerful tools needed to do this heavy lifting world building with multiplayer servers. It would make the community able to make incredible massive scale multiplayer games for this generation and all the subsequent generations after forever free.

fire commented 4 months ago

I posted some of my ideas here https://github.com/godotengine/godot-proposals/issues/7144

WithinAmnesia commented 4 months ago

I posted some of my ideas here godotengine/godot-proposals#7144

Lol hey I seen you before! The cat face photo person (Im not good at remembering names but I seen you before lol). You had this oh there it is lol.https://github.com/godotengine/godot-proposals/issues/7144 this was literally just recommended to me by Theraot.

We figured out that there is a good way to make smaller questions for getting more help by making the question better to answer: ~4 components/parts for smaller related questions.

Okay this is like big time Chunk loading/world partitioning help I'm feeling. I was just going to ask you mate like its a small world lol. I am so happy there are people who care and like I want things to get better. I need to read your thread and words and give really good answers. Big community time. What should we do?

skyace65 commented 4 months ago

Specific demos/tutorials for stuff like this is outside of the scope of what's done in the documentation. If there's a specific class reference page for a node related to this that's not giving you enough information, or a existing page that's confusing in some way or overlooking something feel free to open an issue for that.

WithinAmnesia commented 4 months ago

Specific demos/tutorials for stuff like this is outside of the scope of what's done in the documentation. If there's a specific class reference page for a node related to this that's not giving you enough information, or a existing page that's confusing in some way or overlooking something feel free to open an issue for that.

Where should this be put? This was moved here by a moderator so its a puzzle to where to ask this? I wonder where this should be asked for the open source demonstrations and open source examples are really important for learning and going further beyond what is already done already within the community. The examples help learn and also make new things with the best features and puzzle solving from all of them and help boost fresh projects with good solutions and iterations. Where should the community gather and collaborate to help make new creative capabilities for the Godot engine?

Also I have and update too: I am doing a from scratch build now for the multiplayer chunk system. What should I do for the server and the data and chunk storage? I have a few leads and some more thoughts and resources can be found here: https://github.com/WithinAmnesia/ARPG/discussions/16 <Start fresh thread. https://github.com/WithinAmnesia/ARPG/discussions/15 <Previous start thread. It was suggested I build a from scratch Multiplayer seamless chunk system that eventually be put together where it can handle 2K-16K+ players on the same server. What should be done for a web deployment to also run on a browser? I was suggested to try and do a chunk storage system similar to Minecraft or Terraria where each chunk is stored individually and accessed by the server in communication with the player clients. What should be done to solve this chunk puzzle? All feedback is welcome.

WithinAmnesia commented 4 months ago

https://github.com/Zylann/voxelgame/issues/100#issuecomment-1955780686 We figured it out! Now its phase 3 with trying to convert the working multiplayer dynamic seamless chunk system to top down 2D. We are onto the next puzzle to solve now: https://github.com/Zylann/voxelgame/issues/101

skyace65 commented 4 months ago

I apologize for the confusion but the original person who moved this should have closed it instead. Again it's outside the scope of what we do for the documentation. I understand that specific demos can be beneficial. The problem is if we made one for every request you inevitably end up with so many that it ends up being impossible to maintain it all.

WithinAmnesia commented 4 months ago

I am just happy people care too. Hey I'm making a lot of progress and I hope I can give back and answer this request with a working project demonstration. So the community can have a documented working example of this kind of massive multiplayer world building tool for Godot 4.2.1.NET+ that's forever free and open source. I'm just polishing up my prototypes and I'm really close to getting a fully working demonstration that fulfills all of the performance criteria: https://github.com/WithinAmnesia/ARPG/discussions/16#discussioncomment-8550378

WithinAmnesia commented 4 months ago

https://github.com/Zylann/voxelgame/issues/101#issuecomment-1958792464 Big 2D/3D hybrid progress update!