Skip to content
Blog

OSHA Devlog 3: Splitters, ramps, machine placement, and more

Finally got around to adding some new mechanics, rewrote the conveyor tool AGAIN, what a process

5 min readOSHAGame Development
Contents6
  1. UI Improvements
  2. Placeable placements
  3. New conveyor tool
  4. Splitter
  5. Bugs
  6. Future changes

It’s been a while since my last post, but I’ve been working on this game whenever I have the time (and mental fortitude). Lots of things have been going on in my life recently, so I’ve been dealing with those first and foremost. Nevertheless, I’ve finally made enough progress for a new post!

UI Improvements

I’ve made some small visual tweaks to the UI. Nothing major, just some small upgrades, plus some new things - a “Placements” tab, and a new standalone delete/bulldozer tool.

Here's a screenshot of the overall UI's current state
Here's a screenshot of the overall UI's current state
Here's the new placements tab - hovering over an option gives a small description
Here's the new placements tab - hovering over an option gives a small description
Here's the new deletion tool in action - dragging over placements makes a bulldozer indicator appear, and releasing the mouse deletes anything in the selection
Here's the new deletion tool in action - dragging over placements makes a bulldozer indiicator appear, and releasing the mouse deletes anything in the selection

Placeable placements

Now, instead of messing with a hardcoded test scene, I’ve finally added the ability to place and delete machines at will.

One of the earlier screenshots showed that mousing over a placement in the UI showed a tooltip with prices and upkeep displayed - those don’t do anything yet, but they’ll be tied in with a money system in the future.

You can see that there’s some basic arrow gizmos that show up to give a rough idea of the input and output directions while placing. Pressing R rotates the placement.

New conveyor tool

The conveyor tool has been the bane of my existence for quite some time. I’ve been struggling with figuring out how to properly incorporate verticality. Also, dealing with it is a massive pain in the ass.

I considered making separate tools for creating ramps, but that didn’t seem like it would lead to intuitive controls.

I decided to rewrite the conveyor tool from scratch, anchor system and all, and added the ability to create upward/downward ramps by pressing E or Q respectively.

This new verticality system also handles placing platforms automatically under conveyors that need them. Nothing prevents you from making floating conveyors if you delete the platforms under them currently, but in the future, that won’t be possible.

Splitter

Despite a lot of my time getting absorbed by various other issues with the game, I did manage to add a new thing - the Splitter. This is nothing new if you’ve played other factory building games. It has one input and three outputs, and basically just round-robin distributes whatever is coming in from the input port to the output ports.

The model, as with everything visual in the game, is temporary and just a mock-up, so don’t judge me.

Issues

Bugs

There seems to be an endless amount of bugs. I find new ones almost every single time I test the game.

Edge cases I didn’t consider, things that straight up don’t work properly or that I overlooked, old bugs that I never fixed because I want to work on features, it never ends. There’s a lot of them, and it’s kind of daunting.

A game of this nature is EXTREMELY prone to bugs. I’ve been logging and tracking each one I find.

It’s like cutting the heads off a hydra - new ones just keep emerging.

I’ve been trying to make my code as robust as I can, and rewriting when I think it’s necessary. Unfortunately, that seems to apply to basically every single system in the game. I’ve rewritten everything several times by this point, and that’s probably going to continue.

Literally as I was making this post, I noticed a bug with the new conveyor tool - making more than two subsequent downward ramps doesn’t work properly.

Future changes

Placements

A lot of bugs center around how “placements” (machines) like the Crate Opener work. I think I may need to spend some time reimagining how the systems governing placements actually work.

General bugfixing and improvements

While I don’t need to make things spotless, I realize the table things are standing on is getting increasingly shaky. I’m going to have to dedicate a lot of time to fixing outstanding bugs and making a lot of minor improvements across the board.

Worker task improvements

Currently, worker task assignments aren’t super flexible. For instance, you can’t assign a worker to move items from one stockpile to multiple other places at once. I’ll have to spend some time fleshing out this system too.

Thanks for checking out this post!

Written by Michael Randolph. Get new posts by email or RSS.