From 1cedfc7b98cd4e30f3cd12577e0ec563b7d8d298 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 23 Nov 2026 02:16:51 +0000 Subject: [PATCH 1/6] Ironwing: baked texture sets for the fighter and the carrier, and a planked flight deck - tools/vehicles/texbake.py bakes albedo, normal and ORM maps (2048) for the player's fighter and the carrier the way Midnight Ops' weapons are made: one atlas per model, Cycles bakes the paint scheme, position, normal, material, edges and occlusion, then numpy paints panel lines and rivets, chipped paint, exhaust and gun soot and oil (fighter) and plating seams, portholes, rust streaks, waterline grime and funnel soot (carrier). The flight deck gets a tiling plank set. - pack.mjs keeps those textures as WebP; art.js keeps the tex_ materials as they come. - The rebuilt files also carry the new moving-part nodes used by later commits (fighter_canopy, _wingOut, bomber_bayL/R, _radar0..); until then they sit where the old geometry was. Node names and far LODs are unchanged otherwise. - Assets folder: 1.71 MB -> 3.68 MB. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn --- README.md | 2 +- e63334287a3deaa3/ironwing/assets/aircraft.glb | Bin 712400 -> 1736244 bytes e63334287a3deaa3/ironwing/assets/ships.glb | Bin 313920 -> 1251460 bytes e63334287a3deaa3/ironwing/js/art.js | 13 +- .../ironwing/tools/vehicles/README.md | 40 +- .../ironwing/tools/vehicles/aircraft.py | 61 +- .../ironwing/tools/vehicles/build.py | 26 +- .../ironwing/tools/vehicles/pack.mjs | 21 +- .../ironwing/tools/vehicles/ships.py | 39 +- .../ironwing/tools/vehicles/texbake.py | 545 ++++++++++++++++++ 10 files changed, 707 insertions(+), 40 deletions(-) create mode 100644 e63334287a3deaa3/ironwing/tools/vehicles/texbake.py diff --git a/README.md b/README.md index 8572bfef..e3a1cab9 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Personal site hosted with GitHub Pages at **https://ascoding11.github.io**, the **Audit (November 2026, later):** a pass over everything a player sees, from five practice matches played by a script at laptop and phone sizes (drop to knockout, two watched to the end) and film strips of every hold. Fixed, worst first: (1) aiming didn't zoom at all, the menu's 60° view stayed on in a match and each shot's view punch added up and never eased back (66.6° after 30 SMG shots), because a comment in `updateCamera` had swallowed the line that eases the field of view (now: AR aimed 46°, Bolt Sniper 16°, back to 72° after a burst); (2) your long gun hid behind your head and the left hand stopped short of its front (longer arms, `ARM_K`, and the new two-handed hold, see Holding a weapon); (3) Practice bots shivered while they fought, their drawn body turning about 24° a frame because their aim error is re-rolled every frame: what is drawn now turns toward the aim over about a tenth of a second (`u.ey`, `u.ep` in `animModel`, 1.8° a frame; their shots are unchanged); (4) a bot whose guns were all empty stood next to its target for good with the empty one in hand: `botPickWeapon` now puts it away so the bot swings the crowbar; (5) the build ghost never turned red (another comment had swallowed its colour line); (6) chests were brown boxes much like the crates: a chest is now a planked chest on a plinth with gold corner caps, a rounded lid with gold straps and a lock plate, the open one with its lid thrown back over gold light (`chestGeos`), and unopened chests glow gold underneath (in the loot glows' instanced mesh, `drawItems`; no pulsing with reduced motion); (7) rocks, trunks and canopies were flat paint: three more surface layers (see Surfaces); (8) heals sat on stiff straight arms (`HHOLD`); (9) on a phone held sideways the menu's Quick match and Practice, the lobby's Start match and the end screen's Play again were below the fold (the menu is two columns there, the lobby's title one line, the end screen's buttons come before the results); (10) the phone's kill feed cut off weapon names (it names the type there, AR, SMG, Shotgun…, and is wider); (11) the JUMP! banner repeated the glider hint shown just above it; (12) aiming an AR (the camera goes to your eye and your body is hidden) showed no gun at all: your gun is now drawn in front of the camera, low and to the right and turned in toward the middle, raised as you aim and shoved back by each shot, one more instance in that gun's existing instanced mesh (`VIEWM`, in `syncLimbs`; laid out for 46° and shrunk to match a narrower zoom), and the flash, tracer and spent case come from it (`gunPoint`, the flash scaled to it, no smoke or case that close), and it is pulled back and tipped down when a wall is right in front of you (one short ray a frame while aiming); it has no hands, and on Pretty its shadow falls without yours; (13) pistols take a second hand while you aim; (14) after the merge with the modes, their own player update (`modePlayer`) fired a Fire still held from picking an edit's tiles the moment the edit closed (usually into the wall just edited): it now waits for Fire to be let go (`editLatch`), as Classic does. Nothing new is sent and nothing solid, hit areas, damage, timings, speeds or the map version changed; a page from before the audit plays in the same room. Cost: in a frozen frame with 12 characters, draw calls are one or two fewer (laptop 35 to 34, upright phone 28 to 26, sideways 36 to 34: the open-chest mesh is skipped while no chest is open) and triangles about 2 to 3% more (laptop 168,388 to 173,632, phones about 2,800 more: the new chest model, now drawn only where there is a chest, `drawChest`; the characters' own triangles are unchanged); `animModel` within the noise of this busy machine (4 to 7 millionths of a second a character); the surface texture is three layers bigger (about 1 MB more graphics memory on a computer, 0.25 MB on a phone) and takes a little longer to draw at load. Weak: from right behind you still see a long gun mostly end-on (the back half beside your shoulder); others' pistols stay one-handed (aiming isn't sent); Practice matches are usually over in about three minutes because the bots finish each other before the storm's late phases (bot accuracy and the storm's times were left alone); next to a wall the camera can still show half a screen of it; the new sounds were never heard by a person here and frame times couldn't be measured (software drawing). **Modes (November 2026): Duos, Trios, Creative, Box Fights and Zone Wars.** Five more ways to play with friends, made of Driftfall's own island, land shader, build pieces, editing, weapons, props and bots; Classic is the battle royale above, unchanged. **Picking one:** the menu has a Mode picker (Classic, Duos, Trios, Creative, Box Fights, Zone Wars, with the mode's options under it: Box Fights' team size 1v1 to 4v4, rounds to win 3, 5 or 7, bots fill in or off; Duos and Trios have only Bots, set in the lobby); in a party launch (party.js's room `p` + 6 characters, `partyRoom`) a mode's Bots is shown Off and locked with "No bots in party games", the host stores `bo: 0` and `modeRoster`/`sqRoster` add no bots whatever `bo` says, so Box Fights, Duos and Trios need people for two teams and wait as they do with Bots off (Creative's targets and sparring bots, which players add themselves, are unchanged); Practice (offline) plays the picked mode against practice bots, and a room you make starts in it. In a room the host (the usual host: the longest-present live player) picks the mode and its options in the lobby, and everyone sees the pick; the host presses Start (modes have no countdown, and can start with one person when bots fill in; Creative always can). Quick match rooms (`dz-pub-…`) are always Classic. The pause panel gives the host End for everyone (back to the lobby). Saved in the browser: `driftfall:mode` (the menu's pick) and `driftfall:opts:`, and Creative's loadout `driftfall:crload` and rarity `driftfall:crrar`. **Arenas:** a mode is played on its own arena, which takes the island's place while it is on (`setArena`): its own height grid in `TH` (so `terrainH`, walking, shots, builds, the land rules, bots' paths and both maps follow it unchanged), its own ground and sea meshes on the island's ground shader with its own control map (`arenaCtl`: paving with the shader's joints on the 4 m build grid, dirt tracks, darker marks), the island's trees, rocks, bushes and grass tufts (one mesh each, solid but unbreakable, in the arena's hash only), and an empty spatial hash, so none of the island's buildings, chests or pieces are there. The island's hash, ramps, heights, ground, sea, bots' grid and map picture are kept aside and put back exactly when the mode ends (`ISL`); an arena is made the first time it is needed and kept (`ARC`). Creative: a 128 m paved square at 4 m, a grassy rim with two hills, a beach. Box Fights: a flat paved circle with a fixed edge 24 m out (drawn as a low bank of the storm's cloud; nobody walks or builds past it), the two teams' boxes 8 m apart. Zone Wars: a round island about 140 m across with rolling ground and five hills (all under 15 m), rocks, pines and dirt tracks. **Creative:** unlimited scrap and ammo (∞ on the HUD), no storm, fly (the Fly key, Y, or Jump twice; Jump goes up and Fly down, Shift, goes down; on a phone FLY and DOWN buttons above the stick), Back to spawn (U), a knockout puts you back where you fell after 3 s, health and shield come back after 4 s out of a fight. Creative tools (I, or Creative tools in the pause panel): your four slots from every weapon and heal at any rarity, practice targets (stand-still bots, up to 12, put 6 m in front of you; knocked out, one stands again 2 s later), sparring bots (up to 4, put 14 m in front of you, with Box Fights' loadout and a mode bot's mind, so they come for whoever is near; knocked out, one comes back where it was put 3 s later; `pracArm`), Clear them all, Clear my builds and, for the host, Clear every build. Anyone may edit any build, and everyone in the room is in it whenever they join. **Box Fights:** two teams, Blue and Orange (colours always with the name), each starting in its own one-cell box of real build pieces (four walls, a floor and a roof, owned by the team, `T0`/`T1`: the team's to edit, anyone's to break), with a fixed loadout every round (Epic Pump Shotgun, SMG and Rifle, 3 Shield Fizz, 200 scrap, full shield); a 4 s countdown (3, 2, 1, FIGHT) with everyone frozen; no damage from team-mates (shots pass through them); last team standing takes the round, or after 2:30 the team with more health and shield left (a tie is nobody's); first to N. Team-mates are on the map and name tags are in the team's colour; a knocked-out player watches a team-mate. **Zone Wars:** everyone for themselves on random spots (`zwSpawns`) with a fixed loadout (Rare Pump Shotgun, Rifle and Drum SMG, 2 Shield Fizz, 300 scrap, 50 shield) and a fast storm (`ZW_PH`: six phases, closed in under two minutes) whose next circle jumps from a third of the way to nearly the edge of the last one, so part of it is often outside the old circle; last one standing takes the round (if the storm takes the last two together, nobody does); first to N. **Bots:** Box Fights fills each team, Zone Wars fills up to 8 (on by default, off in the options; Practice always fills). They use `botThinkM`: no loot, go for the nearest enemy (never a team-mate or a target), shoot through and break builds in the way, stay out of the storm. **Sync:** the host decides everything and puts it in its node. A mode's match state goes in a new key, `mx` (`md` the mode, `op` its options, and per round `rn` the round, `sc` the score as a string, `blue-orange` or `id:wins,…`, `tm` each roster place's team, `zs` Zone Wars' circles as `x,z,r;…`, `sid` the series, `rw` the round's winner, `fin`/`wn` at the end), while `ms` then just says lobby: pages from before the modes only read `ms`, so they sit a mode out in the lobby instead of playing it on the island, and Classic's `ms` is exactly what it was. Every page writes `gm: 1`, and only pages with it are put in a mode's roster (the lobby says how many people have an older copy). Each round is a match of its own (a new id), so `setupMatch` puts the arena, builds and everyone back between rounds and events from an old round are dropped; the boxes are built the same way on every page at a round's start, and someone arriving mid-round gets the builds as they stand from the host's build list (`bd`, whose owner field now also says 61/62 for a team's box). The host runs the bots and targets and lists them in its node (`bt`: `{id: [x, y, z, heading, pitch, health, shield, state, in hand, knockouts, 1 target / 2 sparring bot / 0, 1 down]}`), which the others draw with `netsmooth.js` like players; a bot's shots, builds and knockouts are the host's events marked `f` (the bot's id), which pages from before ignore; hits on a bot are sent to the host, as hits on a player go to that player. If the host leaves, the next one runs the bots from where they are (`takeBots`) and carries on the round and the score from the last `mx` it saw. Creative's commands (clear my builds, clear every build, add a target or a sparring bot, `fi: 1`, clear them) are events `k: 'cm'`; the host adds everyone who arrives to Creative's roster (only ever added to, so builds keep their owners in the build list). No Firebase paths or rules changed. **Stats:** the modes (Duos and Trios too) record nothing in the Leaderboards (no matches, wins, knockouts, placings or Elo; `recordStats` returns at once), so Driftfall's battle-royale boards and the miles worked from them only ever count Classic (solo). Play time is still counted by stats.js, as for any game, because it is time spent playing Driftfall. A separate set of keys would show nowhere (leaderboard.js lists only Driftfall's Classic stats) and only make every player's stats node bigger. **Cost:** an arena is one ground and one sea mesh in place of the island's, one props mesh and one tufts mesh (Creative measured 12 draw calls on the plain look); making one the first time takes a moment (its ground, sea, map and bots' grid). Nothing new is made every frame except the HUD's strings a few times a second. **Duos and Trios (`du`, `tr`):** the battle royale in teams of 2 or 3, on the island with the Drifter, loot and storm exactly as in Classic: in the code `GM` stays `'br'` and `SQ` is the team size, so everything Classic does is shared (see "Squads" in the script). Teams (`tm`, one base-36 digit per roster place) are the people in the order they joined the room (a Party that launches together joins together), filled with bots when Bots is on, plus bot teams up to 12 players (`sqRoster`); Practice is you and your bot team-mates against bot teams (6 teams of 2, 4 of 3). Online, as in Box Fights, the host runs the bots (`bt`, now also with the Drifter, falling and gliding states) and sends their shots, loot and knockouts as events marked `f`; a team's bots jump just after their person and land near them, and catch up with them when they fall 24 m behind. **No friendly fire:** shots pass through team-mates and a team-mate's hit is never applied. **Name tags:** team-mates' tags are blue and show through anything from anywhere; team-mates are blue dots on both maps; a dead player watches a team-mate. **Down, not out:** when your health runs out while someone on your team is still up, you go down instead (`dn: 1` in your node; event `k: 'dn'`): 100 health that bleeds away at 3.4 a second, crawling at a third of the speed, lying face down (lower hit boxes, a lower camera), no shooting, building, editing, opening or healing (on a phone Fire, Aim, Reload and Edit hide). A team-mate holding Use (G, or the touch button, which reads REVIVE) within 2.4 m for 4 s picks you up with 30 health (event `k: 'rv'`); bots go to a downed team-mate within 45 m and do the same, and a downed bot crawls to its nearest team-mate. Anyone else's shots, the storm or bleeding out finish you, and once nobody on the team is up everyone down on it is out. As with every hit, each browser decides this for its own player (and the host for its bots). **Winning:** the last team with anyone left (`wt` in the match state); the HUD counts teams left, the end panel shows the team's place out of the teams. The match state is in `mx`, like the other modes, so a page from before sits a Duos or Trios match out. **Tests** (`window.__dz`, webdriver only) add `GM`, `SQ`, `arenaOn`, `setArena`, `modeStart`, `botNet`, `syncBots`, `sqRoster`, `goDown`, `sqUp` and the rest of the mode functions. **Checked** in Practice for every mode (rounds, scores, boxes put back, the storm, flying, tools, targets and sparring bots, downs, revives by you and by bots, team wipes, a team win) and online with two browsers in one room for Creative (shared builds, a sparring bot, clearing), Box Fights 1v1 (a round won, the next one set up), Zone Wars (the same circles on both) and Duos (both on one team with 10 host-run bots, no friendly fire, a down seen by the team-mate and a revive by them, a host bot downed by the other player), at 1280 × 800, 375 × 812 and 812 × 375 with no console errors. Weak or not checked: Trios online, 3v3 and 4v4 Box Fights online, a host leaving mid-match in a mode (the bots carry on with the next host from where they are, with a basic loadout in Duos and Trios), a full room of 30, and a real phone; you can't pick your team (it's join order); downed players' lying pose is the falling pose on the ground. Collision rules (keep them if you touch movement): you and the Entity are boxes 0.72 m wide and 1.95 m tall; map walls, posts, pillars (0.9 m and 1.5 m), office partitions (1.25 m tall, 12 cm thick: jump onto or over them) and built walls and floors are solid boxes. A ramp is solid too (`inRamp`): a sloping sheet 0.33 m thick whose top you walk on. With the middle of a body over a ramp, the body is clear of it only on top (feet no more than a 0.6 m step below the surface, which is how you step onto the low end or land on it from a jump) or underneath with its head under the ramp's underside; anything between counts as inside the ramp, and movement never goes there: walking or jumping into a ramp from the side or from behind stops you (`rampBlocks`), under one you can only stand where there is head room (the 1.5 m under the high end) and a jump there stops at the underside, and nothing gets up through a ramp from below. (Until November 2026 ramps were walkable surfaces only and could be walked and jumped through.) Movement goes one axis at a time so you slide along walls; a move that would enter a solid is dropped unless it is a step of up to 0.6 m onto something with head room; and a frame that would move you more than 0.25 m (below about 25 fps; frames are capped at 50 ms) is split into shorter steps, so nothing as thin as a wall can be skipped over. You stand on anything your box overlaps and fall only once you are clear of it, and walking up a ramp into a floor stops you under it (if a floor dropped on you pushed you down below a ramp's surface, you can still walk back down the ramp, just not further up). The only way into a solid is a build landing on you (your own, the Entity's or another player's), and the game then shoves you out the shortest way (sideways out of a wall, up onto or down from under a floor) that ends inside the map without passing through any other wall or build on the way, rather than trapping you or letting you walk through it; the same push-out runs at spawn and on every step. A ramp that lands on you (`rampOut`) lifts you onto it if that is no more than 2 m up, so a ramp placed in the cell you are standing in puts you on it ready to climb; otherwise you are moved the shortest free way: along the slope to where there is head room underneath or to where it is low enough to step onto, out of a side, or up or down. Other players' drawn positions are clamped to the map and pushed out of solid boxes too (not ramps: each player's own page keeps them out of those), so a corner cut between two updates, or a late update carried on, never draws (or lets you shoot) someone inside a wall. Shots are rays tested against every solid, ramp surface, the floor and the ceiling before players, so they can't pass through walls or builds. -- `e63334287a3deaa3/ironwing/`: Ironwing (**preview, admin page only**; Back Room folder; the display name lives in ONE constant, `IW.GAME_NAME` in `js/core.js`), the air entry in the Midnight Ops war series: a single-player campaign of carrier-fighter missions over the sea and the islands, flown from a third-person chase camera (three.js r128 from cdnjs plus `../autores.js`; Web Audio; no Firebase, nothing online). **Preview gate:** like Midnight Ops, `window.IW_PREVIEW = true` at the top of `index.html` lets the game run only in a browser holding `ironwing:preview` = `1` (set by the "Ironwing (preview)" button on the admin page); without it the page says "Not available yet" and loads none of the game. While the preview is on, every mission is open for testing (`IW.unlocked`); set `IW_PREVIEW` to false to open the game, which also turns on the normal unlock order and play-time counting (`stats.js`), and then give it its card, phone row and What's new entry. **Missions** (`js/missions/`, registered as data with `IW.missions.register({id, num, title, kind, line, mood, briefing, loadout: {bombs, rockets}, build(M, data), setup(M, cp, data), medals})`, the same shape as Midnight Ops'): 0 **Flight School** (training: catapult launch from the carrier Resolute, five ring gates, four target drones, a practice raft to bomb, land back aboard), 1 **Dawn Strike** (carrier strike: sink two destroyers of a flotilla steaming west, a cruiser for the bonus, fighters overhead), 2 **Hold the Atoll** (base defence: scramble from Kestrel Field and break up three raids of level and dive bombers with escorts; the base is lost under 35% integrity), 3 **Fleet Shield** (fleet defence: torpedo bombers low from the west, dive bombers from the clouds, then both; keep the Resolute afloat), 4 **Fire on Kalder Reef** (base attack at sunset: fuel tanks, radar mast and heavy flak, fighters scrambling from the runway, then home to land). The script API is `M.obj/done/lose/when/after/say/checkpoint/fail/complete`; `M.ship()` and `M.structure()` spawn things that stay destroyed when a checkpoint is restored (each has a `uid`, and the checkpoint keeps the list of uids destroyed so far); three medal goals give gold, silver or bronze. To add a mission, copy one in `js/missions/`, give it the next `num`, and add its `