[MP] How to sync animation in multiplayer games

3

Index

Attached Files

The following files have been attached to this tutorial:

.capx

dfnanimateiv.capx

Download now 188.71 KB
.capx

dfnanimateiv2.capx

Download now 188.38 KB

Stats

7,322 visits, 14,626 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 10 Oct, 2014. Last updated 19 Feb, 2019

Optimized Implementation

If you have understand the process flow from previous page, you should be able to notice the redundancy of the actions and conditions. The instance variable used from previous page, which are "Movement" and "AnimationState" are the redundancy in this discussion.

How to remove the redundancy?

Simply change all "AnimationState" tag into "Movement" tag, then simply remove all repeating actions/conditions, this way you will have movement animation that is bounded to the movement instance variable. Now download the DFNanimateIV2.capx to cross-check with what you get.

Why is it important?

It is very important to get rid of redundancy in your actual game, since additional sync as displayed in the DFNanimateIV.capx will multiply the data that has to be transfer by at least 2 fold. In a session which have a lot of peers, this will be impactful on the lag and will quite stressful for the host. So it will be best to reused what you already have but necessary, which is the Movement.

Custom Animation

In case of your game have a animation changes which is unbounded to the movement, such as Street Fighter animation, or your turret auto rotate, or any automated animation in the background, you should be able to do them using the method explained in previous page.

However, this subject is open to argument whether to make use of send message technique or sync instance variable. This is up to the developer to decide on which one to use, both has their own pros and cons, as I listed in the next page based on my personal opinion.

  • 0 Comments

Want to leave a comment? Login or Register an account!