-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can this work for Godot 4+ games with multiplayer and open world chunks? #1
Comments
I'm not planning to add support for Godot 4 but it shouldn't be too difficult to convert it. For the proposal itself I don't think this project will be very appropriate since this is only for 3D mode, it doesn't support lazy-loading without extra layer of some smart helper scripts (which I planned to add it in the future if I have enough motivation). The chunk itself must be small enough to be (initially) loaded without causing hiccups (threads don't help on the node adding step because it's still single-threaded). Not to mention that with this addon, chunks will always be forced to be unloaded if the camera moves away farther enough, and this script doesn't support manual unloading yet (which, of course, will also cause hiccups because Godot doesn't have garbage collection). On first thought I could suggest, you should design the client to also work as a server because it will be much easier to design the server-side unless you are experienced with the separating client-server method. When deploying the game as a server it could be configured to load all chunks but without visual resources (you could write simple resource stripping scripts and then re-bake them as server-only chunks). In client mode it will use the visual chunks and load/unload them without worrying that the game logic will be broken since it's gonna be at least partially calculated in the server. In the build you could also strip anything that's not required for both client and server. This way it's much easier to both design the game and build a game with good architecture. It's quite a standard for making online games nowadays. On the navigation slowness that you faced, pretty much all games faced the exact same issue if the area is too large in a same navigation layer (a lot more area for the A* to calculate optimal path https://www.youtube.com/watch?v=CgW0HPHqFE8). I pretty much suggest against the use of A* if it's not absolutely necessary. If entities don't need to move out the area, you could instead use some sort of dumb navigation algorithms to help out the performance (such as https://youtu.be/HP4ObKlCe6w?t=447), or hand the task to the client instead especially if the navigation isn't something that needs to be calculated cross-chunks. Noting that this way you expose a vulnerability that hackers could abuse, and you should always try to confine the limitations that the client could do with it. |
Also Zylann/voxelgame#101 (comment) + WithinAmnesia/ARPG#16 (reply in thread) Big 2D/3D hybrid progress update! It all works! |
I watched a lot of the 8-bit guy and yeah Astar navigation is really good. its just how to use it with chunk system where the data is streamed? Can you take a look at BlockyGame and Godot_Voxel to see more insights and it has a big breakthrough with the working multiplayer seamless chunk system for sure. |
Test chunks link: WithinAmnesia/ARPG#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.
The text was updated successfully, but these errors were encountered: