6 minute read

Hello!

In devlog #15, we’ll be looking at the brand new conveyor ramps, extractor pooping, as well as bunch of other smaller changes and cleanup work I’ve been doing for the last two weeks.

Ramps

The Conveyor Ramp is a new buildable structure for Automation Station. It works just like other conveyor belts, except that it is able to send or receive items at different heights. There are two types of ramps: “up” ramps and “down” ramps. As the names suggest, an up ramp can be used to carry items to higher elevations while the down ramp can bring items to lower elevations. Here’s what they look like in action:

It is important to point out that conveyor belts must still be placed on the ground. That means that you cannot have a bunch of floating ramps and conveyor belts to transport items over the top of the map. This ensures that your factory remains visible and easy to navigate. If you want to cross two conveyor belts, you’ll have to use the launchers that I talked about in devlog #12.

In addition to allowing your conveyor belts to go up and down hills, ramps are also useful for loading items into buildings. For example, the crucible and burner both require items to be dropped in from above.

Now you might be wondering why you would need a down ramp when when conveyor belts can already drop items from cliffs. Or why do we have both up ramp and launcher for getting items to higher elevations?

The answer to both of these questions is related to my plans for crafting. The basic idea is that you’ll need to stack items on top of each other vertically and then send that into a machine. While none of this is implemented in the game yet, my current thinking is that item stacks can be formed by placing items on top of other items, either by dropping them off of cliffs or by launching them on to other items. Ramps would not form stacks in this way, so they can be used in places where you want to avoid accidental item stacking. I plan to share a lot more information about this item stacking idea in a future devlog, so stay tuned.

Extractor Pooping

After adding the item auto-pickup last sprint, I’ve been toying with the idea of having some of the extractor machines “poop” out items when they are done. You could place down a mining drill and rather than it stopping when it is full, it would just drop the loose items on the ground. Then you could run back over to it after a couple minutes and scoop up all the items rolling around. I decided to try it out and see what it felt like.

I wasn’t quite prepared for how quickly things would get out of control. The blubber shooting in the air is due to some physics issue, but it’s pretty entertaining to see them bouncing around everywhere. My plan for this mechanic was the extractors would poop items when placed on their own, but if there was a conveyor belt ready to receive the items, it would catch them all and prevent the extractor from spawning any more. I’m not totally sure if this idea would have worked in practice, but the bigger problem is the performance. A few hundred items rolling around is totally fine, but after a few minutes, the frame rate really starts to suffer.

For the time being, extractor pooping is disabled, but who knows, maybe I’ll revisit this in the future. 💩

Pause Menu

Another change I worked on this sprint is the new pause menu. At the moment, the only working button is the quit button but I have placeholders for some other planned features like saving and loading.

This actually isn’t the first pause menu I’ve had in the game. Before a big UI rewrite a year or so ago, I used to have a fully functional pause menu where you could change settings and save or load games. I plan to get these working with the new UI system eventually, but for now its nice to be able to quit the game gracefully without needing to Alt+F4 after a playtest. 😄

Cleanup

Through all of the rewrites and refactorings over the years, I had built up quite a lot of technical debt in the form of old code and assets. The lion’s share of the work this sprint was actually a big cleanup of a lof this stuff. To give some clue of the size of this cleanup, here are the stats for all of the changes this sprint:

git_stats

This shows the number of changes files, added lines, and removed lines. While a good chunk of the nearly 200k removed lines comes from deleted assets, I still deleted around 50 thousand lines of code. It’s hard to prioritize this kind of work since it doesn’t add anything to the game itself, but it had been bugging me for a long time. I also think it will improve my development speed since the code compiles faster and I don’t have to navigate a bunch of old stuff in the project.

Besides removing all of this old stuff, there were also a bunch of smaller improvements and fixes to several different parts of the game. For example, the logic for hovering items is significantly improved, extractors are now correctly interrupted when moved, and there are now hotkeys to quickly select buildings in build mode.

Read the changelog below for the full set of changes this sprint.

Changelog:

  • Fix toolbar UI animation when picking up items
  • Cursor can now hover objects behind trees
  • Fix cases where picking up buildings did not animate correctly
  • Fix cases where placing buildings would incorrectly copy the building
  • Disable logic that turned character to face cursor when the cursor moved
  • When using mouse & keyboard, support hovering objects in playmode with the cursor
  • Fix crash when attempting to destroy a non-building
  • Increase the range that the character can interact with objects
  • When the cursor is hovering multiple objects, prioritize the one closest to the character
  • Fix several UI and input bugs with the build menu
  • Allow tree stumps to be hovered in build mode
  • Add a new pause menu with quit button
  • Remove build mode hover outlines when entering play mode
  • Simplify and control prompt animation and logic
  • Add mouse icons for control prompts
  • Remove some visual artifacts of objects when spawning in or being demolished
  • Laser now collides correctly with target when mining in all cases
  • Cleaned up and removed a ton of old code and assets in the project
  • Fix bug where picking up an item prior to it transferring to a new belt would not work correctly.
  • Reworked retrieve interaction to target items instead of building slots. This fixed some weird behavior when attempting to pickup items from conveyor belts.
  • Added support for “item pooping” on extractors.
  • Picking up or moving an extractor while spawning in an item will now interrupt the spawn and destroy the in-progress spawning item.
  • Fix errors from attempting to pickup items in build mode
  • Added ramps to the game
    • New ramp mode
    • Ramps can receive and send items at different heights
    • Custom animation for items traveling along ramps
  • When a conveyor drops an item from above to a conveyor that is lined up, drop it to the center slot instead of the receiver’s input.
  • Add hotkeys for quickly selecting buildings in build mode
  • Improve icon generation by rendering with 2x render scale
  • Fix outlines when render scale is non-default
  • Fix mining laser distortion when render scale is non-default

That’s everything for devlog #15. I’d love to hear what you think of the new ramps and the other changes. If you haven’t already, consider joining the discord using the link below. I like to chat with the members there about game design, programming, tech art, and more.

Cheers!

-Scott

Tags:

Updated:

Leave a comment