Back to Browse

Java physics engine: record and replay feature

116 views
May 4, 2020
2:08

This is a quick work in progress of a new feature for my physics engine. This feature enables to record the state of a simulation in a file, which can be used later to replay the simulation. The main benefit is that complicated simulations with lots of objects can be computed ahead of time and replayed later. Replaying the simulation is actually very cheap since most computations have already been done. Another interesting possibility is to play the simulation backwards or in slow motion. Here, the castle is first destroyed and then rebuilds itself, as if by magic. The objects being controlled by a replay can actually be mixed with normal objects. We can imagine the following situation: a player destroys some platform and then rewinds the time while standing on the rubble in order to be carried up into the air. However, the main drawback is not performance, as recording and replaying is actually very cheap, but rather the size of the record file which can quickly become important. For instance, the record file for the castle scene is already 160MB. This means that you should expect files of up to a few GB for very large scenes. This shouldn't be too much of an issue if the file is deleted afterwards though.

Download

0 formats

No download links available.

Java physics engine: record and replay feature | NatokHD