-
Notifications
You must be signed in to change notification settings - Fork 10
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? #2
Comments
This project was made in Godot 3, so it would need to be upgraded first. It doesn't use Godot's multiplayer system, but a custom one. There is a support for loading/unloading instances (rooms), but it's rather simple and easy to replicate. IIRC the PDF explains the inner workings: https://github.com/KoBeWi/The-Soulhunter/blob/master/Paper/The%20Paper%20Eng.pdf |
Here is an update since I last posted. 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 |
I can't run the project, nor open it in the editor. Getting some error spam about tiles. If you want seamless loading, if you make your chunk be size of the screen, you should be loading 3x3 grid of chunks, because when going between chunks, you will see multiple of them at once. As for unloading, in my project I had a timeout (I think 1 minute?). If no player was in the room for that time, it was unloaded. Though if the player is moving fast between chunks, the timeout could adjust dynamically to unload far chunks. |
Oh excellent. What are your thoughts and feeling and ideas for what should be done for seamless chunk loading and unloading now with this update and promising code from Theraot? I hope you can read this code better than I can Oh 1 sec. |
error spam? What does this look like? I had to re-import stuff lots and there has been unable to write / lack permissions before but it has also been an issue of too long directory. So try a short directory path too, it might help? What system and stuff are you using I might be able to help get it running? All feedback is good. |
powershell_zF6ApB7oHo.mp4This, forever. (the tile errors begin a bit later) |
Interesting. oh! https://github.com/jonathaneeckhout/jdungeon/tree/d941345fd187e51d7d51d24027838baae3ba4b78 this is the JDungeon main branch with the in sync version that the ARPG demo is based from its like 99% the same minus its 256x256 and the test is 128x128. |
Did I corrupt the ARPG 128x128 version? Hmmm. I uploaded it and downloaded it from its own github branch and tested it and it worked? But its supposed to work on not just my pc so I wonder what the issue is. Can you run the regular JDungeon from that link? If so it must be an issue with my 128x128 version. Maybe the .godot/imported section hmm. |
What Godot version exactly? |
Godot 4.2.1.NET https://godotengine.org/download/windows/ or linux / mac .etc |
Ok I managed to run it, but only the server (the client couldn't log in for some reason). Looks like your chunks are very big (I mean compared to the screen size). Not sure how a 3x3 grid would behave, maybe a better option is loading chunks when a player gets close to the border. There is space for that. Also for chunked maps I'd suggest creating some specialized editor, because editing them separately is going to be a hassle if they are supposed to link seamlessly. So what do you expect from me exactly? I already described the state of this project. I can give some general advice, but I'm not a networking expert. I didn't make any multiplayer game since I abandoned the current Soulhunter. |
I updated the main page with start instructions now.
|
Oh well I just need some advice and like thoughts and what should be pursued? this is a complex issue and I will make a lot of errors so like if any help and or guidance can be give n that would be great. I just need need like testing and what to do next for I'm not really goo at this but if eel with the right people we can find the solutions together. Once we find what works then everyone can benefit too. So it is important for myself be open minded and like I just need some ideas and knowledge and like any suggestions help too. Its really hard to find propel who are good at this stuff so any advice would help. Any thoughts and questions and insight and like what would make sense to do next with this big puzzle would be so helpful. I'll try to find people who can help too where maybe this puzzle needs a community to solve? Any feedback is welcome. |
I didn't look at the internals, but your gateway shouldn't be a Godot app, because it creates unnecessary overhead. Also perfectly the server shouldn't be a Godot instance either, or at least it should be as light as possible. In my project I couldn't work around that, but yours seem to be simpler though, because it doesn't really require physics. That's the advice I can give after seeing the demo. That said, I don't really have time to provide any serious help. Seems like this is an open-source project? You'll need to find many people if you want to succeed, especially when you aren't experienced yourself, so good luck with that. |
Okay I am back again sorry for the long reply times. Yeah the server being together is a simplicity thing. It was originally separate but it was hard to start and a lot of people struggled so it was made simpler and all together. Pros and cons you are right its better to have it separate but its more simpler to have it together. I wonder what to do here then: How do we get these simple yet work good together? That is a puzzle too. "In my project I couldn't work around that, but yours seem to be simpler though, because it doesn't really require physics. That's the advice I can give after seeing the demo." "That said, I don't really have time to provide any serious help. Seems like this is an open-source project? You'll need to find many people if you want to succeed, especially when you aren't experienced yourself, so good luck with that." You are right I'm not the bets at this but like I think if I try hard enough and we find solutions together and like it'll take a bunch of people like you say in the community to come together and solve this big puzzle and once its solved everyone benefits. Also we can stop using Unity and Unreal and other for profit game engine that could like on a whim ruin everything by being too greedy like Unity. Unreal is owned by Tencent in China so like that just one back update away from being like Unity then what? All we have Godot then and that's all we need for its open source forever free. Once we solve this 20+ year old critical massive multiplayer player infrastructure puzzle we can start building massive multiplayer games across the entire community for the foundation would be there forever free for everyone. I'll be around just I'll try to get the community together too and rally behind this multiplayer seamless chunk loading and unloading system and try and solve this puzzle by by bit. |
https://github.com/KoBeWi/The-Soulhunter how do we get the game going? It is Godot 3.XX and the server .zip is in a strange website that won't allow the download? |
The link was dead, I updated it. |
Do you want to make this into Godot 4+? Your game could use a Godot 4+ update to work now? Godot is using 4+ now and its not backwards compatible. Yes there is so long term 3.XX support but 99/100 new projects are using Godot+ and the dev team is focusing on Godot 4+ and eventually wants everyone to use Godot 4+. I really hope so for there are very few really talented people like yourself. |
Well as I said, the project is no longer developed, so I have no interest in updating it. The source is available if someone wants to upgrade it (there isn't much code to change). |
What code needs to be updated to Godot 4 and what would that look like? What are you doing now? |
How do you get past the hue part logging into the game? i go to make an account i have both the server and client.exe running and when I type in like username 'test' password 'test' set hue to default red it like stops after pressing enter? What should be done to get the game to work? I let it go past the windows firewall too so its a mystery |
Did you run the database? You need to run database, then server, then start game, register account and login. I just tested and it still works.
Run the project and fix all errors. Lots of stuff was renamed, so the methods need to be updated to new names etc.
My current main project is Voice of Flowers. I had big plans for The Soulhunter, but making a MMORPG is too much hassle. I might revise the project in a different form one day. |
"Run run_database.bat (requires mongodb installed)" in 'how to run'. is the other one Polish? I worked on Polish tank history before lol. "I had big plans for The Soulhunter, but making a MMORPG is too much hassle. I might revise the project in a different form one day." Awwwwwwwe. You should do the MMORPG one too i know its hard but its worth it. I got booted from the JDungeon people cus the server drove them crazy they like Matthew not one more server question reee 'but how does the chunk talk to the server?' -thats it delete the questions and ban. I Asked too many questions too quickly overstressed the poor devs lol. They did there best but they having a hard time with errors too. MMORPGS are hard too. I think we are still friends with the JDungeon people its just servers are hard to expand lol. You know people like yourself are really hard to find. I try to keep track of people and treat them really good. Do you have any plans to get the MMO stuff and running? Its hard not a lot of positive stuff too or what happened last time, maybe it'll be better now? Any feedback is welcome. |
How do get the "mongodb installed"? Also I made the comment bigger above. |
https://www.mongodb.com/atlas/database mate you gotta buy mongodb like why use godot then? Hmmm I'll keep searching. |
MongoDB Community Server is the free and open-source version of the NoSQL database system. |
Download and install: https://www.mongodb.com/try/download/community
No, as I said, too much hassle. I spent a few months developing it and it's lagging as hell. I didn't even solve basic problems. Adding content is a nightmare when you need to consider all the networking stuff and with MMOs you want the server to be fully authoritative. |
How can chunk data be saved like this? |
So how can the working multiplayer save system be used these kind of leading test candidates? Zylann/godot_voxel#602 (Main Godot Voxel Game with multiplayer options and written in various languages with GDscript and C++ and C#) |
Well the same I guess, but you need to serialize it. Not sure if MongoDB supports binary data though and saving it as String would be inefficient. Also the way you serialize data depends on the system and its data, but ultimately you should get some String or byte array that represents your world. In your case chunk data and player data are separate (my game only stores player data). Which means you need separate table to store data of each chunk and save it periodically. |
https://github.com/Zylann/voxelgame Is the most complex seamless multiple client multiplayer chunk system I have encountered and it runs on Godot 4.2.1.NET (technically its own voxel module version but what ever its still Godot 4 .NET lol). yet it does not save and its a bit over kill but its works really good. pvini07BR/mijocraft#2 Has a promising way of saving chunk data and its already in sorta 2D (side scroller but not top down but close). It doe snot save though too. It has a buggy multiplayer that should support multiple clients but in practice it crashes and its in Godot 3.5.3.NET too for extra work. fanherbaty/crustycraft#1 Is a 2D top down minecraft looking game but I'm not sure how big the chunks are and its not multiplayer but has has loading of subterranean areas too. sirarandor/lux-terra#1 (Multiplayer expanding tile / chunk game with fog of war) This has multiplayer testing but the chunk / tilemap got out of hand but it is top down and 2D. It did not unload the chunks it looks like, it just wrote more and more. |
https://gist.github.com/theraot/31515e28e2d8bfea33f6c6d5bcd852f6 (BinarySerializer for Godot 4.2+ from Theraot) this is being actively developed and the author wants more testing on it and says it could help with saving. "Also the way you serialize data depends on the system and its data, but ultimately you should get some String or byte array that represents your world." 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." |
"In your case chunk data and player data are separate (my game only stores player data). Which means you need separate table to store data of each chunk and save it periodically." Hey can you look at this chunk data for: Or what should I do to help do this too? What should I look for and how do I recognize what to spot and think about with these 2 example for data storage so it can hook up to your multiplayer save system and hopefully use something like https://gist.github.com/theraot/31515e28e2d8bfea33f6c6d5bcd852f6 (BinarySerializer for Godot 4.2+ from Theraot) I fuzzily remember spotting another binary serializer maybe for one of those minecraft servers too in the comment section some where. |
I don't know these systems enough to tell how to save their data. But
In this case the Array would be the data you save I guess. So just do |
Okay so the https://github.com/pvini07BR/mijocraft has buggy multiplayer but more approachable data. Oh I'll ask the author of the https://github.com/Zylann/voxelgame about how to save the multiplayer data and also give some details on how the data is stored? |
I found a lead for saving with the voxel game: Zylann/voxelgame#85 |
Zylann/voxelgame#85 (comment) (on Jun 20, 2021) Currently in the blocky_game, the terrain is continuously streamed block by block (where "block" is a 16x16x16 chunk) and saved to files under a folder. Currently it uses VoxelStreamRegionFiles so the format is similar to Minecraft: a bunch of region files, where each contains a bunch of blocks. The path to this directory is set in the editor, but could be set at runtime if necessary (as long as it's done before the scene runs).
To reset a save, deleting the contents of the folder or changing the path to another folder will make it go back from scratch." |
Zylann/voxelgame#85 (comment) I made an inquiry about how to save on the big game complex Voxelgame. If this can be saved to harddrive folder and have the saved chunk data be loaded up with server with the multiplayer features working with multiplayer clients then we are have so much opportunity to learn and grow and reverse engineering an tinker. I think this can solve 2D and 2.5D and 3D massive multiplayer worlds static and dynamic. This is promising. https://voxel-tools.readthedocs.io/en/latest/overview/#storing-voxels + https://voxel-tools.readthedocs.io/en/latest/api/VoxelStream/ hmm |
Zylann/voxelgame#100 |
Zylann/voxelgame#100 (comment) 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: Zylann/voxelgame#101 |
Requirements: A hand made and dynamic main over world map 100 areas combined with 1,024 x 1,024 tile map for an at least tile map size of 104,857,600 tiles with 16 x 16 pixel tiles at least. Perhaps double that with subterranean and interiors included to the total amount of tiles for a multiplayer seamless chunk system. The intended client / player / population / server size is to be ~2K to ~16K+ clients on one server. How can we convert the Blockygame multiplayer seamless chunk system for this forever free open source forever free goal? My first thoughts are to get just to the basics and start from a stripped down 2D array. Yet I have to do this properly to keep the dynamic multiplayer seamless chunk system intact and future proof for 2.5D and 3D games; when they are ready to be made in subsequent order. I must seek guidance to do this properly and make a beautiful work for the community to be empowered with too for making massive multiplayer games. I call this whole open source forever free community dynamic multiplayer seamless chunk system Infinite Worlds. |
Important question: is your chunks supposed to be modifiable or will they stay mostly intact? If the players have no way to modify chunks, but only do some basic interactions (like idk, kill monsters, open doors etc.), you don't need to keep everything in database. You could even use Godot scenes and simply load them as needed. |
Dynamic. It will be dynamic but by design more stable so it has aspects of a static M.M.O.R.P.G. as World of Warcraft or Old School RuneScape but it will be able to change the chunks and save to the server chunk data. Even if it's like Wurm Online where the world is technically dynamic but it is very slow to do so. In that the world stays close to world creation but can be changed by the players; gradually with sufficent effort / organizing / kinda likeWurm's mountain tunnel but hopefully more full of life and wonder. Yet hopefully not like Wurm where its creepy and more like WoW and OSRS. Where people play them but technically its like Minecraft with just more traditional western video game design values. So when people are allowed to run the world like in Dragonrealms it naturally kinda is like D&D where the world is fairly difficult to change but can be fully mastered by the player-base with sufficient effort and organization of division of labour like in real life history. I do not intend to have the world be easily massacred like in 2B2T's spawn area but looks and acts intact but these are design choices and not engine capabilities. You can take Minecraft and make all the tools weak and the blocks strong and you end up with this more or less with just some design tweaks. The engine needs to work first though as a fondation for all this though lol. Also I have a mostly handmade world with some procedural generation for helping in larger areas / get it to simulate earths natural terraforming / planet systems. So as for more immersion / connection to real life experiences / world immersion / good for the natural human experience. So the world feels like another version of real life but with magic and spiritual stuff and cool stuff added so its the best of a bunch of things all put together as one. What are your thoughts and suggestions? What should be done for this 2D Blockygame system conversion so we get this general use multiplayer dynamic open-world seamless chunk system in Godot 4.2.1.NET? All feedback is welcome. |
Well I don't get one thing. You keep bringing Minecraft and voxels and stuff, but the game is supposed to be 2D. Do you have some early screenshot of how it would even look? Mockups? Maybe videos? |
The data and the chunk system from the multiplayer Minecraft system are really the key. The voxels can be 2D technically its just the data storage and management for multiplayer which is the key. how they are rendered is more client side and its still important but everything relies on the chunk system working in multiplayer. I have some rough rafts yes but its more like I made a bunch of pathfinding prototypes. A lot of my work can be found here but its not the same format but a general idea. https://www.deviantart.com/withinamnesia/gallery/all + https://www.deviantart.com/withinamnesia/gallery/64014697/agabal-r-p-g-project + https://www.deviantart.com/withinamnesia/art/Mage-Afar-Province-Approximate-Rainfall-Range-896982600 + https://www.deviantart.com/withinamnesia/art/AGABAL-World-Map-The-Burning-Emerald-with-Earth-896834630 |
I just got the Godot_Voxel with BlockyGame to generate a flat world for testing in multiplayer: WithinAmnesia/ARPG#16 (comment) The code for the flat world generator makes ~3 layers of grass (instead of just 1) and it might be a bit buggy but it works although I should have a simpler one like fill all with grass for example but I was not sure how to code that so i just made iterations and slowly got it to work for multiplayer). Each chunk is 16x16x16 blocks so I have to optimize that into 2D better. It works, it's just now I'm trying to figure out how to make it 2D and not 3D but its progress. I'm not sure how to start the 2D. There are some examples of minecraft in 2D with 2D arrays but I'm not sure how to get the 2D mode going and how to keep the chunk system together. It took a while to get the blocks to be flat and the code was a case of trial and error switching things on and off and adjusting values testing in multiplayer. I am trying to not be bound to the special Godot_Voxel engine module / the special Godot Voxel engine so this solution can be used in regular Godot Engine 4.2.1.NET+ editors. The big thing now is trying to get the 3D chunks into 2D chunks and then test in Compatibility mode. I have some examples that might help for a start but I'm not sure its super amazing at everything but they might help a bit to get a foothold of what to do next: What should the next step go? What are your thoughts and suggestions? Should I just keep tinkering away with the 4 2D multiplayer godot game demos and keep trying new things until something works with the 2D port of the multiplayer chunk system with Godot_Voxel? All feedback is welcome. |
Zylann/voxelgame#101 (comment) Big 2D/3D hybrid progress update! |
Zylann/voxelgame#103 How can entities and player storage work for this demo? Are there any examples or prototypes? How can entities and storage system like chests stored in chunk data like minecraft? Bonus for account linked storage like M.M.O. player inventory and banks / minecraft player account inventory with shulker boxes. |
AFAIK Minecraft world specifications are mostly open, so you can look up how they did it. |
Do you have any free time to look at the code for this RPG Inventory from scratch tutorial and see how it can be translated / implemented with the Blockygame multiplayer demonstration? What should be done? What are your thoughts and suggestions? All feedback is welcome. |
I don't really have time to look into it, but inventory systems are not that complicated. For multiplayer it would be more or less the same, but when you do some actions on the items (rearrange, use, drop etc.), you also send this information to the server and server validates that action. When you open inventory, it needs to pull data from the server. If the action you performed is invalid, it should also force updating the inventory to server state. |
Authority control for the server is that right or however it is said? I wonder if there are any working examples to learn from to see how to code this in Godot 4? What should be done and what is the proper way to do this? |
Well my game has some basic inventory, but you can only pick and equip items. |
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: