Seeing it Through Ep 8: Guard Patrol Timing 2

This week David, Thomas and Paul discuss an issue we have discovered while working on Shapes of Grey, guard synchronisation!

The whiteboard table being put to good use.

Your Thoughts

so far

2 thoughts on “Seeing it Through Ep 8: Guard Patrol Timing

  1. James Murchison Jul 10, 2012 9:23 am

    Why are you using the physics system to move the guards? You’re working in 2D, so collisions in 2D are VERY simple to implement yourself, and would allow you to have much more finite control of your actors.

    On to the sync issue, you should take a leaf out of video compression algorithms, and video in general. There are certain ‘keyframe’ points where items get re-synced. These points live on a timeline. Your guards are on a finite patrol, which can live on a timeline. At any point in time, they can be pulled from this timeline to chase the player. When they decide to return, they just aim for the current point on the timeline. If you just move them along a timeline and don’t worry about physics, then you shouldn’t have to worry about syncing, and if you do still need to worry about that, just put sync keyframes down, that wait for everything to get back into sync.

    Sorry if that was a bit ranty. I was listening to the podcast on the train and REALLY needed to get this out ;) . You have some simple problems that have been getting solved since the 8 bit era. Look at how to simplify first and you will find your work will be much easier.

    • Thomas Bowker Jul 10, 2012 10:32 am

      Hey James, in the first game we made, Fallen Angle, we moved everything by force because we needed accurate collision detection for the combat. In the game/episode we’re working on now we eventually want to integrate that combat into the gameplay so in the long run it’s easier if we start moving everything using forces now. Unless there is a way to get that accurate collision detection without using the physics engine we’ll have to stick with using forces.

      The animation comparison for the guard syncing is useful, and it’s working in a similar way right now in that they will wait at a certain point until they are all in sync. I may have to return to it later and polish it up.

      Edit: Also it’s worth noting that in Fallen Angle all the AI shapes in the game can be split and cut up dynamically so if we wanted to implement physics ourselves we’d basically be remaking a 2D physics engine like box2D.

      Thanks for the feedback.