Skip to content

A new `IBasicSystem` and some group changes and infrastructure movement

Compare
Choose a tag to compare
@grofit grofit released this 11 Mar 09:49
· 167 commits to master since this release

This isn't a huge update but there are lots of words explaining whats happened :D

IObservableScheduler now in core

This was originally brought in as a way to have a streamlined cross platform "EveryUpdate" style notion, as every engine/framework does their update loop differently, so this exposed a way for those events to be fed through in a sane-ish way. So in Unity it may be from a UniRx Observable.EveryUpdate in MonoGame it may be from a Game.Update while in a console app it may just be a timer ticking at 60fps.

The point is that this allows plugins to have systems which update according to the host platform but be agnostic of it, so plugin systems no longer need to worry about having platform dependent observables, as historically if you wanted to have a cross platform system your only option really was an IManualSystem and make some update loop yourself which is not great.

And off the back of this a new basic system has been introduced which wraps up the underlying update mechanism and exposes a simple processing point.

New IBasicSystem

This is basically a cut down IReactToGroupSystem but the schedule of it is taken care of for you, as in most cases people would just have it default to every update anyway, so in these cases you can just use the normal IBasicSystem and it will work on any platform and doesnt need the ReactiveSystems plugin.

This as mentioned above makes plugin development easier as you can at least have a cross platform system without needing other plugins or writing any of your own boilerplate code.

IGroup and Group are more in line

This isn't a massive update, but the gist is that IGroup and Group have not been on the same page for a while, as IGroup just exposed component lists to match on, whereas the Group implementation had that AND predicates built in.

In most cases predicates are the exception, and while they allow you some great flexibility it needs to be more separated, so there is now a GroupWithPredicate which is basically the same as the old Group class, and the new Group class just contains component lookups.

For the most part this wont effect most people, as the helpers/builders have been updated to automatically create the appropriate class for you, however if you had your own classes inherit off Group and you used predicates in them, you may need to now inherit from GroupWithPredicate.