First BB Update – BB – Update 1

close upFirst BB Update – BB – Update 1close up

Posted: September 15, 2024

Last Updated: December 2, 2024

First BB Update – BB – Update 1

Timeframe: August 31, 2024 – September 14, 2024

!!! Jump To Visual Demos !!!

This is the first devlog update I’ve ever really done, so bear with me. This one is mostly just a collection of many things I’ve changed in the past couple weeks.

HIGHLIGHTS:

LEVELS:

I implemented the baseline logic for the Level systems. It’s just a list of Wave prefabs, but there were a few hiccups with getting that to work because I had to work around the fact that the Wave prefabs must be instantiated, and I couldn’t use the Wave data immediately/directly.

Pretty Cool Bug:

Pressing ResaveAll remakes and saves all the user creations. When I would ResaveAll while loading a custom FP creation that uses a custom bullet and then press Ctrl+Z (undo), I was getting an error. Loading a different FP that DOESN’T use a custom bullet would not throw this error. I also noticed that after resaving, the custom bullets the FP used to fire had been replaced by the default bullet. Thus, I thought it had to do with the prefabification (creating blueprints of user creations) process, specifically that the creation order was incorrect (like the FP being made before the bullets that it fires). After some digging, I found not only that the prefabification order was still correct, but these results (default bullets and error on undo) were actually 2 different problems:

  1. The change stack was storing references to OLD ENTITIES after reprabification. Upon undo, the old entity reference was directly placed into the FiringPoint, causing an error because we cannot instantiate a bullet using an old reference.
  2. The prefabification process was beginning TOO EARLY. When reprefabification occurs, the InGameBuilderManager iterates all the InGameBuilders and starts their prefabification process. During this, each InGameBuilder checks if they are the currently enabled builder and if so, it saves its own state to restore after prefabification finishes. However, since the BulletBuilder begins prefabifying first, it replaces all the prefabs in the entity map with newly created bullets. Then the FiringPointBuilder tries to save its state before prefabifying, but all the old bullet prefabs are gone and it has to use the default bullet.

GUID Update:

Realized I had a remnant of my prior dumb code and was using ints (32 bits) for my creation GUIDs (I was using the GUID hash code as the GUID). We need to keep those bits for better GUIDs! Took a while to change all the places in code that used the GUIDs. Also took some time to make a system that would automatically convert the creation registries to replace the old serialized int GUIDs with true GUIDs.

OTHER UPDATES:

Sprites:

  • Metadata files added for Sprite and Audio asset folders.
  • Change UV Tiling and Offset for individual sprites.
  • Creations now update properly when changing sprite metadata.
  • Premade (my built-in) sprites now show up in the sprite browsing menu for changing bullet/enemy/etc. sprites.
  • Bullets now inherit their starting sorting index based on whether the shooting FP itself is a bullet. I.e. Bullets fired by other bullets start at the same sorting index as their parent FP bullet.
  • Constantly struggling with sprite sorting. Basically a coin flip whether it works properly in the builds.

Audio:

  • Big Audio system changes to speed things up.
  • Prefabification removes/limits the audio triggers on FPs so many entities no longer necessarily have to be iterated by the audio system (which operates pretty slowly on the main thread).
  • Having a few thousand FPs on screen won’t tank performance anymore as long as they don’t have to play audio.

Builders:

  • LevelBuilder!
  • Added bullet formations to FiringPoint (FP) builder.
  • Added multi-node editing widget for EnemyBuilder path movement nodes. Allows editing all nodes or all specifically selected nodes.
  • Fixed some builder UI dropdown menus to reload at the proper times.
  • Builder now reloads the current creation settings after saving.
  • Started basic setup to allow for correcting/updating existing creation registries. Kind of specific/bad at the moment.
  • Ellipse curve tool and widget. Took some work to make a usable widget that had handles for the major/minor axes, center position, and angle. The handles had to interact/constrain in weird ways.
    • Like with the spline curves I already had, uniformly spacing points along the perimeter of an ellipse ended up being pretty challenging in terms of figuring out what to do (thanks to this StackOverflow post for the majority of the logic).
  • WidgetManager simplification/speed improvements.

Firing Points:

  • Bullet Formations. Bullet formations allow bullets to spawn in a square or circle formation.
  • Overrides. FPs can alter the offset time of bullets that it shoots, i.e. an FP#1 that fires bullets with FP#2 can alter the offset time of FP#2 on the fired bullets. More overrides to come.

Misc:

  • ***GUID OVERHAUL***
  • Organization/fix for bullet hell-specific logic and EntityCommandBuffers and EntityCommandBufferSystems. Certain bullet hell logic now updates on a new EntityCommandBufferSystem that plays back a bit early for reasons.
  • The change stack for ‘undo’ now uses serialized strings to store the state instead of storing values directly for reasons (see Pretty Cool Bug).
  • Regex bugfixes in the registry filter.
  • Fixed the dependency tree used to link user creation dependencies.
  • Implemented ‘corrective tick’ so that last game tick after timeslow tries to get back on track to the next ‘1/60’ second tick.

Video Demos

Sprite UV Tiling and Offset

Bullet Sorting. Bullet layers can be explicitly set.

Bullet formations. Uniform formations in square and circle.

Ellipse tool. Handles conform to specific constraints and snap grid.

Edit all path nodes with details widget. We set the time to each node to 0.5s.

Select the second and fourth nodes and set the time to nodes to 0.1s.

Leave a Reply