Categories
Game Design Game Development Geek / Technical

Freshly Squeezed Progress Report – Finally, a Main Game Loop!

For sprint 9’s report, I created a crafting menu for workers to create Good Toys from the parts of Bad Toys that were separated.

Sprint 10: main game loop

  • Process a single turn sequence
  • Allow player to command worker to put toy parts together
  • End game when last Good Toy enters shipping container
  • STRETCH: Create active pause

This past week, I actually managed to accomplish all of the tasks I wanted to!

Workers can be commanded to craft a Good Toy. Each worker now has a Crafting stat that indicates how many “stitches” they can work on per turn.

When a worker is done stitching together a new Good Toy, they will put the toy on the conveyor belt. Now, ideally they would find the “best” location to put the toys down on, but in the interest of speed, I basically used the heuristic of finding a free space on the conveyor belts that are lowest and to the right. It works well enough, but I can see revisiting it in the future to ensure that the chosen spot is the one that is the latest in the belt line.

Finally, the game ends when the last Good Toy enters the chute for the shipping container. I needed to essentially figure out how many toys total are in the game, and it is basically a function of how many toys are dispensed.

I also spent some time speeding up the movement of the conveyor belts, and I added what I refer to as “active” pause.

Toy Factory Fixer - Active Pause

Basically, instead of pressing the Advance button to move the game ahead one turn, and then requiring the player to do so repeatedly, the player can now press the Go button, which turns into a Stop button. So now turns will continue until the player stops them by either hitting the Stop button or selecting a worker. In truth, any of the actions available while the Stop button is active will stop turns from advancing once the current turn finishes.

Toy Factory Fixer - Main Game Play Loop

So what’s exciting is that I now (finally!) have the core of a game that I can playtest. There are things that aren’t implemented yet that I plan to get to in the coming week or two, such as adding a cost to hiring workers which requires a currency. In fact, crafting Good Toys should take away from your inventory of parts but doesn’t at the moment.

It might seem like the game is broken, but it just means I need to self-enforce any new rules I come up with before I implement them, similar to what you would do with a paper prototype.

And of course, the game’s graphics need work. At the very least I need some indicators to let the player know they can select a worker, but I also want to make it clearer when a worker is idle, when a worker is done crafting a toy, when a toy ships, and things like that.

Thanks for reading!

Want to learn when I release updates to Toytles: Leaf Raking or about future Freshly Squeezed games I am creating? Sign up for the GBGames Curiosities newsletter, and get the 24-page, full color PDF of the Toytles: Leaf Raking Player’s Guide for free!

Leave a Reply

Your email address will not be published. Required fields are marked *