Replicating a simulation with Box2d, part 3.

Published November 30, 2017
Advertisement

In the last post, I explained how to solve the box2d issue about cloning a world. It's pretty simple, fairly fast and reliable in its results.

I didn't use it. Why? Because there are some cases (like my game) that it doesn't work. And those cases happen when the game has two+ characters and one can go back to change their behaviour but the other one does exactly the same.

Let me put it in pictures.

If you have one character going back in time:

pHedaTZ.png

The mechanic is straight forward. If the character goes back in time and does the same movements, the result will be exactly the same, because the copied world will be the same as before.

If the character goes back in time and does something different, well, the result will be different, but that makes total sense, if you change the past you cannot expect the future to be exactly the same.


But, if you have 2 characters, let's see what happens:

21P13kr.png

Let's say character pink stays still while character blue jumps around. A possible future is generated and the pink character observes it. This is the critical part, somebody that is not causing the events but is able to see the possible future.

Now, when everything is rewound, and the pink character decides to move around, the copies will not be the same as before. Thus, the future of the blue player (that was originally observed) might change, even if the pink player never touches the blue player or its surroundings. This makes no sense in the eyes of the second player.

This is a huge issue! Imagine in Posable Heroes doing some tasks with the blue character, and then coming back to work with the pink character only to realise your blue characters timeline is altered. Since the game requires precision, this is unacceptable.

On the 4th and final post, I'll explain what I did to finally solve this issue (spoiler alert: thank you open source).

 

If you are interested in Posable Heroes, you can wishlist it on steam.

0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement