ObsidianBlk / ChunkMapTest

A test project for creating multi-chunk 2D tilemaps in Godot 3.4
1 stars 0 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.

ObsidianBlk commented 6 months ago

To begin with, this project is based on Godot 3.4, and is geared to being an in-editor plugin proof-of-concept. Very broadly speaking, what I did in this project could be adapted to Godot 4.x DotNet, but I, personally, am not familiar with DotNet to give any programming guidance on adapting the script for use with either DotNet itself or with the new Tileset/Tilemap system Godot 4 employs.

I strongly doubt this project would give you any substantive use in the project you're describing.

My only real guidance for your project would be to do some research on godot map chunk loading, as well as threading (which, depending on the complexity of your chunk data, could be very beneficial).

I wish you the best of luck!

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

To begin with, this project is based on Godot 3.4, and is geared to being an in-editor plugin proof-of-concept. Very broadly speaking, what I did in this project could be adapted to Godot 4.x DotNet, but I, personally, am not familiar with DotNet to give any programming guidance on adapting the script for use with either DotNet itself or with the new Tileset/Tilemap system Godot 4 employs.

I strongly doubt this project would give you any substantive use in the project you're describing.

My only real guidance for your project would be to do some research on godot map chunk loading, as well as threading (which, depending on the complexity of your chunk data, could be very beneficial).

I wish you the best of luck!

With the recent update and more progress what are your thoughts and questions? Hey if you can read that Theraot code and like give some guidance that would help a lot for my main pursuit is trying to find people like yourself who know what should done?

I'm really struggling to find good solutions and like any help would be so amazing because its so massive this engine limitation but if its solved it helps not just myself but the whole dev community. big games can be made with this chunk feature. Its just what should be done and like any feedback is welcome. I just hope to find some help and a guide on what to do next and listen to the experts.

You can tinkerer if you want the 128x128 chunk demo and like maybe that will help answer some questions and give insights on what to do next to get the seamless chunk loading and unloading system working or like a start at least? What are you thoughts and ideas and questions? Any feedback is welcome.