Spec: Augmentations #1314
JSideris
started this conversation in
Game Engine Tech Blog
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For the types of games I want to build, it would be very handy if the engine itself provided a way to augment
GameObject
instances.Examples
Components of Augmentations
There are multiple features of an augmentation that should be considered.
Design Solutioning
The above behavior is so broad, that maybe it makes more sense to break it down into multiple things and not have all this behavior handled by one
GameObject
or decorator. For instance, it becomes complicated when there are multiple rendering modes of the same augmentation. Currently, the@drawable2d
decorator only supports a singledisplayObject
, and I don't want to mess around with@drawable2d
, which is a core aspect to the canvas 2D plugin.So let's break it up.
First, the item that sits in the environment waiting to be picked up can be its own
GameObject
, and doesn't need to be an addon. However, upon interaction, it could create an addon and install it on the robot that interacts with it, before destroying itself.The addon itself could just be a modifier for a specific type of
GameObject
that can be stored in an inventory, installed, and uninstalled.What about modifications to the GUI (inventory slot)? Perhaps the drop pickup could actually contain two addons: one for the player, and one for the player's inventory/status list.
We need to be able to support game servers that don't know anything about
DisplayObject
s or rendering, but also the ability to modify the renderings. The most obvious approach is for the target's painter to listen for the augmentation in it's target (the augmentedGameObject
) and then update the painting.Another crazy option might be to build a client-side-only addon that acts like an addon for the painter of the target object. This addon would also need to be an extension.
That should solve most of the use cases. The last thing worth mentioning here is that there is a dependency tree that gets created, and it will be necessary to make sure augmentations are only added after the object they are augmenting (when loading from disk or from a network source).
Beta Was this translation helpful? Give feedback.
All reactions