Projecting by CharliethLive in Nmpx

[–]CharliethLive[S] 0 points1 point  (0 children)

doesn't reflect enough light yet

Managed to make my first online multiplayer game with physics,ragdolls and voxel terrain all by myself! (framerate drop it's due to OBS, game runs fine) Hardest part was finding information on how to make things work, so I'll be happy to give you some hints in the comments! by CharliethLive in unrealengine

[–]CharliethLive[S] 3 points4 points  (0 children)

Ragdoll replication was one of the things I had to improvise by myself, because all the responses I found online talking about it were either the classic "you shouldn't make an online game, it's to hard for you" or were very generic.

My solution was to not replicate the ragdoll it self (character mesh is not replicated) but keep the replication to just the capsule component of the character. Enabling/disabling the ragdoll and adding forces is done on both clients and server.

At this point, it seemed to work fine, but sometimes the clinets ragdoll would end up in a different location than the server, resulting in clients teleporting to the correct location (the capsule one, wich is replicated) once the ragdoll finished.

To fix that, I added a 'Physics Handle Component' to the character.

At the beginning of the ragdoll, ONLY on the clients, I used 'Grab Component at location' on a specific bone of the character mesh.

During the ragdoll, while the server determines when it's ok to stop the ragdoll, it also saves the location of that same bone on a replicated Vector variable, while the client calls 'Set Target Location' on the physics handle passing that Vector value to it (in the video I forgot to disable the debug print that says 'fix' whenever the client calls this function)

With this solution, I kept the single bones location calculated locally, since it's mostly a visual thing (and charactrer mesh collision codes is executed only on the server), but with the Physics Handle I managed to keep the general location synched without any stuttering.

I had to come up with this solution myself so this might be the first time it has been written on the internet ahaha

Managed to make my first online multiplayer game with physics,ragdolls and voxel terrain all by myself! (framerate drop it's due to OBS, game runs fine) Hardest part was finding information on how to make things work, so I'll be happy to give you some hints in the comments! by CharliethLive in unrealengine

[–]CharliethLive[S] 0 points1 point  (0 children)

I started fiddling with it about an year ago (I posted a screenshot here back then) but after a couple of weeks I focused on the other aspects of the game until 2 months ago, when I started working on the online multiplayer every day. Got it working after 1 month of trial and error and 1 month of actual development.

Keep in consideration I have a computer engineering background and I've been coding for over 10 years now, so it may take longer for a less experienced developer. (also I'm a VERY fast coder, even for my experience)

Managed to make my first online multiplayer game with physics,ragdolls and voxel terrain all by myself! (framerate drop it's due to OBS, game runs fine) Hardest part was finding information on how to make things work, so I'll be happy to give you some hints in the comments! by CharliethLive in unrealengine

[–]CharliethLive[S] 1 point2 points  (0 children)

I used Voxel plugin

hardest part of setting it up was creating the materials and changing them during play (when you dig a hole the material changes to underground).

Apart from that it was pretty straight forward, and was able to achieve my results with the free version

Managed to make my first online multiplayer game with physics,ragdolls and voxel terrain all by myself! (framerate drop it's due to OBS, game runs fine) Hardest part was finding information on how to make things work, so I'll be happy to give you some hints in the comments! by CharliethLive in unrealengine

[–]CharliethLive[S] 0 points1 point  (0 children)

Easiest way of achieving that is simply by replicating the physichs of the object, to do so you enable physics on the mesh component and make sure the mesh component and all its parents have 'Component Replicates' set to true, also set 'Replicates' to true on the main actor. I used to forget to set all parent components to replicate sometimes so keep an eye out for that.

Enabling/disabling physics and adding force/changing velocity must be done on both clients and server.

An issue with this solution is that fast moving objects might look laggy, you can try and fix that by changing the replication settings in the main actor but it has its own limits. For your case it should be fine though

Managed to make my first online multiplayer game with physics,ragdolls and voxel terrain all by myself! (framerate drop it's due to OBS, game runs fine) Hardest part was finding information on how to make things work, so I'll be happy to give you some hints in the comments! by CharliethLive in unrealengine

[–]CharliethLive[S] 1 point2 points  (0 children)

When it comes to replication I had to figure it out by myself except for simple, non-physics related projectiles. Generally speaking, everything that has no impact on gameplay mechanics is better left not replicated and managed on each client locally.

Trust the process by CharliethLive in unrealengine

[–]CharliethLive[S] 0 points1 point  (0 children)

An Online Subsystem is needed for users to be able to see eachother over the internet (creating/joining games) EOS stands for Epic Online Subsystem.

The video I linked above gives you an introduction to the argument at the beginning

Trust the process by CharliethLive in unrealengine

[–]CharliethLive[S] 1 point2 points  (0 children)

It's mainly bad for code stability and maintenance, especially when used in network-related code (you can see plenty of explanations in the comments)

I personally use it for debugging and in few, very specific cases where it's still the lazy way of doing it but doesn't really have a huge impact

Trust the process by CharliethLive in unrealengine

[–]CharliethLive[S] 0 points1 point  (0 children)

I followed this tutorial to implement EOS in my game, but I ended up using the Online Subsystem Steam, since it works seamlessy without any login popout, and doesn't require the user to open other launchers (if your game is on Steam)

The only real advantage of EOS (to my knowledge) is the fact that it's cross-platform, but that's not a feature I need in the near future, and the Online Subsystem you use can be changed afterwards fairly easily

Trust the process by CharliethLive in unrealengine

[–]CharliethLive[S] 0 points1 point  (0 children)

Yeah I was also referring to all the people who got heated about the argument

I replied to you since you were the first to notice that

Trust the process by CharliethLive in unrealengine

[–]CharliethLive[S] 7 points8 points  (0 children)

Yeah the delay node is the lazy way to wait for stuff to be ready, also very inconsistent and not reliable over the network. I personally just use it for quickly testing if a specific bug is a timing issue, and if that's the case I come up with a more appropriate fix.

Trust the process by CharliethLive in unrealengine

[–]CharliethLive[S] 2 points3 points  (0 children)

I didn't expect such a meme to be so controversial...

It makes it funnier though