KoBeWi / The-Soulhunter

A MMORPG game prototype made in Godot game engine
MIT License
112 stars 10 forks source link

Can this work for Godot 4+ games with multiplayer and open world chunks? #2

Open WithinAmnesia opened 4 months ago

WithinAmnesia commented 4 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.

KoBeWi commented 4 months ago

I have yet to get your example working I get stuck in the character creation part with the hue selector. I am not sure what to do to get it working for a proper test? I would like to test it for sure its just I am not sure how to get it working?

idk if this helps.

https://github.com/KoBeWi/The-Soulhunter/assets/2223172/0de6d111-af56-4247-a222-25acbba75bf3

The game does not use mouse, you do everything with keyboard. If you can click anything, it's not intended.

As for saving chunks, you need to obtain the chunk data somehow (likely a PackedByteArray) and save it like I mentioned above.

WithinAmnesia commented 4 months ago

How do we get teh database to work? I installed MongoDB with command prompt I followed this: https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-windows-unattended/#std-label-install-mdb-community-windows-msiexec Yet when I open administrator command prompt and try to run this from desktop to make sure the path works("C:\Users\Matt\Desktop\TheSoulhunter>run_database.bat" it gives: "C:\Users\Matt\Desktop\TheSoulhunter>mkdir .database A subdirectory or file .database already exists.

C:\Users\Matt\Desktop\TheSoulhunter>mongod --dbpath "..database" 'mongod' is not recognized as an internal or external command, operable program or batch file.

C:\Users\Matt\Desktop\TheSoulhunter>" what should be done?

https://stackoverflow.com/questions/51224959/mongo-is-not-recognized-as-an-internal-or-external-command-operable-program-o I searched the error in google mhmm

KoBeWi commented 4 months ago

Find mongod.exe in the installation directory and add the folder with the exe to PATH: https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/

E.g. if mongod is in C:/ProgramFiles/MongoDB/bin, add this whole path to your PATH.

WithinAmnesia commented 4 months ago

image Oh excellent I got it to work. I did not do the path thing and I hunkered down and got MongoDB to work properly. Thank you for helping too.

WithinAmnesia commented 4 months ago

Your game has a save feature correct?

WithinAmnesia commented 4 months ago

The server dies with 2 people connected? I did some multi-boxing tests and the server dies with 2 clients? Hmm.

KoBeWi commented 4 months ago

It supports more clients, no idea why it would die.

WithinAmnesia commented 4 months ago

the multiplayer save feature works. Thats a first seeing a working multiplayer save feature that in these Godot examples.

WithinAmnesia commented 4 months ago

It supports more clients, no idea why it would die.

I'm not sure either for this is a crash I seen with as well: https://github.com/pvini07BR/mijocraft/issues/2 (GDScript Multiplayer Minecraft in Godot 3.XX) https://github.com/pvini07BR/mijocraft/issues/3 https://github.com/pvini07BR/mijocraft/issues/4

KoBeWi commented 4 months ago

the multiplayer save feature works

That's thanks to database. Also the save data is very simple, the world is not persistent. Maps load anew every time you enter one, only chests are affected by save data.

WithinAmnesia commented 4 months ago

1 client runs fine but as soon as the 2nd client logs in it crashes and the 1st client cant see the 2nd client but the 2nd client can see the 1st client only briefly before the game or server crashes. The only working complex games to do working multiple clients so far are https://github.com/Zylann/godot_voxel/issues/602 (Main Godot Voxel Game with multiplayer options and written in various languages with GDscript and C++ and C#) https://github.com/Zylann/voxelgame and JDungeon with https://jonathaneeckhout.itch.io/jdungeon + https://github.com/WithinAmnesia/ARPG/tree/ARPG-Infinite-Worlds

WithinAmnesia commented 4 months ago

the multiplayer save feature works

That's thanks to database. Also the save data is very simple, the world is not persistent. Maps load anew every time you enter one, only chests are affected by save data.

How can chunk data be saved like this?

WithinAmnesia commented 4 months ago

So how can the working multiplayer save system be used these kind of leading test candidates?

https://github.com/Zylann/godot_voxel/issues/602 (Main Godot Voxel Game with multiplayer options and written in various languages with GDscript and C++ and C#) https://github.com/Zylann/voxelgame ... https://github.com/pvini07BR/mijocraft/issues/2 (GDScript Multiplayer Minecraft in Godot 3.XX) https://github.com/pvini07BR/mijocraft/issues/3 https://github.com/pvini07BR/mijocraft/issues/4

KoBeWi commented 4 months ago

How can chunk data be saved like this?

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.

WithinAmnesia commented 4 months ago

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.

https://github.com/pvini07BR/mijocraft/issues/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.

https://github.com/fanherbaty/crustycraft/issues/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.

https://github.com/sirarandor/lux-terra/issues/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.

WithinAmnesia commented 4 months ago

How can chunk data be saved like this?

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://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." A possible lead: https://github.com/pvini07BR/mijocraft/issues/2#issuecomment-1953209200 "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."

WithinAmnesia commented 4 months ago

"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." 2D chunk array?

Hey can you look at this chunk data for: https://github.com/Zylann/voxelgame (requires https://github.com/Zylann/godot_voxel Godot editor) https://github.com/pvini07BR/mijocraft What methods should be considered to save / quantify the chunk data given by these two examples? Are they similar or like what your first looks? I am not sure what to exactly look for and you have proven skills for multiplayer saving.

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.

KoBeWi commented 4 months ago

I don't know these systems enough to tell how to save their data. But

"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.

In this case the Array would be the data you save I guess. So just do var_to_bytes(chunks.array) or something like that and then store the resulting binary blob in a file/database. If it's indeed Array, you might want to convert it to PackedInt64Array, I think it's more efficient to store.

WithinAmnesia commented 4 months ago

I don't know these systems enough to tell how to save their data. But

"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.

In this case the Array would be the data you save I guess. So just do var_to_bytes(chunks.array) or something like that and then store the resulting binary blob in a file/database. If it's indeed Array, you might want to convert it to PackedInt64Array, I think it's more efficient to store.

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?

WithinAmnesia commented 4 months ago

I found a lead for saving with the voxel game: https://github.com/Zylann/voxelgame/issues/85

WithinAmnesia commented 4 months ago

https://github.com/Zylann/voxelgame/issues/85#issuecomment-864661177 (on Jun 20, 2021) "This relates to VoxelStream, which is a part of the voxel engine that remains to be documented.

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). Depending on the settings, blocks get saved:

Straight after being generated, if save_generator_output is enabled on the stream
They get out of range and had changes
VoxelTerrain.save_modified_blocks() is called, typically used before quitting the game

To reset a save, deleting the contents of the folder or changing the path to another folder will make it go back from scratch."

WithinAmnesia commented 4 months ago

https://github.com/Zylann/voxelgame/issues/85#issuecomment-1955145256 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

WithinAmnesia commented 4 months ago

I don't know these systems enough to tell how to save their data. But

"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.

In this case the Array would be the data you save I guess. So just do var_to_bytes(chunks.array) or something like that and then store the resulting binary blob in a file/database. If it's indeed Array, you might want to convert it to PackedInt64Array, I think it's more efficient to store.

https://github.com/Zylann/voxelgame/issues/100 I found a lead the multiplayer does save to disc it is just now a question of how to properly save and load and access this data for the player. We got the save world working in multiplayer.

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

WithinAmnesia commented 4 months ago

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.

KoBeWi commented 4 months ago

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.

WithinAmnesia commented 4 months ago

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.

KoBeWi commented 4 months ago

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?

WithinAmnesia commented 4 months ago

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

WithinAmnesia commented 4 months ago

I just got the Godot_Voxel with BlockyGame to generate a flat world for testing in multiplayer: https://github.com/WithinAmnesia/ARPG/discussions/16#discussioncomment-8550111 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: https://github.com/pvini07BR/mijocraft/issues/2 (2D GDScript Multiplayer Minecraft in Godot 3.XX) https://github.com/pvini07BR/mijocraft/issues/3 https://github.com/pvini07BR/mijocraft/issues/4 ... https://github.com/sirarandor/lux-terra/issues/1 (2D Multiplayer expanding tile / chunk game with fog of war) ... https://github.com/KoBeWi/The-Soulhunter/issues/2 (2D Godot 3.XX multiplayer chunk game)[Your game project] ... https://github.com/fanherbaty/crustycraft/issues/1 (2D Minecraft with cave levels in Godot 4.2.1.NET+)

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.

WithinAmnesia commented 4 months ago

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

WithinAmnesia commented 4 months ago

https://github.com/Zylann/voxelgame/issues/103 How can entities and player storage work for this demo? Are there any examples or prototypes? Goal: Minecraft style entity and player storage system. Bonus account system.

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.

KoBeWi commented 4 months ago

AFAIK Minecraft world specifications are mostly open, so you can look up how they did it.

WithinAmnesia commented 4 months ago

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. https://github.com/devloglogan/MultiplayerFPSTutorial/issues/13 https://github.com/WithinAmnesia/ARPG/blob/ARPG-Infinite-Worlds/DevLogLogan%20RPG%20Inventory.zip Here is the Blockygame demo too it needs the Godot_Voxel engine module to work: https://github.com/WithinAmnesia/ARPG/blob/ARPG-Infinite-Worlds/Infinite_Worlds_V.000.006.1.zip

KoBeWi commented 4 months ago

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.

WithinAmnesia commented 4 months ago

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?

KoBeWi commented 4 months ago

Well my game has some basic inventory, but you can only pick and equip items.

WithinAmnesia commented 2 weeks ago

Hey again lol. So I got a teleporting mystery thing going on with Godot 4+ multiplayer and I remember I think you solved this multiplayer travel thing I think already? https://godotforums.org/d/40502-how-to-teleport-travel-to-another-scene-with-godot-4-multiplayer/10 So I remembered testing / tinkering with The Soulhunter MMORPG 2D Godot 3 demo and it has working scene to scene travel I think right / correct?

Are you familiar with JDungeon? https://github.com/jonathaneeckhout/jdungeon + https://godotforums.org/d/40502-how-to-teleport-travel-to-another-scene-with-godot-4-multiplayer

I am trying / working on getting a Community Godot 4+ M.M.O.R.P.G. working with documentation. The JDungeon demo is like ~9/10 close to fully working enough for a public demo made with documentation to help people learn how to make MMORPGs in Godot 4+; even if it is a smaller scale game it still helps. 2D is great to get started with for the asset creation and available CC0 2D art is ~8-10+ more easy to get / abundant than CC0 / public domain 3D assets of decent quality.

Anyway I found a big part where myself and lots of devs are stuck with not being able to get scene to scene multiplayer map travel working. That JDungeon Godot forum post has screenshots that show the JDungeon portals but they do not work for scene to scene travel. What should be done to help solve this community wide mystery for Godot 4+ multiplayer scene to scene travel? This is like the one big feature needed across many many Godot 4+ community demos and if this can be made possible and available to the community so many cool games can be made with the community.

How are you doing also? It's been a while; I hope things have been going well and you have been doing more cool stuff. I forgot how busy things can get too. I hope you are doing well.

Anything I can help with / any links / demos / tutorials too? Is there a way to get your Godot 3 MMORPG ported to Godot 4+ and also reverse engineer the travel mechanics to help JDungeon and like 20+ / a class of Godot devs all stuck on this zone to zone multiplayer travel feature? It's a big mystery for the community. Bit by bit eventually things can always get better.

KoBeWi commented 2 weeks ago

I'm not familiar with Godot's built-in multiplayer feature. I think it requires all players to be in the same scene. So if you want players in different scenes, you need to load all of them and separate with viewports (that's more or less how The Soulhunter works).

WithinAmnesia commented 2 weeks ago

I'm not familiar with Godot's built-in multiplayer feature. I think it requires all players to be in the same scene. So if you want players in different scenes, you need to load all of them and separate with viewports (that's more or less how The Soulhunter works).

I think I heard of that before. I wish I knew more about this. Is Soulhunter not complete Godot multiplayer (my memory is fuzzy)? Hmm I've heard of this before the view port thing.

Today with the discord of: https://www.youtube.com/watch?v=lnFN6YabFKg&list=PLZ-54sd-DMAKU8Neo5KsVmq8KtoDkfi4s This person said called SlayHorizon said: "...In my 2D MMO prototype, where you reach certain areas (checked by server aswell) such as a door to enter in a house for example, the server will make the player unload the current scene and wont receive any more RPC call from this scene then it will ask it to load a specific scene and it will make him sync with all the entities from this instance once the scene is ready.

To be able to handle multiple instances in the same server, I use viewport to simulate different "world physisc" as in my game there are server-side physics calculations and checks.

Or maybe if you got one big map, you might be more interested in an interest management system where you could only see part of map around you and receive only RPC calls from entities around you. Or even both, that's what I'am trying to do before open sourcing it but the code is very dirty."

Also on the Godot forum there was a 3D thing but it was different but similar. https://godotforums.org/d/40012-synchronizing-multiplayer-3d-cameras-and-items-fail/8

I have found this seamless tile loading and unloading system for multiplayer in Godot voxel blockygame demo (it is very complex and very difficult to make into 2D): https://github.com/Zylann/voxelgame + https://github.com/Zylann/godot_voxel .

It's not easy to keep track of this multiplayer zone / chunk loading and unloading but I'm wondering how to do this in 2D with Godot 4+?

Also I wish I knew how to properly do this from kuligs2 "Not sure about where to find the warp thing but like I mentioned it earlier, you just need to unload scene and load the next one.. Set up a area3D to sniff for when someone enters it, then connect that signal that gets emmitted when somebody enters it to a function that unloads and loads next scene. Experiment and you will find out how to do it .🙂

Check out my own conclusion here https://godotforums.org/d/40012-synchronizing-multiplayer-3d-cameras-and-items-fail/5 " https://godotforums.org/d/40502-how-to-teleport-travel-to-another-scene-with-godot-4-multiplayer/6

"I think it requires all players to be in the same scene. So if you want players in different scenes, you need to load all of them and separate with viewports." + "...Just need to unload scene and load the next one.. Set up a area3D to sniff for when someone enters it, then connect that signal that gets emmitted when somebody enters it to a function that unloads and loads next scene." + "The server will make the player unload the current scene and wont receive any more RPC call from this scene then it will ask it to load a specific scene and it will make him sync with all the entities from this instance once the scene is ready.

To be able to handle multiple instances in the same server, I use viewport to simulate different "world physisc" as in my game there are server-side physics calculations and checks.

Or maybe if you got one big map, you might be more interested in an interest management system where you could only see part of map around you and receive only RPC calls from entities around you. Or even both..."

I'm starting to see a common thread here with loading and unloading and viewports and RPC and server communication. I wish I could see this in action to learn and tinker with working examples.

Does The Soulhunter have a similar thing going on or as in what should be done to get these things to work for ~same scene / separate view port / load and unload scenes / chunks / tiles and sync and instances etc all described above? If one working Godot 4+ multiplayer demo can do this in MIT forever free it can free the community and great games can be made. What should I look at / how should be made to work? Its a big mystery and I think with decent work / community help it can be solved and help many people and grow the community.

KoBeWi commented 2 weeks ago

The Soulhunter uses a completely custom multiplayer implementation, it doesn't use the one provided by Godot. The server has multiple Viewport nodes, where each viewport is a separate room, but on client-side the players only load the room they are in. The server tells the client which room it should load.

WithinAmnesia commented 2 weeks ago

Hmm is Godot multiplayer kinda bad? It looks like it was easier for you to make something from scratch avoid Godot and make what you needed. I have experienced many bad / incomplete examples with Godot multiplayer. Is it better to just do what you did and risk the weird not Godot systems complications or can something like what you did be made within Godot and be easy for most people to operate like JDungeon / Blocky Game's all in one built in multiplayer that runs within Godot 4+?

KoBeWi commented 2 weeks ago

I implemented a custom solution, because I followed a tutorial that was possible to replicate only by manually sending packets. I'm not familiar with the Godot's multiplayer system to say whether it can be used for this task or not, but it would work differently from my game.

To reasonably implement what you want, the Godot's multiplayer has to support partial scene replication, i.e. you have a "master scene" where you can find every room of your game, but clients only receive their specific room. If this is not possible, then you need a custom solution.

WithinAmnesia commented 2 weeks ago

I feel that it should be in Godot but I don't have any working examples. I searched ~377+ github Godot rpg / multiplayer repos and none have this feature and yours does not use Godot multiplayer sorta so its scambled eggs trying to put this together. It's better if its all in Godot. Yet but if Godot just sucks wayyy too much then It might be forced to use what you did but then its extra complicated for most people to learn 2 systems. Yet but if that works and Godot is busted then that maybe be the only real viable way forward. Perhaps maybe no one made a working multiplayer because godot just just sucks wayyy too much / no engine devs made good examples. Godot 4+ can do the servers yet there needs to be a working community example and there is yet to be one found that completely solves this mystery.

So now we have like 4-6 branches:

2D:

3D:

Then it seems I must choose / focus first my efforts upon something to get working:

Its like I gotta pick one to start and I'd like the Godot servers to keep it all together but if that's just not a reality / no working examples then there needs to be something that works.

What is needed to get Godot 2D ARPG with separate maps / areas in multiplayer to work like The Soul Hunter but top down and sorta like Zelda / Diablo? Should a new RPG be made from scratch that is built beside the Soul Hunter that learns from other Godot ARPG projects like:

KoBeWi commented 2 weeks ago

Well most of all it needs lots of work to do it, so you need someone (preferably a team) knowledgeable and dedicated enough to carry such project.

WithinAmnesia commented 2 weeks ago

Well most of all it needs lots of work to do it, so you need someone (preferably a team) knowledgeable and dedicated enough to carry such project.

Would The Soulhunter made in 2D top down and in Godot 4+ work as a good starting point? I might have to make it from scratch but if I know that the BIG mystery of zone to zone travel in multiplayer can be solved day 1 starting the project. That would be wayyy better than starting another 1 map no travel multiplayer tutorial.

Also if the BIG mystery is solved like with The Soulhunter then other nice rpg features can be added. Such as like UI inventory mechanics etc... The Big thing is networking and zone to zone travel to get something working. Everquest classic / Project 1999 and Ultima Online and Diablo 1 and Diablo 2 and Baldur's Gate 1 and Baldur's Gate 2 have zone to to zone travel by teleporting to different maps with multiplayer.

Should I refocus on remaking something like the Soulhunter engine / dev kit but top down and in Godot 4+ and use your working multiplayer server set up to get something started? I think if done right and polished up and working smoothly with proper documentation that a top down 2D Godot 4+ multiplayer ~M.M.O.R.P.G. MIT forever free community dev kit like The Soulhunter would be great success for the community and so much work can be built upon it like legos as well. What should happen to start this / what are your thoughts and feedback / suggestions?

KoBeWi commented 2 weeks ago

Would The Soulhunter made in 2D top down and in Godot 4+ work as a good starting point?

Eh, maybe? Soulhunter is not a great piece of software. It kinda works, but every part could use some improvement. I remember adding new content and features was a chore, so I'm not sure if it would work well if you plan to expand the game a lot. Maybe this can be fixed or maybe it's broken fundamentally.

WithinAmnesia commented 2 weeks ago

Would The Soulhunter made in 2D top down and in Godot 4+ work as a good starting point?

Eh, maybe? Soulhunter is not a great piece of software. It kinda works, but every part could use some improvement. I remember adding new content and features was a chore, so I'm not sure if it would work well if you plan to expand the game a lot. Maybe this can be fixed or maybe it's broken fundamentally.

Well right now every other Godot multiplayer example on github / tutorials (to my knowledge) does not have working zone to zone travel. So even if the Soulhunter is a bit buggy / strange to work on. It still works / gets more features working than more fancy demos with less fundamental features.

I'd rather something that has potential to grow and can be fixed than a shiny system that cannot like run properly / is stuck to one map.

I've been meaning make a from scratch build but I should probably look into how to get The Soulhunter topdown and work from there. Also one should be using CC0 / public domain asset such as: Foozle - CC0 Multiplayer ARPG: https://foozlecc.itch.io/lucifer-exterior-tileset and then get help with the UI / inventory with potentially: Wyvern Shield Triggers + Box Inventory: https://github.com/don-tnowe/godot-wyvernshield-triggers + https://github.com/don-tnowe/godot-wyvernbox-inventory . then look at any funky features with networking rpg features / odds and ends with JDungeon: https://github.com/jonathaneeckhout/jdungeon . Then look at some of the stat / mechanic tutorials for advanced rpg system like character creation and deeper rpg mechanics like Diablo / Zelda / Baldur's Gate stuff from Flare Engine: https://github.com/flareteam/flare-engine + GemRB: https://github.com/gemrb/gemrb + Game Development Center - Dedicated Multiplayer ARPG: https://www.youtube.com/watch?v=lnFN6YabFKg&list=PLZ-54sd-DMAKU8Neo5KsVmq8KtoDkfi4s

So I guess the struggle now would be to get The Soulhunter topdown and using CC0 2D assets as step one I think? What do you think are the first steps towards this community 2D MMORPG MIT Godot 4+ dev kit? All thoughts, feedback and suggestions are welcome.

KoBeWi commented 2 weeks ago

https://github.com/loudsmilestudios/TetraForce is a top-down multiplayer game and it's open source, you could check it out.

WithinAmnesia commented 2 weeks ago

https://github.com/loudsmilestudios/TetraForce (How did I nor find this before hmm lol?). Do you figure this is a better start? I Should look into this hmmmmmm.