World At War Multiplayer 2023

0 views
Skip to first unread message

Jkobe Peoples

unread,
Aug 3, 2024, 3:23:41 PM8/3/24
to planfolkpleftes

I have written a function that runs and checks the distance from origin, and does
UGameplayStatics::SetWorldOriginLocation(this, CurrentLocation);
When you are a certain distance away from the origin.

With my current setup i have the entire level loaded on the server (this is fine for the time being), and the clients are shifting the origin using the function i mentioned. (Checks distance from Origin, and rebases if above a certain size)

Floats have a limited amount of digits. Increasing the map size, will decrease the precision as the comma shifts to the right to accomplish greater numbers. Rebasing will help you to keep those floats small and precise enough. It can be used in multiplayer, just like jonimake posted above, you have to take care of the relative coordinates.

As this distance increases, so does the error.
For example, at 40074.28 Km (real earth size) this error is about 2Km. Any coordinate value calculated at this distance can be 2Km off in your absolute world position.
Things like teleportation and ai can often resolve to the wrong location. The magnitude of this depends on the specific calculations involved.

The decision of which of our 3 choices (or other choices depending on your requirements) is going to be based on the number of intended players, the size of your map, and the capacity of your dedicated server network.

When writing your code to handle coordinate translations, you often need to scale this to the actual size of your landscape tiles (total distance +/- X and Y) not to the limiting distance of the engine. The exception being a tiled landscape set to the actual limiting value, in which case the numbers are the same.

Figured I would ask this question, as I have not seen an answer. Is it possible for me and my one friend to have 1 world, and me and my OTHER friend to have another? I know the answer may not be as simple as "Create new world", but is it even possible as of now, and if so, how?

Yes it is. The world is saved as a folder called "servertest" in the sandbox folder of Zomboid/Sandbox on whoever is hosting the server. All you would need to do is copy that world and put it somewhere safe and delete the one in the server. When you start up the server it will generate a new world with a folder called "servertest" just like before. Copy that and keep it safe. So basically keep note of which world folder corresponds to whatever friends session. Then place it in the Zomboid/Sandbox folder to play in that world. After each game session you will need to backup the folder again since the world will of changed.

What I managed to do was make a folder in the Zomboid folder named PZ char backups, and I have all of the extra worlds in there. Like Connall said, you can just copy your old world, save it to a separate directory and replace it with the world you want to use with your friend.

I'm making a new multiplayer server and I can't figure out how to adjust some of the world config options. Most of them can be changed after the server is created using commands, then I can delete the world and let it regenerate with the new settings. However, some of the options available for single-player worlds don't appear to have associated commands, or at least they're not in the wiki. Is there a way to do this, either with commands or by modifying the files?

Yes, I'm familiar with that part of the wiki and already use those commands, but the specific ones I'm asking about are the ones that don't have commands. Does anyone know if it's possible to simply copy a settings file from a single-player world onto a server? Will that work? Has anyone done it? Or do the devs possibly have other world config commands that aren't documented in the wiki?

The ones that don't have commands usually don't for a reason--those settings are applied upon world generation and can't be retroactively changed without regenerating the world. Copying the config file would likely either do nothing, crash the world, or the game would demand a regeneration, the former two of which I find much more likely.

It may do nothing if those particular settings are only applied on world gen, which I find the most likely. If you paste them on an already-generated world, it doesn't have a chance to apply the settings, as the world is already generated.

It may crash your game because some config settings may be actively used in-game, and changing them might create some obvious complications/disconnect between the world itself and what the config tells it to do, and might result in disaster.

The last outcome would be the server demanding a regenerated world, which would only happen if the devs have already thought about this issue and put something in place, which at most would regenerate your world and be no different than copying in a different world file. It is very difficult to "repair" a world to a new config because of having to replace things, avoid overlap, and potentially modifying existing generation, all of which may cause problems in the long run. It is simply not worth the effort to implement function that fixes all those issues.

The last last outcome (and the least likely imo) would be that the config simply wouldn't care about the aforementioned issues and simply paste over your existing world with changed settings, which would not create your desired world. For instance, if you changed ore deposit rates, it would paste new ore deposit rates over the old ones, resulting in both new and old deposit rates combined--much more than you originally intended.

What would work is generating a new world with your desired settings and replacing all of the world files in your server with those. Such would make sure the config is applied on generation and that nothing is missed, and that all potential conflict issues are avoided. If your main desire is to keep a certain world you like, the best I can recommend is generating a new world (with your desired settings) but the same seed. It may or may not work depending on how the world generation system is set up, but it'd be your best shot.

I wasn't trying to apply them to an already-generated world, I was trying to adjust the worldgen parameters on the server then generate a new world. I wound up just generating the world in single-player using the usual options and then uploading the single-player world save to the server, which seems to have worked. It would be great if there were a way to set these parameters on a server in a config file before starting the server, which generates the world, but there seems to be no way to do that.

(Also, regarding changing worldgen parameters after the world is generated, it doesn't necessarily cause any problems. You can already adjust plenty of worldgen options after creating the world which only affect newly-generated chunks. If I can adjust the copper/tin surface ore generation rates after worldgen, there's no reason I shouldn't be able to change overall oregen rates. Ungenerated chunks just generate with the new settings. It makes a hard line between the old and new chunks, but it doesn't harm the world or the server.)

Glad to know it worked. I forgot config settings might affect ungenerated chunks, which you seem to have figured out for me. Unfortunately, servers are somewhat tough to change worldgen on (especially with third-party hosting), which hopefully should change once they get around to improving multiplayer.

Hi dude did you have tried these commands in your server? Its seems they do what you need. Its work in our server, but some only will work in the new generated chunks i think. i saw you solve the problem but for sure this extra info here will help other people looking for solve the same issue.

Hello all,

I have recently wanted to transfer my single player world where people that are not on the same Wi-Fi network can only join.

One where it is open to the entire public. or something

Any ideas?

From there, there is a folder named saves, your world file is there. Once you have your Minecraft server set up and downloaded from the Minecraft website, and your port forwarded, you want to launch the server once, it should create a folder called world, take the singleplayer world you want to be open to the public and swap it out with the world file in the server folder

For example, Space Engineers have rigidbody physics. So if we want to create a multiplayer game with server-authoritative architecture, it means that game scene on server side should contain all rigidbodies around all connected clients. Only server should simulate physics and transfer its transform parameters to clients. This is also known and obvious.

Because my method have some problems and I am not sure how to solve it properly.
For example, what if a player see an object which located at 10 km distance (much larger than a size of space pocket)
Or, what if two players in different space pockets see an object which located between them and could be visible from both space pockets.

Yes, some searching confirmed it in numerous locations including the Bullet issue tracker and Stack Overflow. Additionally the Newton Game Dynamics and Open Dynamics Engine libraries support double precision but I believe only Bullet has out of the box Unity support.

By the way, I heard many games with infinite world uses double precision engines. Such as Arma 3, Star Citizen or a new release Astroneer. Or Dual Universe which is created on quite unusual Unigene engine.

c80f0f1006
Reply all
Reply to author
Forward
0 new messages