social.solarpunk.au

social.solarpunk.au

UWU.BAS design document

UWU.BAS

vidak.

2025

Main loop handles:

  • Time progression
  • User input
  • Pet behavior (based on hunger, mood, etc.)
  • Display logic

High level structure

Global pet state

Store the core state in variables:

AGE
HUNGER
HAPPINESS
SICKNESS
LAST ACTION TIME
EVOLUTION STAGE
IS ALIVE

Main loop

  1. Initialise pet
  2. Main menu or startup
  3. Main loop
    1. Alive?
    2. Time passes
    3. Check for events or needs
    4. Display pet
    5. Get player input (if any)
    6. Return to top of loop

Main loop structure

Subroutines

  • Time passing

Aging Hunger increasing Mood changing

  • Logic and branching

Pet evolves Pet dies Gets sick

  • Display

Idle animation, status, etc.

  • Input

Feed Play Heal

Event timing

Use time counters.

Every N cycles or ticks, age increases or hunger changes.

Structuring view as a mode

VIEW MODE="IDLE"
IF NEEDS ATTENTION THEN VIEW MODE="CRY"
IF USER SELECTS FEED THEN VIEW MODE = "EAT"

Dislay subroutine renders based on VIEW MODE. Detaches display from behaviour.

replies
0
announces
3
likes
2