WIP – Machine Shop Simulator
Machine Shop Simulator is a prototype management sim game for the browser built with React and the HTML Canvas API. It is a facsimile of a CNC machine shop.
Objectives
- Build a game instead of a web app
- Use React
- Tie in some of the Canvas API skills I’d been using on the Javascript Arcade games.
Development
1/27/2026 – This is finally at a point where it’s shareable, even if it isn’t done. I’d call it halfway there as a proof of concept. There are two major objects that have to interact. The first is the machine and the second is the employee or operator. Basic machine functionality is in and working at this point. You can buy machines. They run and earn money until the break down. Then you can repair or scrap them. The overview menu shows real-time info about the whole shop.
The next step is to establish the array and object class for employees. The plan is for machines to remain idle unless an employee is assigned to it. Each employee with have stats and quirks of their own that modify the base stats of the machine they’re on. Machines will run better or worse depending on the skills of their operators.
I employed some game design tricks that I’ve absorbed through osmosis. I have a centralized settings.js file that controls the core numbers like starting funds, production cycle rate, size of the machines in the grid, etc. Kind of like a settings.ini.
Hurdles
Almost all of this is new. I’m having to rely on syntax reference a lot. I know what I want conceptually though, so I’ve been able to get Lumo to give me constructive replies with regards to manipulating and passing the machine array and object properties around.
For the employees I should be able to do less referencing now that I have the machine class as a model.
Takeaways
Getting to use a lot of concepts that I hadn’t explored in as much depth before.
- More complex classes and objects
- Compartmentalizing code into hooks and components.
- Barrel files!!!
- Dividing contained logic into /lib
- CSS modules
- Using AI assistants to review for best practices and performance