Repository navigation
Replies: 1 comment
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
Panoply is the project I have been working on for the last several years: a large open-world game with a pseudo-isometric view. Here's a screenshot:
Because I am a solo creator, and because the world I am creating is large, my strategy has been to build an in-game editor that allows me to quickly create large amounts of content. Everything is optimized for rapid creation: for example, the fact that wall pieces snap to their neighbors in a grid means I don't have to spend time adjusting the location of each mesh.
The panoply world consists of terrain, walls, floors, fixtures, and actors. The last two of these are built around exemplars and aspects.
Exemplars and Aspects
Panoply was originally built in TypeScript, and it leans heavily into the "prototype inheritance" feature of JavaScript. Actors are defined by exemplars, which represents an inheritable, composable prototype the contains appearance, physics, interactions, and goals. An exemplar contains aspects, which are component-like nuggets representing some facet of the actor's definition.
For example:
The goal of this scheme is that I can quickly assemble a new game character out of parts, composing both appearance and behavior. For example, a city guard has built-in behaviors (night/day routine, patrol paths, etc.) but I can create a special guard who has information about a quest by inheriting from the normal guardsman prototype, and then inserting aspects which have the quest behavior and dialogue.
Are Aspects the same as Components?
No:
That being said: currently, each
AspectderivesComponentand inserts a clone of itself on the entity. However, I am in the process of considering whether this was a good decision or not. The alternative is that aspects are a scaffolding which inserts components, but are not themselves components. This would make it much easier to support aspects defined in mods, which won't have a Rust type. (Note there is a distinction between "aspects overridden in mods", which modify the properties of an existing aspect, and "defined in mods" which introduce a new aspect).Should exemplars be BSN scene assets?
Maybe. The idea is attractive, but there are many hurdles in the way. BSN could represent most of what aspects do, using scene inheritance. The things that it doesn't do could potentially be worked around.
The first question is how well BSN is going to handle thousands of micro-scenes. If every scene was a separate file, that would be hard to manage, and would probably load quite slowly. (Currently exemplars are organized in catalog files, which contain many exemplars).
The second question is editing. The current panoply editor is highly optimized for editing aspects quickly: for adding and removing aspects from exemplars and instances. It has customized field editors for the various data types used in aspects.
Here's a screenshot showing the editor for the
Colorsaspect, which allows you to colorize the actor's skin:The official Bevy scene editor, still under construction, will probably be able to handle editing of the color table, but not as easily or smoothly. The biggest difference is that in panoply, the color slots are derived automatically by examining the skin file. This means that the editor for an individual field needs the ability to inspect an asset other than the one that is being edited. It is unknown whether the planned editor will have this capability.
Without this, the author would be forced to enter the slot names manually, which would take time and be highly error prone.
There are many other examples of specialized behavior in the editor that wouldn't be supported in a general scene editor.
The other alternative is to write my own BSN editor that has these optimized workflows. This sounds insane, but bear in mind that I'm only using a small subset of BSN and the editor would support only that subset.
However, this still involves writing my own AST for parsing and serializing BSN files, which is itself a daunting task. (Currently exemplars are encoded in JSON so I don't have to worry about all that.)
There's also the possibility of using parts of the scene editor; but again it's unknown whether the editor components will be re-usable in this way. Architecturally, my editor is quite different from the official scene editor; it is strictly in-process, and does not rely on BRP.
A third issue is time.
I'm 68 years old, and I am not going to able to program forever; the clock is ticking. I'd like to get the game done while I can. It's unknown how long I would have to wait in order to use the Bevy scene editor. It's a better bet, right now, to go down a road I can control.
I've spent the last three years working on Bevy, trying to get the UI infrastructure up to the point where I could reasonably hope to implement the editor I want - much of my work on feathers, settings, color, and so on has been aimed towards this goal. During that time, however, I have made very little progress on the game itself until about two months ago when I refocused my efforts. Part of what changed is that Bevy finally reached the threshold where it had the capabilities I needed.
@cart @jbuehler23 @alice-i-cecile
All reactions