10 minute read

Greetings folks! A lot of progress has been made on the game over the last few weeks. From the new tool system to item throwing, and reworked controls, there is a lot to unpack. Let’s dive in!

Tools

In Automation Station, players need to use B0XB0T’s laser to harvest resources and heat up the crucible for smelting, but thus far, they haven’t needed to explicitly equip the laser to do this. Since the laser is currently the only tool in the game, that has worked pretty well. However, I plan to add a scanner and a variety of other tools that the player will unlock throughout the game.

While it might be possible to dynamically switch to the correct tool when interacting with an object, that assumes that only one tool can be used on a given target, which may not always be the case. There is also a danger of making the game too smart such that the action performed is not what the player expected or intended. Alternatively, each tool has its own keybinding, but that is asking the player to do a lot of memorization.

The much more flexible and common solution is to have a way to equip different tools. I decided to try this out in Automation Station and found that it works quite well. Here is a look at the new tool system in action:

The toolbar at the bottom of the screen now has a special section for tools alongside the items. Each item and tool can be equipped. By equipping the laser, the player is able to harvest ore and heat up the crucible. And if the player unequips the laser or switches to an item, they get a different set of actions. Each equipped tool changes how the player will interact with the different objects in the world.

Item Interactions

Now that the player can separately equip items and tools, I had to revisit how the interactions worked when an item was equipped. The primary action while holding an item is to deposit it, so I decided to show an arcing trajectory indicator to help communicate where the item will be added. Using the item while hovering over a building will attempt to place the item in the building’s slot. If the item can’t be added, it will show as red to help communicate that depositing is invalid.

After adding these trajectory indicators, I realized that it felt like you ought to be able to throw items anywhere. While this isn’t super helpful at the moment, I decided to re-add the throwing mechanic so that you can toss items loose on the ground. I’m hoping to add additional gameplay elements that leverage this throw mechanic in fun and playful ways.

Control Schemes

In the last devlog, I mentioned how I had reworked the controls to streamline certain interactions. While I think these changes were an improvement, there were still some issues that players were running into. Specifically, having the same button for depositing items and using the laser meant that players were never quite sure what was going to happen when they clicked that button. In reality, there was only ever one option. For example, if a crucible is empty, left click will attempt to deposit an item. If the crucible has ore, left click will start heating the crucible. But even though the game had no ambiguity in these scenarios, it still felt somewhat ambiguous to players and led to pressing the wrong buttons or being frustrated by things not behaving as they expected.

By introducing the tool system and requiring players to explicitly equip different items or tools, the goal is to remove this ambiguity. For example, if the player has the laser equipped, the game should assume that they are trying to use the laser, even if the target can’t currently be heated. And if the player has an item equipped, the game should assume that they are trying to deposit it, even if there is no room. More generally, the equipped tool lets the player tell the game what they want to do, even if it may not be possible, and the game should respond accordingly.

The main downside of the new item and tool system is that the player now has to manually switch what they have equipped, which can be cumbersome. For example, if you’re building a house in Minecraft, you often want to switch between your wood planks for building and your wood axe whenever you mistakenly place a block in the wrong spot. You can try to optimize your toolbar arrangement to make switching fast, but it still adds friction to the gameplay. That’s why I decided to add an item/tool toggle. Pressing the keybind for this will switch between the last used item and the last used tool. This makes it much easier to manually smelt ingots in the early game since you need to switch between depositing ore and then heating it up.

With all of these changes, there were still several open questions related to the controls for interactions. How does the player perform interactions that don’t require an item or tool, such as picking up items or pressing buttons? Can the player unequip or holster an item and tool? What does it mean to have an “equipped” item or tool in terms of the controls? When should I show the throw trajectory and laser targeting indicators?

I spent a huge chunk of time trying to answer these questions by prototyping different control schemes. For example, I tried out a system where the player had to hold right click to “aim” the current item or tool by holding right click. While aiming, left click would throw the item or use the tool. While not aiming, left click would pick up items and press buttons. This worked pretty well, but it felt a little awkward to hold right click and press left click. So then I tried an aim toggle on right click. This worked a bit better, but it was easy to get lost in all the different modes (tool toggle, aim mode, build mode, etc.). I even tried having a separate button for tools and items.

Ultimately, I settled on a system that works as follows:

  • Items and tools can be equipped by either clicking on the toolbar, pressing a number hotkey, or scrolling the mouse wheel.
  • The equipped item/tool can be unequipped by pressing right click or Q.
  • Pressing right click or Q with nothing equipped will restore the last equipped item or tool.
  • While an item or tool is equipped, show the corresponding indicators.
  • While an item or tool is equipped, left click will use that tool.
  • With nothing equipped, left click will perform a “default” interaction. That includes picking up items and pressing buttons.
  • Pressing E will toggle between the last used item or last used tool.

So far, playtesters seem to like this option best. However, I think this will be a part of the game that I’ll continue to iterate on and refine, especially as more content is added and I get more people playing the game.

Wrap up

Beyond all of the stuff above, I also spent a lot of time on some build mode improvements, but I’ll save those for a future devlog. I also decided to port a bunch of custom shader and rendering stuff to Unity’s new API, which ended up taking almost a full week. Anyways, that’s all for this devlog. Huge thanks to those of you who take the time to read through these! As usual, let me know if you have any thoughts or suggestions in the comments below or in our Discord server.

Cheers!

-Scott

Changelog:

- Improvements to hover logic
- Sort total building cost and individual building costs for consistency
- Zooming in play mode no longer zooms the build mode camera, and vice versa
- Slow down the camera zoom to improve smoothness
- Simplify the interaction framework by removing the need for separate systems
- Consolidate interaction systems across build mode and play mode
- Add control prompts for constructing, placing, picking up, rotating, copying, and demolishing in build mode
- Add the ability to "aim" while holding an item
- Slow down the player and have them face the cursor while aiming
- Add arcing indicators while aiming to show aim direction and target
- When depositing is invalid, color aim arc in red and stop moving the dots
- Limit aim arc distance based on max interaction distance
- Disable building indicators outside of build mode
- Added keybind for "Q" to restore or holster equipped item
- Disable retrieve interaction while holding an item
- Add warning message when attempting to heat something that is not currently heatable (e.g. an empty crucible)
- When picking up and moving buildings in build mode, "cancel" now restores their previous locations instead of demolishing
- Only allow depositing when holding an item
- Combine interaction systems for depositing into slot and depositing into stacker 
- Remapped scroll wheel to cycle through items in the toolbar instead of zooming
- Added controls to zoom camera on "," and ".". This will likely be changed in the future.
- Prevent items from being added to a cache
- Only snap the arm aim indicator when the slot can be deposited into manually
- Brought back outlines and highlight for the occluded portion of the hovered object
- Add in separate control prompt for rotating a building by clicking and dragging
- Disable outlines when hovering non-buildings in build mode
- Add keybind to cancel in build mode using "Q"
- Disable the ability to demolish buildings while planning or moving another building
- Restyle control prompts with modifier to show the modifier key before the primary keybind
- Add warning message when attempting to place or construct a building in an invalid location
- Added control setting to switch between toggle or hold aim
- Added targeting indicator when laser is equipped
- Improve laser beam targetting
- Added a separate "tool" bar for holding tools (currently just the laser)
- New UI for toolbars with the ability to switch between items and tools
- New authoring workflow for adding tools to the new tool bar
- Reworked internal state of toolbar to support tools and the item/tool mode toggle
- Rewrote logic for spawning the correct item in the player's hands based on toolbar state and equipped item
- When toggle aim is enabled, switching items or tools automatically enters aim mode
- Slightly reduce walk and run speed
- Add sort index to tools so that they always appear in the same order
- Add an abstraction layer between input controls and the interactions that they are mapped to based on the current control scheme settings
- Add a third control scheme that allows tools and items to be used on right click instead of needing to hold right click and pressing left click.
- Added support for auto-populating enum dropdowns in debug menu
- Fix the ability for stackers to receive items from input conveyor belts
- When loose items spawn from a destructible rock, add a delay before the player can automatically pick them up
- Adjust several settings for the destructible rock explosions
- Items can now be thrown loose on the ground when not aiming at a slot
- Laser can now be fired when not aiming at a laserable target
- Improve laser vfx heat marks to help avoid graphical clipping
- When extracting resources with the laser, stopping and starting the laser will resume progress. This is especially useful when the cursor accidentally drifts off of the target.
- Extracted resources now spawn on completion instead of gradually throughout the laser animation
- When heating something with the laser, stopping and starting the laser will resume the heat progress.
- Added a fourth control scheme, similar to toggle aim, but instead of toggling aim mode, it toggles between the item being equipped or holstered.
- Complete rewrite of outline render feature for Unity's new RenderGraph API.
- Complete rewrite of cavity render feature for Unity's new RenderGraph API.

Cheers!

-Scott

Tags:

Updated:

Leave a comment