The Sims Online 2D — full game: CAS, build mode, needs, AI Mode (whim-driven autonomy), careers+chance cards, neighborhood AI sims, death/ghosts, meal tiers+sickness, paintings/novels, house parties, memories, weather; 38 headless tests green
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
# The Sims Online — 2D Web Edition 🏡
|
||||
|
||||
A browser remake of The Sims / The Sims Online vibes in **plain JavaScript** (no frameworks, no build step) with an **isometric 2D canvas** renderer.
|
||||
|
||||
## Run
|
||||
|
||||
```bash
|
||||
python3 -m http.server 8080
|
||||
# open http://localhost:8080
|
||||
```
|
||||
|
||||
Or any static file server. No dependencies, no bundler.
|
||||
|
||||
## Features
|
||||
|
||||
- **Create-A-Sim**: gender, skin/hair/outfit, 5 personality sliders, aspirations
|
||||
- **Isometric house building**: buy/build modes, walls, doors, windows, floor patterns
|
||||
- **Needs simulation**: hunger, energy, bladder, hygiene, fun, social, comfort, room
|
||||
- **🤖 AI Mode**: sims autonomously fulfill needs *and* pursue their own whims (whim-driven goals: promotion study, earning via art/novels, flirting, hosting…)
|
||||
- **Careers**: carpool commute, performance, promotions with skill requirements, chance cards
|
||||
- **Neighborhood**: AI households with personalities, visits, relationships that persist
|
||||
- **Death & ghosts**: electrocution/fire/starvation/old age → Grim Reaper, gravestones, night hauntings
|
||||
- **Food system**: groceries stock, 4 meal tiers gated by cooking skill, food poisoning that spreads
|
||||
- **Creativity money**: easel paintings, writing novels chapter by chapter
|
||||
- **House parties** with scored guests and aspiration rewards
|
||||
- **Whims/Wants**, memories diary, aging from baby to elder, romance/marriage/babies
|
||||
- Weather (rain/storms), kitchen fires, bills, burglars' cousins (pizza delivery), school for kids
|
||||
|
||||
## Tests
|
||||
|
||||
Headless harness (node:vm sandbox with stubbed DOM/canvas) — 38 scenario tests:
|
||||
|
||||
```bash
|
||||
node test/harness.mjs
|
||||
```
|
||||
|
||||
## Layout
|
||||
|
||||
```
|
||||
index.html shell
|
||||
css/style.css all styling
|
||||
js/
|
||||
core.js constants, helpers, event bus
|
||||
audio.js WebAudio bleeps
|
||||
data.js object catalog, careers, meals, whims, socials
|
||||
world.js lot grid, pathfinding, objects
|
||||
sims.js Sim class, needs, skills
|
||||
ai.js autonomy, actions, parties, deaths, wants
|
||||
render.js isometric painter
|
||||
ui.js HUD, panels, modals
|
||||
hood.js neighborhood map screen
|
||||
main.js game loop, save/load, CAS flow
|
||||
test/harness.mjs headless test runner
|
||||
```
|
||||
Reference in New Issue
Block a user