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
- Initialise pet
- Main menu or startup
- Main loop
- Alive?
- Time passes
- Check for events or needs
- Display pet
- Get player input (if any)
- 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