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"

Is there a way to repeat the event on the exact same timing?

Hi all,

I'm currently working on a physics-driven puzzle game and trying to set up a custom replay system to prevent cheating without confirmation by a human. (i.e. game logic should be filtering the cheated sessions on its own.)

What I planned was simple. Implement fixed physics timestep, record a player's action(which actor he or she chose, which got activated, etc) and then run a simulation on the server to check if the gameplay result(score, time, etc) is legit.

I've finished physics part and recording part, but while I was trying to simulate the original gameplay, I noticed I can't catch the exact timing to fire an event. For example, during the gameplay, a certain action A gets recorded with the time indicating "2.09698112853..."

When I execute the recorded event during the simulation, I can get close to that timing("2.09300985...") but never the same value. And surprisingly that little difference(usually less than <.002) changes behavior of a physics actor much more than I expected, resulting in a different result.

I strongly believe if only I can find a way to execute events exactly when it should, the system would work as I intended.

Is there any way to accomplish this?

So far I've tried timer(looped by .00001 second), tick(frame interval chopped up to 100000+ iterations), delay node. None of them worked.

Product Version: UE 4.17
Tags:
more ▼

asked May 21 '18 at 07:19 AM in Blueprint Scripting

avatar image

netcop0207
81 8 13 20

avatar image GarnerP57 May 21 '18 at 09:48 AM

Trying to make a non-deterministic physics engine deterministic is pretty much impossible.

avatar image netcop0207 May 21 '18 at 10:20 AM

It sure is. I'm just trying to do everything I can.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

I am afraid even you find a way to solve your problem on your own machine none of your friends or customers are able to to play this game.

I suggest you change the entire logic

more ▼

answered May 21 '18 at 08:14 AM

avatar image

saeedc
2.4k 73 42 108

avatar image netcop0207 May 21 '18 at 08:56 AM

I'm sorry, but I don't follow. Could you elaborate?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Have you looked into how other games do replay systems?

Either each frame or every fixed interval of time (0.1s, 0.25s, etc., depending how accurate you need the data), they basically drop an invisible dummy actor where that object was, that contains its location, rotation, velocity, and adds them to an array. Then, when the "replay" kicks in, they read that array backwards (if you want to rewind), or from the last 30 seconds, your choice.

Here's an example: https://youtu.be/6RSPimgMW7c?t=36

more ▼

answered May 21 '18 at 12:48 PM

avatar image

Andrei Despinoiu
270 4 9 12

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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