Three Ways to use the Ghost(Replay) System
This is something that in conjunction with finishing my Ghost system tutorial, is something that I'm doing because I've hit 1000 followers on twitter. This post will cover three of the methods that you can modify the Ghost system to work with what you want.
1. Demo things:
This first use is for doing a demo of something within a level. A way you could go about this is during the development of your project you could record a demo, where the data held is something like Location and Rotation. This would work for most games especially flight/space sims due to the support for complete rotation.
You could also use the Location data from this demo to layer a route on a map for the user to follow.
The second use would be for a full on replay system, using the same kind of method as the tutorial before this, you could attach a recorder to each of the Player or Computer controlled objects in game and record the movements and at what time they happened. For this to work properly you would have to have a central timer that all the objects refer to during the actual game, this would be so all the times stored would be correct.
This kind of system would be more geared towards higher memory systems such as Consoles and PC's rather than mobile devices, especially when doing full replays that involve a high number of snapshots to be captured. Although things like Rhythm games and ones that don't need a high amount of snapshot data would also work on mobile devices as well.
Keeping what you get from the tutorial will make it look like the Replay is lagging a bit due to the amount of snapshots per second. So to keep a balance between memory usage and smoothness of the replay you could do the following method.
When you load the replay, for each replayable object you create a spline or path they have to follow from the data within the snapshots. Then smooth out that spline and have the object Lerp from the start to the end of it over the time of the last snapshot.
3. Queue System:
If you followed the tutorial to this page, you may have realised that essentially at it's core it's basically a "First come, First serve." system where the snapshots are stacked in the order they came from and are used in that same order. This kind of method can be implemented as a battle system or in something like a turn based game.
o at the beginning of planning this tutorial I didn't really think of what other implementations there were for a system like this. Heck I didn't realise there were as many really. But there are, some of which I plan to implement into my game and I hope you all do the same.
With these there are so many things you could do with them but I'll leave that up to you all to decide on how you do it.
If you didn't come here via the tutorial, I'd recommend going through it to see what this was all about click here to go to the first part.
Also feel free to follow any of the social media channels at the bottom of the page to keep up to date with any projects, more tutorials and other bits that are going on.