Skip to main content

Item Creation (In Active Development)

Item creation within V0.8.X of CIVIL-AI-SYSTEM is currently clunky, needs code editing and causes friction in development. The aim of this roadmap item is to improve this flow and make less friction when developing behaviours.

Proposed Changes

  • Rework of Item properties
  • A new Editor Window which allows for the creation and management of items
  • Point of interest on items
  • Item Editor Window
  • Better Interaction
  • Variations of items
  • Instancing and object pooling of items within the scene to improve performance

Scope of Proposed Changes

Rework of Item properties (Released)

The item system currently uses enumerators for certain properties (name, type and size). This makes the system rigid and requires code changes to update possible values. To improve this experience these values will be updated to be keys. These keys will refer to collections which will be updatable and can be expanded via editor menus.

New Editor Window

This window will be a table view which will display all the current items within the project with the ability to add new ones. To start with filtering will be limited to just names but this could be expanded in the future. This will be used going forward to add items to the users scene so should be easy to spawn new items into scenes. There should be a short cut within the item selection on actions in the behaviour tree editor to create a new item.

Point of Interest (In Development)

As items have evolved in the tool more specific locations on items have been developed to allow for more control of the use of the item; for example a handle point for holding the item and a storage point for how the focal point the item should interact with a non use agent item slot.

As these are similar behaviours these should be a unified organised system for this. The proposal for this is points of interest (POI). Each POI will have a transform property and a type assigned. These can then be fetch by any system wishing to interact with items and the specific domain logic can be handled there instead of on the item. This work will then allow the addition of more POI which could include a using position.

Item Editor Window (In Development)

The current item component editor window is auto created within Unity showing the public variables. To improve usability and flow this will be updated. Items should not be for the most part unique. This means most settings will be moved into the creation flow editor window. A shortcut click will be provided from the new item editor window to create a new item using the currently selected item. There could be editable properties but this should populate to all items which are this setup and a warning should be displayed.

Better Interaction (Shaping)

Items within the real world normally have a few ways or a correct way to use them. The current setup of animations and interaction does cause quite a bit of duplication as it is based on the action instead of the item. This still does have its place but we can improve this. The proposed change is to update items to allow for the ability to define how agents will interact with them and can be tied to actions agents can perform (i.e. pick up and idle). This means behaviours can be setup once and used repeatedly for a specific item.

Variations of Items (TDB)

The ability to have different versions of the same objects grouped and randomly used by the system would add more variations to the behaviours. This would work by having children items which would just have a reference to the parent for the details excluding the points of interest and the model.

Instancing and Object Pooling (TBD)

As items will be under better management with the additions above the system can do more complex behaviours. This could be using instancing as well as limiting the count of objects displayed by using object pooling. This could have good performance improvement for item heavy scenes.

Risk / Open Questions

  • Changing of the item properties might need some porting? - This is required, it has been handled by an auto updater.
  • Should items be in collections or should all Item object be included in the editor window? - Items should be in a collection handled by the module settings, long term module settings will be linkable to the scene.
  • Do I need a porting system for the POI work? - This will be required, it will be handled by an auto updater.

Delivery

This work will be delivered over serval updates over the coming month or two. The work will be broken at least into the proposed changes but some steps might be broken down even further.

Summary

The overall proposed changes should provide a high quality of life improvement to using the tool. This is because no code changes, recompiling or syncing of items will need to done by the end user. These changes should make it easier designing behaviours and remove friction in the system.