Loading…
a327ex.com

ToTeMoJi 1

Fable 5 xhigh

Summary

Inception session for ToTeMoJi (totem + emoji, named at the very end) — a new NDA game on the emoji-template stack: an emoji stacking-journey game where you hop across hilly terrain with a tentacle-like tower of emoji goods on your head. The session went from get-acquainted through fork, faithful movement port, continuous terrain, the KVP sound-lab port, the stacking core, the blob enemy, and the seal. Home: E:/a327ex/totemoji (private repo a327ex/totemoji).

Acquaintance + project framing:

  • Owner's brief: new project on emoji-template reusing the KVP F7-lab "done" items' effects (work for 1 game → 2 games), mixing emojunky, Super Emoji Invaders, and the old Super Crate Box clone.
  • Read the research corpus catalogs (emoji-template/reference/research/): emojunky-one (2020 hop-arena, weapon gift-boxes, enrage loop, shop), super-emoji-invaders (the polished 2022 wave arena — the showcase base), super-emoji-box P/S (the Jun-2024 "restart-around-feel" P likely = the port-test the owner half-remembered).
  • KVP fx_done.lua = 28 done items (live-30 minus Shield/Meat). Key insight surfaced: KVP's board grammar (pawns marching to a bottom edge) rhymes with SCB's fall/enrage rule, so items like Hole/Barricade/Dynamite/Hourglass map almost verbatim.
  • Owner ruled: reuse effects only (particles/juice/sounds/emoji identity), not rules — cross-game item identity is the goal.

Fork + increment 1 (the faithful base scene):

  • Forked emoji-template → emojunky/ (working name). The showcase main.lua was ruled "felt incorrect in many ways" → REWROTE from the original invaders source, not the showcase: 640×360 (the original's res, not 480×270), invaders arena-1 Tiled map transcribed verbatim (16 rects, -40 offset), cream fg field backdrop, cover-layer depth trick (duplicate solid faces above the player), player_ ported line-for-line (hop-walk 128/-90, jump -300 held-style, 34px variable cut to -65, gravity 685, air spin + snap, squash via hitfx_land, hard-landing package at vy>200), EBB-gen plants with invaders' weighted spawn recipe. Jumping is SILENT (the original; the showcase's jump sound was an invention).
  • Engine-API discipline: everything translated to Anchor 2/3 idiom (shake_push for the directional landing thump, collision_entities_begin nx/ny not flipped on swap → orientation-agnostic landing test).

Controller fixes + CONTINUOUS TERRAIN + the KVP Sound Lab port:

  • Bug: jump-delay + hop-death shared one root — contact-begin-only token restore had an absorbing failure (side-contact consumed the pair's begin event; landing on the same solid's top never re-fired) → raycast grounding (3 rays), tokens restore per grounded frame with vy >= -10 guard.
  • Tile map → ONE continuous terrain polyline (TERRAIN, terrain_height, later terrain_angle/terrain_walk), a single one-sided Box2D-v3 chain collider (winding verified against vendored source: "normal points right of segment direction"), quad-strip fill + cover copy. Killed both visible tile seams and seam-catching.
  • Idle-on-slope downhill creep → gravity_scale 0 rest.
  • Squash boosted (SQUASH 1.8) + takeoff stretch (owner: "more aggressive").
  • KVP Sound Lab ported (the "generalize later" debt paid): emoji/sounds.lua = KVP-era pipeline minus moments/triggers (lazy declared bank via sound_declare/sound_keys, per-sound pitch ranges + the ± offset knob in sound_tuning.lua, SOUND_DISABLED mutes → emoji/sound_mutes.lua, family re-rolls, warmer); emoji/sound_tuner.lua = the F3 BANK scope (list + unified bits/sr/vol/p.lo/p.hi/delay sliders + mute + drag-drop import via ffmpeg -q:a 10 with sound_overrides.lua attribution). Game freezes on F3 (sound_tuner_paused). anchor.exe refreshed to the current Anchor3 build (sound_play_handle w/ seek, engine_get_drops, file_write_string); frameworks were byte-identical to KVP's.

The slope-solved hop ("option A") + surface-relative plants:

  • Diagnosis with numbers: at ≥35° the slope rises faster along the path (128·tan38° ≈ 100px/s) than the hop rises (90px/s) — uphill hops physically cannot leave the ground; downhill hops doubled into 71px floats.
  • Owner picked constant-beat solving from presented options A-E: every hop lands HOP_L along the surface after exactly HOP_T; player:do_hop solves (vx, vy) per hop; degenerates to (128, -90) on flat BY CONSTRUCTION. Arc clears any straight slope (parabola above chord). Launch-stamp guard covers steep-downhill positive-vy launches. HOP_DOWNHILL (0.4) later added: downhill stride+beat stretch (owner wanted longer downhill hops).
  • Rejected by owner: rhythm-as-stability (on-beat hops free) — balance stays physical.
  • Plants: plants_terrain adapter in emoji/plants.lua — per-member terrain height sampling + tilt toward surface normal (plants_tilt), the wall-plant convention generalized.

The floating-player saga (three passes):

  • Pass 1: circle collider (PLAYER_RADIUS, box corners held the round sprite off slopes) + Twemoji padding note.
  • Pass 2 (the REAL bug, from owner screenshots): the resting freeze engaged at first ray contact — with 5px ray slack the body PARKED up to 5px in the air; hop chains re-launched from ray-contact height and never touched down. Fix: TIGHT rays (radius+1.5 — the side rays are what ground slopes/valleys, verified geometrically) + resting requires settled vy (< 30).
  • Dust: terrain-angled from the true ground point, then blended 50% toward horizontal (DUST_TERRAIN_MIX — full tracking "looked unnatural").
  • Backdrop swapped to the family sky (gradient + 5 drifting clouds from the showcase; owner call over invaders' cream).

Game design (the stacking brainstorm → settled direction):

  • Owner: always wanted a stacking game (Kojima-esque but "more gamey") in this style, stacking-while-moving. Presented 7 concepts (Peddler journey / Living Totem stack-as-build / vertical catcher / chase / pack pony / stack-as-tool / downhill flow) + the stack-feel toolkit (delayed-follow, authored stability, impact cascade, emoji-as-material). Owner picked 1+2 fusion.
  • Second brainstorm wove drops×effects×journey: journey prices drops (rolling cargo, backtracking), effects counter drop-causes (tower defends itself), route = draft (pickup order is build order), sell-vs-keep (inventory IS equipment), drop-casting (jettison = cast) pitched.
  • Owner then SETTLED the frame: MMO-like enemies (MapleStory fields), progressively tower-hostile (jolt → drop → steal), Spelunky-style template map assembly, horizontal journey, challenge alternates combat-for-XP with light Getting-Over-It obstacles aided by carried emojis. Full enemy roster (blob tiers/skull/boar/bird steals top/ghost steals middle/bees/storm cloud/King Blob) + cargo catalog (KVP-identity attackers ⚡⛈️🗡️☄️🔥💥🧨, passives ❤️💗☕🔗🍀🐌❄️⏳🛡️👼, movement aids 🎈🪶🥾🪁, trade goods 🍉🍖💎🍯) + XP duality (permanent picks vs stealable cargo) laid out in chat. ⛔ No design.md — owner: build one thing at a time.

The stack (naive core → tentacle → branching → single):

  • Naive core: lagged-follow chain (x smoothed, y rigid), landing jolts (impact × height), detach past 13px → physics cargo_body, proximity re-pickup, 6 cargo emojis, cargo rolls downhill.
  • Owner: tower-watching feels good → REMOVE drop rules entirely (drops deserve deliberate design).
  • Tentacle: constraint chain — chase + projection onto the STACK_PITCH circle + per-link ±STACK_BEND curvature clamp, items rotate to chain tangent. Kick baked 3, bend 0.5.
  • Gravity droop tried TWICE and removed: torque model (D·i·cos(a) — Euler-buckling flop past critical index, "too fast/much/easily") then rest-pose sag with lean-direction memory ("doesn't feel right"). ⛔ Don't re-pitch sag.
  • Branching (tree): built (branch chains at every 4th trunk link, alternating ±52°, riding anchor tangent, fill-in-order routing, live sliders) — owner saw it, PARKED it same day ("single stack for now, decide the game first"). Revivable from git/session history; stack_chain_update stays chain-general.
  • F1 live tweak panel (sliders writing to globals; stack + blob knobs).

The blob (soft-body → normal; stomp → removed; contact saga):

  • Soft-body v1: 10-part joint ring + center (distance joints hertz/damping) under the stretched original emojunky-one blob sprite (copied assets: blob_normal/dizzy/imp). Rendered "as a line" — distance-spring-only rings FOLD into flat local minima. Fix trio applied (enemy-enemy collision as anti-fold pressure, second-neighbor braces, hard spoke limits) after verifying the C binding parses length/hertz/damping_ratio. Owner: "nevermind, make blobs normal" → ⛔ soft-body abandoned.
  • Normal blob: ONE circle collider + sprite + spring juice (idle wobble pulses rng(0.075-0.15) every rng(0.4-0.6)s — the emojunky signature, landing squash, takeoff stretch), hop-chaser (BLOB_CHASE_R 240), terrain-tilted draw (lerp_angle to terrain_angle), slope-boosted hops (rise sampled 40px ahead) + stuck escape (2 no-progress hops → 1.5× leap). B spawns at cursor.
  • Stomp: three attempts (above+falling → geometric STOMP_CONE in the blob's tilted frame → still inconsistent on hop arcs) → ⛔ REMOVED entirely. Any contact hurts the player; blob kills belong to future tower attacks (blob:hit(dmg, from_x) kept ready: KVP-style hit chord — hit1 flipbook + star confetti + squish + flash; death = dying-pawn corpse: launch away, tumble, accelerating blink-out).
  • Contact detection journey: begin-events stale → proximity scan → radius accidentally INSIDE the solver's contact distance (r_p + r_b — "literally cannot fire") → owner: "just use Box2D events" → final: begin/end maintaining a touching set, hurt attempt per frame while touching, invuln paces, _dead guard for died-mid-contact.
  • Player hurt package: hurt_slam + flash + dizzy + 2s invuln (body blinks 0.05s, stack stays visible) + ⭐ the first drop rule — ONE RANDOM stack piece ejected as recoverable cargo. Knockback: impulse removed (inconsistent — velocity writes ate it) → re-added as a knockback WINDOW (kb_until 0.15s, movement stands down, velocity set directly) → scaled by fall speed (base 100/-140 side-contact, up to ~175/-265 falling on top).

Naming + seal:

  • Name ideas presented (TOTEMOJI, EMOJI BABEL, TOP HEAVY, STACKPACKER, EMOJI TRAIL, OVERENCUMBERED, PILEGRIM, HEADLOAD, + the KVP-style joke-long title). Owner picked ToTeMoJi.
  • Renamed folder → totemoji/, title 'ToTeMoJi', CLAUDE.md header updated (NDA status recorded), private GitHub repo a327ex/totemoji created + pushed (engine exe + FFmpeg DLLs gitignored — 63MB avcodec; copies from Anchor3/engine/build/).
  • Memory project_totemoji.md written. Next when resumed: the first tower attacker (⚡) — the only kill path now.

🔒 Only the summary of this log is public. Private because this is ToTeMoJi.