HomeGamesUpdatesPricingMethodology
Steam News31 October 20241y ago

Developing Huecube: Counters and the Event Watcher

G'day everyone! This is the 2nd look at some of the development of Huecube, read on if you are curious about some of the thoughts that go into the additions of Huecube!

Full notes

Full Huecube update

Read the full published notes in a cleaner layout. The original post stays linked below.

What changed

0 fixes4 additions3 changes0 removals
  • UI and audio
  • Gameplay
  • Events
addedWhile levels absolutely don't have to, there are times where creators may want to track values for more advanced segments -- like making a door open after a button has been pressed a certain number of times. This could be done by using a chain of logic gates, but I felt that the convenience and power unlocked by adding a proper counting system would be well worth it.
addedNow in Huecube there are a dozen items that can be used in the Editor to define and manipulate named numbers, called "Counters". There's also an item that can output a signal if one or multiple conditions are met with counters.
addedThe positive side-effect of the introduction of Counters is they can be used to receive information that otherwise wouldn't work well with the existing systems. I wanted there to be a way of tracking things in the game that normally couldn't be effectively, like for instance jumping:
addedJumping can be tested for by using proximity sensors to tell when the player was off of the ground, but it wasn't fool proof because it's possible to trigger that off by other means that couldn't be detected. By adding the "Event Watcher", I can have it send out a pulse of power when the player jumps, which could be used to do trigger other things off.
changedThe issue with this is the matter of how to translate jumps being detected into usable input, because having a single pulse of power won't work if two events occur during the same pulse. So perhaps I could make the power state of the Watcher alternate every time something is recognised? Well it's a possibility but makes it more difficult to work with as a level creator, and still doesn't solve if it happens at the same moment in time as it would toggle on and then off again, making nothing be detected.
changedThe solution was to have the detections made by the Event Watcher be reported numerically somewhere, where it can be decided by the level creator how to deal with it. This means if you want to simply detect a jump, you could check if a number increases above 0, then set it back to 0. If you wanted a pulse to occur for every event detected, you could have a counter that decrements as a power output toggles until it is depleted. This also helps with things like Rubble, where multiple can be broken at once, as no Rubble gets missed because the counter would increase to match.

G'day everyone!

This is the 2nd look at some of the development of Huecube, read on if you are curious about some of the thoughts that go into the additions of Huecube!

- - -

Huecube's wiring system in the editor is extremely versatile, and allows you to do just about ANYTHING you could imagine, but it's a little bit cumbersome if you're attempting to make something advanced that needs to keep track of numbers.

While levels absolutely don't have to, there are times where creators may want to track values for more advanced segments -- like making a door open after a button has been pressed a certain number of times. This could be done by using a chain of logic gates, but I felt that the convenience and power unlocked by adding a proper counting system would be well worth it.

Now in Huecube there are a dozen items that can be used in the Editor to define and manipulate named numbers, called "Counters". There's also an item that can output a signal if one or multiple conditions are met with counters.

The positive side-effect of the introduction of Counters is they can be used to receive information that otherwise wouldn't work well with the existing systems. I wanted there to be a way of tracking things in the game that normally couldn't be effectively, like for instance jumping:

Jumping can be tested for by using proximity sensors to tell when the player was off of the ground, but it wasn't fool proof because it's possible to trigger that off by other means that couldn't be detected. By adding the "Event Watcher", I can have it send out a pulse of power when the player jumps, which could be used to do trigger other things off.

The issue with this is the matter of how to translate jumps being detected into usable input, because having a single pulse of power won't work if two events occur during the same pulse. So perhaps I could make the power state of the Watcher alternate every time something is recognised? Well it's a possibility but makes it more difficult to work with as a level creator, and still doesn't solve if it happens at the same moment in time as it would toggle on and then off again, making nothing be detected.

The solution was to have the detections made by the Event Watcher be reported numerically somewhere, where it can be decided by the level creator how to deal with it. This means if you want to simply detect a jump, you could check if a number increases above 0, then set it back to 0. If you wanted a pulse to occur for every event detected, you could have a counter that decrements as a power output toggles until it is depleted. This also helps with things like Rubble, where multiple can be broken at once, as no Rubble gets missed because the counter would increase to match.

By using counters and the Event Watcher, you could make breaking Rubble in an area act as a sort of "objective", this is a video demonstrating that idea in a short level. https://www.youtube.com/watch?v=OFEqdQC5zoY

Be sure to join the Discord if you want to be more involved in the early discussions of the game, you can ask any questions you want there or provide feedback and ideas if you'd like!

Source

Steam News / 31 October 2024

Open original post

Changelog.gg summarizes and formats this update. How we read updates.