Skip to content
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

How to save the multiplayer chunk data? / 2D top down? / Godot 4.2.1.NET+ conversion? #4

Open
WithinAmnesia opened this issue Feb 20, 2024 · 1 comment

Comments

@WithinAmnesia
Copy link

#2 (comment)
"What I know is that translating GDScript code to C# isn't that hard. it uses the same names for the classes, functions, members and variables, except they are in PascalCase because that is the standard for C#.

but as i can remember by far, the chunk system works like this: the chunk is actually a Custom Resource. It stores all the block IDs in a array, you can do it in a 2D array if you prefer. It's an array of integers basically, with the number 0 representing air block.

so, what the server and client sends between each other is just the chunk resource data. and the chunk mesh is actually built in the client based on the chunk resource data. that's it.

this chunk resource data can also be saved in disk to be loaded later."

How can this be made to save like how minecraft has its single player / multiplayer save games? The server can do the same for multiplayer worlds I would imagine. I wonder how to implement a save feature like you say could be done? I can do all the work for a prototype I just need some guidance is all if I get stuck or if there is an obvious thing I should do at crossroads or just general advice too for you are really experienced and know a lot here.

#2 (comment)
"Also how do we test saving the game chunks to disc and loading them up in a multiplayer world?"
"I dont even remember if i implemented that in this project. i do remember rewriting this project in godot 4, but i scrapped it. but i think i did implement it in this project... in a nutshell: idk."
When you say "but i think i did implement it in this project..." is there a save feature somewhere in the code or a work in progress or like what is the state of the save feature? How far is this already and what needs to be done to save the chunk data? I am super curious because if w can save the chunk data to disk and load a world and it remembers the previous dynamic block placement in each chunk that is a massive success. What would this take and where is a good start to this it is critical feature that's the big key to making everything work in multiplayer.

How can this support a 2D top down perspective? 2D array or something like this? Is there anything really different from these two projects to watch out for?: https://github.com/fanherbaty/crustycraft

#2 (comment)
"I do remember rewriting this project in godot 4, but i scrapped it."
What can be done to start on this again what should I do? Just go at it or is there a little start or a place you left off? I;d like to help make it happen.
Godot 4.2.1.NET+ conversion do I just run it in the Godot 4.2.1.NET editor and at every error type to convert it to work in Godot 4.21.NET should that word or or this something more to do? Here is an example from the previous thread on a similar Godot 3 to Godot 4 conversion: #2 (comment) Will this work kind of similar to this with a Godot 4 conversion / update?

Thank you for helping so much already too. I hope I can give back and make this really good project even better and have the Godot 4.2.1.NET+ community enjoy it too. Where should this start and what are your thoughts and suggestions? All feedback is welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant