x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How do I optimise the Vehicle Advanced Template for Multiplayer?

Hello,

I am working on a car-based combat game, and I realized through testing that when more than 4-6 players join (or AI) then everything starts to get very laggy. However, this is not necessarily a result of my networking blueprints, as this occurred extremely early on in development. (Note: I don't have much experience in C++, but I'd be willing to convert the project to C++ if a solution is found)

How do I fix this? Any help at all would be fantastic!

Product Version: UE 4.21
Tags:
more ▼

asked Jan 06 '19 at 05:35 AM in C++ Programming

avatar image

e3pojedi
16 1 6

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

The discussion around networked Physics/PhysX is a long one.

The root issue is that it is not easy to support Client Prediction and Replay for PhysX-driven vehicles. What this means is that you get a lot of stutter and a lot of input lag as soon as any network latency is introduced.

Most solutions to this problem that I've seen have ended up rolling a bespoke physics solution - in some cases not using PhysX at all (aka, Rocket League). Personally, I've just written my own solvers for vehicles and integrated similar netcode to Character Movement. There are pros and cons to each solution.

In C++, you can relatively easily switch PhysX vehicles to a client-authoritative model which will at least eliminate the input lag - but this won't suffice for a competitive game as players can easily cheat.

There is a Marketplace Plugin that claims to support multiplayer vehicles. I can't attest to whether it works or not or whether it suffers problems of it's own, but you can find that here: https://www.unrealengine.com/marketplace/blue-man-vehicle-physics

more ▼

answered Jan 06 '19 at 05:24 PM

avatar image

TheJamsh
775 53 81 131

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question