Pico8 Farmy Farm Farmer Farming Sim Design Phase

Core Game Loop

  • Harvest auto-renewing resources such as trees, rocks, cow milk, sheep wool, chicken eggs.
  • Plant and grow vegetables.
  • Catch fish.
  • Turn in quests and get coins.
  • Spend coins to expand the farm.

Key Algorithms

Crop Planting Loop

Crop sprites will change on interaction.

Sprites needed:

  • untilled
  • tilled and unwatered
  • tilled and watered
  • tilled, unwatered, and planted
  • tilled, watered, and planted
  • tilled, watered, planted, and phase 1 growth
  • tilled, watered, planted, and phase 2 growth
  • tilled, watered, planted, and phase 3 growth

This is 8 sprites per crop.

To reduce the sprites needed, the first 32x32 map section will be used to handle crop tilled/watered/planted. Then tilled/watered/planted sprites can be shared for all types, and only crop phases would be needed in addition for further crops.

Resource Growth Loop

This will affect crops, trees, rocks, cows, sheep, etc.. It will be a centralized time interval that each actor will check against and change state based on its age.

‘Growth’ will simply be sprite swapping. Each actor/resource will have multiple sprite IDs. These sprite IDs will be stored in a table for each type, and the state change will simply be advancing to the next sprite until the last sprite is reached.

Layout, Map Designs, and Sprite Handling

Two 32x32 map sections will be utilized.

Sprite range x=0-31,y=0-31 will contain the farm borders and other static features, such as buildings, as well as crop tile tilled/watered/planted states.

Sprite range x=32-63,y=1-31 will contain statically-positioned resource sprites, such as trees and rocks.

Moving actors, such as cows and sheep, will not be map sprites, but will be contained in a separate table.

Resource Interaction

When the player presses a button, the nearest interactable actor will be detected, and that actor’s interaction function will be invoked. Interaction functions may be extended for certain actors to change the current sprite, as in the case of crop growth.

Each actor will have 1 or more steps in their interaction cycle. Once all steps are complete, the actor’s produce function will be invoked. The produce function will create collectible actors.

  • Cows: produce milk actor
  • Sheep: produce wool actors
  • Tree: produce wood actors
  • Rock: produce rock actors
  • Crops (only in phase 3): produce crop actors

Quests

A quest game loop will be implemented. A screen will show the list of available quests. Quests will have simple turn-in goals, such as “3 wood, 2 stone, 3 fruit”. Rewards will be coins.

Expanding the Farm

More animals or trees can be purchased by interacting with an ordering station. This can either be specific stations per type of resource, or a screen for selection. The former would be simplest, since this would make the loop identical to the Resource Interaction loop.

The Player

Controls

  • Arrows: player movement
  • O: interact
  • X: exit current menu
  • menu: interrupt to show inventory screen

Sprites and Tools

The appropriate tool will be drawn relative to the player for the given target sprite. Tree/rock/untilled will use an axe-like sprite. Watering an unwatered tile will use a watering can sprite.