Skip to content

This plugins allows to keep tracks of time for different timeline paradigm, attached events to them and managed serialization for Save and Load game.

License

Notifications You must be signed in to change notification settings

NansPellicari/UE4-TimelineSystem

Repository files navigation

Nans Timeline system

This plugins allows to keep tracks of time for different timeline paradigm(1), attached events(2) to them and managed serialization for Save and Load game.

1 Real life time, Game life and Level life
2 Light blueprint asset carrying data and/or simple functionnalities you design

Nans Timeline System

Nans Timeline System ue4

Note:
I've hesitated at first to use the word "Timeline" which is already used in the UE4 paradigm for animation (see this).
The thing is, it's the most accurate word for the feature this plugin provides, so I still decided to use it but for BP I prefixed with Nans (= NansTimeline) everywhere to avoid confusion.

Buy Me A Coffee
I've decided to make most of the code I developed for my games free to use and open source.
I am a true believer in the mindset that sharing and collaborating makes the world a better place.
The thing is: I'm full time dedicated to my project and these open source plugins, for coding I need a looooot of coffee, so please, help me to get my drug 😝 !!

>> For developers:

1. Requirements

1.1. UE4 plugins

2. Usages

I use this for differents purposes.
First I created this to manage a bonus/malus system cause I needed to centralized their life duration.
Then I realized that it can be very helpfull for different purposes in my game as creating promotionnal content, bonus/malus, temporary skills, xp earning factors, ... with a limited time and having precise stats for player activities.

3. Definitions

3.1. Timeline

A timeline is a simple queue of events which is dedicated to store (to keep traces for stats) and notify them (depending on their parameters and timeline paradigm) on their lifetime events: start & time increase.
As a client, you should never have to use it.

3.2. Timeline manager

Is working as a remote control for Timeline, it controls time state (Play, Pause) and stream (tick interval, slow motion, ...).
As a client, it is your main interface.

3.3. Timeline manager types

3.3.1. - Real Life

The intent of the Real Life timeline is to track times since the first start of the game.
It is not affected by time alterations such as play/pause and slow motion.
After the game stops, it shoulds replay all the missing time on game reloading to update attached Events states.
As real life is, its state is always Play.
Be careful when you attached events, it could increase memory if they have undeterminate life time.

3.3.2. - Game Life

It keeps track of player game session. It follows the same stream, Play/Pause, Stop, slow motion, ...
After the game stops, it shoulds restart at the exact same time as the last session.
Be careful too when you attached event here.

3.3.3. - Level Life

The same as Game Life but it is reinitialized when level changes.
You can be less worried on attaching event here, but be aware that all events are definitively removed on reinitialization (level changes).

3.3.4. - And ...

You can easily create your own timeline manager. See Developers docs.

3.4. Event

It is intended to be the most extensible as possible.
So in its actual state, it is just a base UObject which embeds the necessary data to managed its lifetime.
You can specialized it with a dedicated Blueprint asset or in c++ classes (creating a Decorator of the UNEventBase) to do what your want.
To get some examples:

  • I create a scheduled event to trigger a message to motivate the player when it cumulates an amount of succeeded actions during a determinate range of time.
  • In combination with my Factors Factory System and Interaction System, I used them to create a temporary Bonus/Malus factor after an Actor interaction.
  • ... Sky's the limit!

4. Getting started - a step by step guide

To maintain a short doc here, please read this page here

5. Contributing and Supporting

I've decided to make most of the code I developed for my games free to use and open source.
I am a true believer in the mindset that sharing and collaborating makes the world a better place.
I'll be very glad if you decided to help me to follow my dream.

How? With
Donating
Because I'm an independent developer/creator and for now I don't have
any income, I need money to support my daily needs (coffeeeeee).
Buy Me A Coffee
Contributing
You are very welcome if you want to contribute. I explain here in details what
is the most comfortable way to me you can contribute.
CONTRIBUTING.md

6. License

  • You have to accept the UE4 license before using this
  • You are free to share, modify and use the plugin as you wish (even commercially)

About

This plugins allows to keep tracks of time for different timeline paradigm, attached events to them and managed serialization for Save and Load game.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published