Composition of states ?
Options
genaray
✭
in Photon Bolt
So i recently found photon bolt and its fucking awesome !
Its easy to use, quick and efficient. But theres one little thing that could get improved.
State inheritance... i often find myself to form the same complex set of properties in states over and over again... and simple inheritance is not enough to reduce the amount of work here.
Enemy, Goblin, Archer -> Enemy goblin which is an archer, Neutral goblin which is an archer e.g.
It would be great if we could composite states instead... therefore we could construct states for certain components which would reduce a lot of work.
Is there any workaround yet ?
Its easy to use, quick and efficient. But theres one little thing that could get improved.
State inheritance... i often find myself to form the same complex set of properties in states over and over again... and simple inheritance is not enough to reduce the amount of work here.
Enemy, Goblin, Archer -> Enemy goblin which is an archer, Neutral goblin which is an archer e.g.
It would be great if we could composite states instead... therefore we could construct states for certain components which would reduce a lot of work.
Is there any workaround yet ?
0
Comments
-
Hello @genaray ,
Have you looked at the "Object" assets?
Read more here: https://doc.photonengine.com/en-us/bolt/current/gameplay/state#state_property_types
You can define "sub-states" (objects) and reuse them in several other states.
--
Ramon Melo
Photon Bolt Team0 -
This question has already been answered by me in Discord - and then fholm in Discord since you pinged him after that.
Bolt is based on polymorphic state, and it will never support the composition pattern in the way you desire.
0