Repository navigation
Lazy SF2 Patch 1.2.0-alpha.11
Pre-release
Pre-release
·
9 commits
to master
since this release
Alpha. This is a test build, published as a GitHub pre-release. Every pilot in a multiplayer session needs this same build. To go back to 1.1.x, uninstall this version first: Windows blocks a downgrade.
Known issues
- Wrong password: joining with the wrong session password opens the lobby screen instead of a clear "cannot connect" message.
- Seats: only the first four aircraft of each friendly flight can be seated; larger flights fly their other members by AI.
- Loadouts: every pilot flies the loadout the host set for the mission.
- Builds: every PC in a session must run this same build; it cannot join 1.1.x or an older test build.
- Installer log:
lazysf2-setup.logdoes not survive an install or upgrade, so it cannot yet help diagnose a failed install.
Player features
- Multiplayer lobby. The main menu's Multiplayer button (hidden in the stock game) now opens a lobby for flying one single mission together over the network, by direct address (on a LAN, or with UDP port 7777 forwarded to the host). The button shows only on the July 2013 build, where the hooks it needs are installed.
- Connect: the screen shows the active pilot's callsign (as Pilot Record shows it), the host's address (the last one used is kept in
Options.ini,[OtherOptions] LobbyAddress) and a session password, with Host and Join. - Session password: hosting needs one, and joining needs the host's. It never travels over the network: both PCs prove they know it (a challenge and answer each way, the key stretched with PBKDF2). Wrong guesses from one address are slowed down and then blocked for a while. Once the password is proven, all traffic between the PCs is encrypted and authenticated (AES-256-GCM, with keys derived from the password and that connection's handshake), so a forged, altered or replayed datagram is dropped, and what is sent cannot be read on the network. The password is never written to disk; the field shows it as typed, because the game's edit field cannot hide it.
- Pilots and seats: the hosting and joined screens list the pilots and the free seats (flown by the AI) of the host mission's friendly flights, flight by flight in seat order (see Seats in any friendly flight). Each pilot, the host too, takes a free seat by clicking it in the list (your seat is green, other pilots' blue, free seats yellow); the first to ask gets it, and the host always keeps one. Callsigns are shown in plain ASCII.
- Same content, for what the mission uses: the host's game build and patch version must match (else the joining PC gets no mission, its joined screen keeps saying so, and the host's log names it once). Beyond that, only what the host's mission uses is compared: its theatre (and its targets and types files), every aircraft type in it (with its data, loadout and avionics files), and the weapons, racks and tanks in their loadouts (their WeaponData entries), each by a hash of its defining data, read as the game finds them (your own mod folder first, then the game folder and its archives). Other mods may differ. A pilot whose PC lacks something, or has it otherwise, sees it named on the joined screen ("missing: F-4E_67; differs: AGM-12B") and cannot press Ready or change seat for that mission; Ready waits until the check has passed (a mission that cannot be checked is asked for again).
- Generated from shared content: while pilots are joined, a mission the host generates on the New page uses only the aircraft and ground object types every joined PC has in the same version (each PC sends a list of its types when it joins), and every PC loads and starts it from that same set, so mods that only one PC has never block a join and never change what is placed. The host still picks its own player aircraft: a pilot whose PC lacks it is told so. Missions from the Load page are checked as before.
- The host's mission: "Set up mission..." opens the stock Single Mission screen (Cancel returns to the lobby; the Mission Editor's pencil works: its Accept shares the edited mission with everyone, as the New page's Accept does, so a host can add friendly flights for more seats). In the Hangar, Fly reads Done and returns to the lobby.
- Pilots: "Briefing..." shows the host's mission in the stock Hangar, with its theatre selected first. Loadout is hidden, because everyone flies the host's loadout for now. Fly reads Ready there; Ready counts for the host's current mission only, and a new mission clears it.
- Launch: the host's flight starts at once. Each pilot who is Ready loads the mission and joins in their own seat as soon as it has loaded; a pilot's PC waits up to 60 s for a slow host. A pilot who presses Ready later joins the running flight, until the host is back in the menus.
- After the flight: the debrief's Accept returns everyone to the lobby (Refly is hidden), and the host can set up the next mission in the same session. If the host goes away, a joined pilot sees "The host has gone"; when the same host starts a new session, the pilot's Launch and Ready start again.
- Leaving: Esc does not end a session on these screens; use Close session or Leave.
- Lobby sessions of up to 16 pilots: a session holds the host and 15 clients (it was 4 clients), and the lobby lists 16 rows. A 16th client is told "The session is full (16 pilots)." Each pilot's mission fetch (its lobby status, once a second, in the menus and in flight) has a connection slot of its own on the host, so a full session keeps every pilot's row, seat and Ready through the flight.
- Seats in any friendly flight: the lobby lists the first four seats of every friendly flight of the host's mission (the player flight, escorts, sweeps, CAP and the like), flight by flight, each named by its flight's callsign ("DODGE 1-2"). A pilot can take any of them: seats in other flights than the player flight are seats like any other. The lobby lists at most 16 flights (the first 16 friendly flights of the mission; the host's log says when there are more) and 16 pilot rows; only the listed flights have seats, for the host too. Every friendly flight of the host's mission always spawns in a shared mission, on every PC, even when the mission gives it a lower chance. A seat whose aircraft is destroyed reads "lost" and cannot be taken by a pilot who joins later. A pilot who joins a running flight in a flight that is already in the air takes over that aircraft where it flies; a seat in a flight that has not started yet is woken for its pilot on the host, and so on every PC.
- Connect: the screen shows the active pilot's callsign (as Pilot Record shows it), the host's address (the last one used is kept in
- Network protocol v15. This release speaks protocol v15 only. A PC on an earlier build (any earlier protocol) is refused with the version message and cannot join, and an earlier host refuses this build.
- Encryption. Once the session password is proven, every datagram between the PCs is encrypted and authenticated (AES-256-GCM); a forged, altered or replayed one is dropped. The
net: traffic:line counts those drops (sealed drops). - A session survives the host's or a client's jet being destroyed. The game clock now follows the game's object update pass (once per simulation step) instead of the player's own aircraft, so a destroyed jet no longer stops the clock, the network, the world stream and the handover. The pilot keeps the session, sees the others and the world go on, and a death no longer ends the session for the others; a new flight still does. A host whose jet is gone refuses a new pilot ("the host's jet is gone").
- Far jets update less often. The host sends each client the other jets in one batch per tick (PeerFrames), not a message per jet: a jet within 5 km of that client's jet goes 20 times a second, one within 20 km 10 times, and one farther away 4 times, which cuts the host's upload in a spread-out session.
- The log when the game folder is not writable. A game installed under Program Files and started without administrator rights could not write
lazysf2.log, so the mod ran without one. It now writes%LOCALAPPDATA%\LazySF2Patch\lazysf2.loginstead, and its first line says why. - Fixed: the cursor stays on the game's screen in Fullscreen with Match Windows cursor. The Windows cursor is kept inside the game window while the game is active, and released when you switch away.
Developer tools (off unless enabled)
- Seats without a lobby are developer-only. A host started with
LAZYSF2_HOST(no lobby) still gives seats by the join-order rule: members 0..3 of its own flight, so at most three clients get a seat; the others fly without one. The lobby has no such limit. lazysf2-botswarms on one PC. The host's limit of two unanswered connections per address does not apply to loopback (127.x), so 15 bots on one PC connect without churning. Every other limit stays, and LAN and internet addresses keep the cap.- Protocol v12: every PC spawns the same flights. A mission's random flights and ground groups spawned on one PC and not on another, because the creation pass drew random numbers a different number of times on each PC before those decisions. Now, in a shared mission, each spawn decision (a flight's or ground group's random chance, a parked aircraft's density chance, each placed object in a target area) reads its random number from a place keyed on the mission seed and that slot, so the same file and seed give the same flights on every PC. Each PC logs one
world: spawn draws keyed:line (equal map hashes mean the same slots spawned), and the manifest getsspawn_mapandslot_drawslines. Also: a rebuilt key table no longer stops the catch-up of a pilot who is still joining, and a key table sent again is resent only from the part that failed and is not taken as new on the client. v11 builds and bots are refused. - Protocol v11: a smaller world stream, and objects that differ are not moved. The host's mission objects now go out keyed by a 2-byte index into a key table (every slot of the mission in slot order, with its member count and a hash of its members' types), which the host sends each client reliably when it joins and whenever the table is rebuilt. Each state is 26 bytes (position at 1/256 m, velocity, attitude; no rates), 37 to a datagram. An object that has not moved 1 m or turned 0.2 degrees for 2 s is parked and sent once every 5 s; moving objects keep the 10/2/1 Hz distance rates, and a joiner gets every object's state once, to it alone, 4 messages a tick (a state is marked sent only once every client's queue took it). A client compares the host's table with its own: a slot whose spawn outcome or types differ gets no states there (one log line names the slots), instead of states landing on no object. The type hash is read from the live objects when each PC's stream starts, so a member destroyed and removed before then (on one PC only) makes its whole slot differ.
lazysf2-bot --world-joinchecks the key table and counts the states it keys. v10 builds and bots are refused. - Protocol v8: other players' pilots look where their player looks. JetAnim grows to 22 bytes: two signed bytes carry the player's cockpit head yaw and pitch (head tracking, hat and snap-free views; none in an external view). On the other PCs the pilot model in that player's jet turns its head toward it, through the game's own head target, so it is smoothed and clamped by the game. With no look or none for a second, the pilot keeps the game's own behaviour. Your own jet and AI pilots are untouched. v7 builds and bots are refused.
- Protocol v7: other players' jets move their control surfaces. A new JetAnim message (20 bytes, unreliable, 20 times a second each way; the host passes clients' on) carries the player's pitch, roll and yaw inputs and their trims (one signed byte each), the throttle, the running engines, the gun triggers and the configuration bits. Each copy of that jet gets them in its own input array and state word, so its own systems move the elevators, ailerons, rudder, nosewheel steering, flaps, nozzle and afterburner. Until the first one arrives, or a second after the last, the copy keeps the last jet state as before. v6 builds and bots are refused.
- Protocol v6: the handover answer says why. HandoverDone's byte is now 1 (taken) or the reason it was refused: 0 the host owns the world, 2 another client's offer is being taken, 3 a client's world was taken already this flight, 4 a bad offer. A client that ran the world takes the host's state for its seat (on the ground too) only when the host's own world stands (0 or 4, or when its offer could not be sent), whichever of the seat state and the answer comes first. v5 builds and bots are refused.
- Protocol v5: the session password. Every connection (session or mission fetch) starts with the host's AuthChallenge (16-byte nonce, the session's 16-byte PBKDF2 salt and iteration count, 40 bytes; the host asks for 100 000 iterations, and clients accept 100 000 to 300 000 and derive the key off their network thread); the client answers with AuthAnswer (its own nonce and HMAC-SHA256 over a label and both nonces with the PBKDF2-SHA256 key, 52 bytes), and the host replies with AuthProof (HMAC under another label, nonces in the other order, 36 bytes). Until then each side drops everything from the other unread: the host tells the game nothing and sends no mission, the client takes no Welcome, state, world message or mission chunk. A wrong answer, or none within 3 s, gets Bye 9 and the connection is cut 0.3 s later; per address the host then refuses connections before challenging them for 1 s, doubling per failure, and for 10 minutes after five in a row; one address holds at most two unanswered connections and one public /24 network four (private and loopback networks are not capped, for LAN play), and when every slot is taken the oldest unanswered connection of another address is cut to make room, but only once it had 1.5 s to answer (or was refused), and one /24 network makes room at most every 2 s, so a flood of newcomers cannot cut a player whose answer is on its way. A flood from many networks at once can still keep players waiting (an accepted risk), but never gets anyone in without the password. A client sends its Hello, and the mission fetch its requests and lobby status, only after the host proved the password. A client whose host cannot prove the password leaves with Bye 9.
LAZYSF2_HOSTandLAZYSF2_CONNECTneedLAZYSF2_PASSWORD;lazysf2-bottakes--password(orLAZYSF2_PASSWORD) in every mode.lazysf2-bot --lobby ADDR:PORT --content HEX [--seat N]joins a lobby as a pilot (roster, seat, Ready for each new mission) and follows the host's Launch as a world-join client with its lobby tag. v4 builds and bots are refused. - Shared mission world: a mission in another theatre is refused, and
lazysf2-bot --world-join. The flight's terrain is the theatre selected on the New page, so a joined client (orLAZYSF2_WORLD_LOAD) whose page is on another theatre than the mission's no longer flies it on the wrong terrain: the load is refused with what to do (select that theatre and Accept again), and a theatre that is not installed on this PC makes the client leave the host's session at its Welcome (Bye 8) with that reason in the log.lazysf2-bot --host ADDR:PORT --world-joinjoins a shared-world host as a client: it asks for the mission with a seat tag, says Hello with it, flies its seat from where the host's copy of it is, and counts the world stream and events it receives, so host-side runs can be tested on one PC. The handover probe's 10 s line now runs on wall time. - Shared mission world: one world owner, and an explicit handover. The host owns the world by default. A client that loads the mission before the host's session runs it with its own AI; when the host's session starts it offers its world as a snapshot (every live AI aircraft's pose, state bits, throttle, fuel and store counts, every vehicle's and ship's pose, speed and heading, each flight's waypoint, the objects it has destroyed, and the mission clock; about 13 KB raw for a busy mission, about 1 KB deflated, in 80-byte chunks of 91-byte messages paced 16 a step) and then follows the host like any client. The host takes the offer only if the client's mission clock is ahead of its own (the client loaded first): it writes it into its world (players' jets and objects it destroyed itself excepted), destroys what the client destroyed and logs those kills on its own record with the client's killer and weapon, sets its clock, and answers. Only one offer is taken per flight (a second client that loaded first is refused), an offer that does not complete within 15 s or whose client leaves is dropped, and a client drops its unsent offer when its session ends. Weapons in flight stay with their launcher. With the probe on, Ctrl+Shift+C hands the world over to itself for a solo test: the first press captures the world and marks it remote, the second rewinds every copy to the capture and hands it back to its AI (airborne bit, ripple timer and triggers fixed up), and logs four aircraft's AI task, manoeuvre and waypoint then and 10 s later. Host migration and a client owner's stream to the host are not built yet.
lazysf2-bot --servetakes or refuses a client's offer by its--clock. - Shared mission world: a late joiner takes over its seat in place. Right after each Welcome the host sends the client the current state of the aircraft in its seat, as the AI flew it until then (139 bytes, reliable: pose, velocity, airborne, gear and configuration bits, fuel, stores, damage level), and the avatar stays where that aircraft is instead of moving to the host's wing. A client whose seat is flying and more than 50 m away moves its jet there, matches the speed, takes the fuel, and rebuilds the stores through the game's own rearm; a seat still parked where the mission put it, a destroyed one, or a reconnect already there needs nothing, and a client that loaded first and offered its own world never takes it (the host's seat is a stale copy then). The pose is carried on by half the round trip, and the airborne, gear and configuration bits follow the seat. Once per flight.
lazysf2-bot --serve ... --seat-statesends one. - Shared mission world: one mission clock, and parked copies stay parked. The world owner (the host) sends its mission clock every 2 s (20 bytes, unreliable); a client more than 0.25 s off sets its own through the mission's own setter to the owner's plus half the round trip (game time only, so a pause gives one correction when the clock runs again; each correction is logged), so flights wake, loiter and reach timed waypoints at the owner's times, also for a late joiner. The game marks every remote aircraft airborne each frame; a remote copy that sits on the ground (slow, at its gear height) now has that bit cleared again, so a parked or taxiing copy is not airborne when its AI takes over.
lazysf2-bot --serve ... --clock Ssends a mission clock. - Shared mission world: damage, death, ejection and countermeasures. Each player's PC checks its jet 4 times a second and sends what changed (47 bytes, reliable, and once every 10 s for late joiners): the damage level, fire, the pilot gone (ejected or killed), which parts are lost or show damage, which systems are destroyed, the last attacker by mission key and its weapon, and the owner's life (its player epoch). Each avatar mirrors it through the game's own remote-aircraft events, so it smokes, burns, sheds the same parts and is destroyed like its owner's jet; the attacker is set first, so the host's single kill record credits the right one. A destroyed jet's life is over: its later states are applied to nothing, no aircraft is taken for that player until its next flight, and an avatar already destroyed by mirrored part losses is not destroyed twice. On a joined client a remote copy's death (aircraft, ground object, vehicle or ship) logs no kill entry and does not move mission success; the host logs every kill. Chaff and flare releases go out as they happen (10 bytes) and the avatar's own dispenser releases them; only falls of at most 8 while the owner is alive and its dispensers work count as releases (a death, a destroyed dispenser or a reset sends nothing); the automatic chaff and flare request from an incoming missile is cleared at once on avatars and, on a joined client, on every remote copy, so copies no longer dispense by themselves.
lazysf2-bot --serve ... --damage [A,SLOT,MEMBER]plays a damage story (hit, part lost, fire, ejection, destroyed) and flares, and logs the client's. - Shared mission world: stores, jettison and fuel. Each player's PC sends its loadout table (the loaded stations: weapon id and a hash of its name, so a PC whose ids differ finds its own; count and state; 95 bytes, up to 12 stations a message) every 10 s and at once when a station gets another weapon or more stores (a rearm), and its internal and external fuel, each gun's rounds and its chaff and flare counts every 2 s (23 bytes, unreliable). An avatar takes another weapon, a rearm or the owner's exact count through the game's own rearm (the station's weapon and full count first; every other station is held at its own count, so the rearm touches only those); a rebuild that does not take is given up with a log line until the owner's station changes, and stations a fallback airframe does not have are skipped and logged. Its internal and external tanks are scaled separately to the owner's totals and never above the most they have held, and its guns get the owner's rounds, so its bursts stop when the owner's do. Jettisoning all stores or the drop tanks travels in the jet state's configuration bits and is played by the avatar's own stations. About 45 B/s per player and receiver.
lazysf2-bot --serve ... --stores [WEAPON]sends a loadout and falling fuel and rounds, and logs the client's. - Shared mission world: weapon launches. Each release of the player's own missiles, bombs and rockets (seen at the game's own release call) goes out as an 80-byte event: shooter and target by mission key, station, position, attitude and velocities, and the weapon's type name, so each PC finds its own id; the host relays a client's launches to the others. Every other PC replays it on the shooter's avatar: the avatar fires the same store from its own station (rails, bay doors, ripple), and a guided missile is flown live only on the PC that owns its target, which is the target player's own PC, or the host for its AI, vehicles and ships; there the missile hits with the shooter's avatar as the attacker. Everywhere else the copies are visual-only; so is the host's own guided missile at a client's jet (its bombs and rockets stay live on the host, and their hits on a client's avatar go to that client). Bomb and rocket hits on objects the shooter's PC does not own are claimed like gun hits, checked against wider limits (up to 5 GJ, the shooter within 40 km), and applied by the host. The host accepts a gun claim only while the claimer's gun trigger is on or within 3 s of its release (a round's time of flight), and a store claim only against a launch of that weapon by the claimer in the last 90 s (64 hits a launch at most); old or repeated claims, and claims from a client without an avatar, are refused and counted; the host's AI missiles that hit a client's avatar go to that client. A placed-scenery target is not replicated, and the copies are not corrected in flight yet, so a copy can miss where the live one hits.
lazysf2-bot --serveadds--launch WEAPON,GUIDED,A|G|N,SLOT,MEMBER,EVERY_Sand logs the client's launches. - Shared mission world: guns (protocol v4). The jet state's gun byte now carries the primary and secondary gun triggers, so each avatar fires its own guns while its owner does: tracers and muzzle flash only, since an avatar's rounds do no damage. Hits are claimed by the shooter: a joined client's gun hit on any object it does not own (an AI, a vehicle, another player's jet) is dropped locally as before and sent to the host as a 43-byte claim (target and shooter by mission key, damage slot, gun, energy, the round's path relative to the target). The host checks it (live target, the claimer's jet within 5 km, the path within 150 m of the target, at most 2 MJ, at most 60 claims a second per shooter, refusals logged) and applies it through the object's own damage interface with the claimer's avatar as the attacker, so the kill and damage record stays on the host; a hit on another player's jet goes on to that player, whose PC applies it to its own jet. Gun hits on a client's avatar on the host (from the host player or its AI) also go to that client instead of damaging the avatar. About 90 B on the wire per hit, at most 5.4 KB/s per shooter.
lazysf2-bot --serveadds--jet guns(a 1 s burst every 4 s) and--hit A,SLOT,MEMBER,EVERY_S(a scripted gun hit on the client's jet), and logs the client's claims. - Shared mission world: throttle and engines of the players' jets (protocol v4). The jet state now also carries the throttle (input channel 3, one byte), which engines run and how many, and a reserved gun byte: 20 bytes, sent reliably on change, a moving throttle at most five times a second and only when it moves by two steps or reaches idle or full (about 320 B/s per player and receiver while it moves, so a host relaying to three clients sends three times that; nothing while it is steady). Each avatar gets the throttle in its own input channels 3 to 7 and its engines switched through the game's own setter, on receipt and again on each of its steps, so its afterburner, nozzles and exhaust follow the owner's. Engines past the owner's count are left alone, and a failed or burning engine is not restarted. A newly taken avatar has the AI's gun and fire triggers cleared, and when it is given back to the AI (parked, the player left, the session ended) its engines run again as they did when it was taken.
lazysf2-bot --serve ... --jet abcycles its jet's controls (idle, Mil, full afterburner, engines off) and logs the client's. v3 builds and bots are refused;lazysf2-acmirefuses a v3 recording with both versions named (it converts nothing of it) instead of reading its samples as bad. - Probe: a systems census in each Ctrl+Shift+D snapshot. A manual snapshot also writes
snapNNN_census.txt: per aircraft its flags, damage level, state and request words, the 16 input channels, each engine (running, throttle, afterburner stage), fuel total and flow, the selected station, gun mask, chaff and flare totals, the loaded stations of the loadout table, and every component with its systems by class (engines, fuel tanks, guns, weapon stations, dispensers, animations) and their counts. Reads go through ReadProcessMemory, so a stale pointer prints nothing instead of faulting. - Shared mission world: no join move. A client in a shared-world join flies its own seat in the host's mission, so the Phase 4 move onto the host's wing does not run (logged once).
- Shared mission world: a late joiner gets the world so far. Right after a client's Welcome (also after a reconnect) the host sends a snapshot on the reliable channel: a 15-byte head and the current state of every key that differs from the mission's start (destroyed, awake, asleep, damaged buildings, each flight's waypoint) as ordinary world events, 64 to a message (about 1.3 KB for 150 records). The client applies them as it applies live events and logs the host's game time against its own; the mission clock itself is not moved yet.
- Shared mission world: radar locks and configuration of the players' jets. In a shared world each player's jet sends a 16-byte state when it changes, reliably: its radar mode (off, search, track, lock), its lock target by mission key, and its gear, flaps, airbrake, hook, lights and wheel brakes. The host relays the clients' states to the others. On each side the state goes onto that player's avatar through the game's own radar interface, and a new lock warns the target's RWR as the game does once per lock. Afterburner, stores, fuel and ammunition were not sent yet.
- Shared mission world: waypoints follow the host, and the host can share a Load page mission. The host sends each flight's current waypoint when it changes (an 8-byte event, about once per leg), and the client sets it on its copy of that flight's formation, so as #2 the client's navigation follows the host's lead. This is one decision point in the code, so that #2 can later choose its own waypoint. A host with
LAZYSF2_WORLD_SAVE=1that Accepts on the Single Mission Load page now shares that mission (a stock, saved or hand-made .MSN, copied byte for byte into the probe folder, also from a cat) with the same seed and forced options as a generated one. Files that the .MSN only names (a mission script) are not sent. - Shared mission world: a changed host mission and freed seats. A joined client keeps asking the host for its mission every 5 s, in menus as in flight, on a short connection each time: an up-to-date client gets a 23-byte "same" answer, and a new host mission is fetched before the next Accept (if it has not arrived, that Accept flies the generated mission and says why). A seat is released when the last connection of its client closes (a session's Bye, timeout or disconnect, a refused Hello, or the end of a fetch), and a client that comes back with the same tag gets the same seat while it is still free.
- Shared mission world: the host gives the seats, and the world cannot silently diverge. The host assigns each client the first free member of its own flight in slot order, skipping its own (a host flying #2 puts the first client on #1, the next on #3), keyed by a tag the client sends with its mission request and its Hello. The seat travels in the mission offer, the Welcome and each PeerInfo, and both sides put each player's avatar in that seat. The Welcome also names the host's mission: a client flying another one leaves (Bye 8), and after each flight a joined client fetches the host's mission again. World events have their own queues on both sides: a host that cannot queue a client's events ends that client (Bye 7), and a client whose events ring fills ends the session, instead of losing an event. A waiting fetch no longer holds a host slot, a v2 host is reported once, and object damage levels are no longer sent (only placed buildings' damage). The Hello, Welcome and PeerInfo grew (60, 64, 55 bytes); older v3 builds and recordings with the old sizes do not match.
- Shared mission world: the world stream. A host that serves its mission sends its clients the moving mission objects (AI aircraft, vehicles, ships), keyed by mission slot and member: 35 bytes per object, quantised (centimetre positions, 0.05 m/s, 2^-16-turn angles), up to 28 in one datagram of 993 bytes, at 10 Hz within 20 km of a player, 2 Hz to 80 km and 1 Hz beyond (about 4 KB/s for a typical mission). Once a second it also sends what changed: destroyed, woke, went to sleep, damage level, and damage of placed buildings, reliably and only on change. A joined client (
LAZYSF2_WORLD_JOIN) now marks its world remote by itself and drives those copies from the stream; each player's avatar is the aircraft in that player's seat.lazysf2-bot --serve PORT --world world_NNN.manifest.txtflies a manifest's aircraft straight on at 150 m/s as a synthetic world stream, and--world-event destroyed,A,SLOT,MEMBER,SECONDSsends events. - Shared mission world: the host sends its mission (protocol v3). A host with
LAZYSF2_HOSTandLAZYSF2_WORLD_SAVE=1serves the mission it starts (the .MSN file and its sidecar, compressed, about 3 KB for a 24 KB file) to any client that asks, in menus as in flight. A client withLAZYSF2_CONNECTandLAZYSF2_WORLD_JOIN=1fetches it in menus over its own connection, writes it to the probe folder asworld_NNN.msn, and flies it at the next Accept on the New page with the host's seed and options, on the seat the host suggests (client 1 on #2) unlessLAZYSF2_WORLD_SEATsays otherwise. Chunks are 960 bytes on the reliable channel.lazysf2-bot --serve PORT --mission world_NNN.msnserves a saved mission, andlazysf2-bot --fetch ADDR:PORT --out DIRfetches one. The protocol is now v3: v2 builds and bots are refused. - Shared mission world: the client's frozen world. With the probe on,
LAZYSF2_WORLD_REMOTE=1marks every aircraft, ground-group member and live placed object of a single mission as remote (REMOTEOBJECT) right after the mission's objects are made, except the player's own jet, so their AI stops and they coast or hold. From then on, local damage to remote objects (gun hits, missiles, bombs, blasts) is dropped, so on a client only the host will decide hits. The log gives the counts per kind, the first blocked hit and every tenfold count, and a total at the next mission. Buildings that are only scenery are not covered yet. - Shared mission world: fly as #2. With the probe on,
LAZYSF2_WORLD_SEAT=1puts the player on member 1 of the player flight (callsign x-2) in every single mission, by setting the seat just before the mission's objects are made; 2 and 3 give x-3 and x-4. A flight with too few members keeps the stock seat, and the log says why. After the start the log checks that the player object is that member. It combines withLAZYSF2_WORLD_LOAD. - Shared mission world, first step: save, load and compare a single mission. With the probe on,
LAZYSF2_WORLD_SAVE=1saves each mission accepted on the Single Mission New page to the probe folder asworld_NNN.msn(the game's own mission file) withworld_NNN.sidecar.txt(the random seed, theatre, date, time, weather, and the Ground Object Density and Mission Start read at the start), then reloads it so the flight runs from the file.LAZYSF2_WORLD_LOAD=<path to world_NNN.msn>flies that file instead of the generated mission, with the sidecar's seed, density and start forced.LAZYSF2_WORLD_SEED=nfixes the seed for a save. Both writeworld_NNN.manifest.txtonce the mission's objects exist: one line per aircraft and ground-group member (keyed by mission slot and member), per empty slot, and per placed record of each populated target area (keyed by area and record index), with type, side, position and heading, plus counts and the random-number state, so two launches can be diffed. Nothing is written to the game folder. - Phase 4: two players. Client mode, host relay, protocol v2, predicted remote jets, a shared clock with drift, the bot's formation, lag and serve modes, client recordings and the comparison report, and background simulation in sessions. The entries below give the details; the setup steps are in
lazy-sf2-recon(network-recon.md, section 8). - Network protocol v2. The host/client wire protocol changed (theatre check, join velocity, peer messages). A host refuses a peer of another protocol version and logs it once.
- Client: the join move matches the host's velocity. The move onto the host's wing now also sets the client's speed, climb rate and pitch to the host's (and zeroes the turn rates), so the two jets no longer drift apart. A move deferred until airborne uses the host's latest State, not the old Welcome.
- Host: sends its own jet, relays, and puts clients on its wing. In a session the host sends its own jet to every client at 20 Hz of game time (id 0) and relays each client's States to the other clients. The Welcome gives each client a join position on the host's wing (150 m right per client, 50 m back, at the host's altitude, heading and speed), the host's game time and theatre; the client's avatar holds there until its first State. Each client then hears who else is in the session (the host's callsign from
LAZYSF2_CALLSIGN, default HOST, and aircraft type), and when someone leaves. A client in another theatre is refused (Bye 5), and the log names both theatre hashes. The host's Byes now carry id 0, the sender, as every Bye does. After a host hitch only the newest State of each client is relayed, and States can no longer crowd Welcomes, PeerInfos, PeerLefts or Byes out of the host's send queue. The client core passes States only from peers the host has announced and not yet reported gone. - Host: the avatar is the host player's wingman, and predicted to the present. A client's avatar is now taken from the host player's own flight (#2 first, same type, friendly), falling back to any friendly and then the nearest aircraft; the join line says which and why, and warns when the client flies another type. The avatar is drawn where the client's jet is now, not an interpolation delay behind, with capped corrections; after 3 s without States it coasts straight on (rates zeroed) instead of hovering, and after 10 s it goes back to the AI until the client's States resume, while the session stays up. The per-second line adds sample age, prediction horizon, snaps, coast steps and peak acceleration, and the host logs once per flight whether the avatars step after the player.
- Bot: a second player.
lazysf2-botnow receives the host's jet, the other clients' relayed States and the peer messages (PeerInfo, PeerLeft, the host's Bye), checks them as the client core does, and logs them.--script formationflies on the host's predicted jet at--offset R,B,U(default: the bot's slot, 150 m right per client id and 50 m back) and reports how far its States were from that point, judged by the host's own later States.--lag MSholds every packet the bot sends and receives for MS, so--lag 150gives a 300 ms round trip.--log-remotelogs one line per second per remote jet (rate, age, horizon, corrections). Ctrl+C now ends a run with a Bye. - Bot:
--serve, a synthetic host.lazysf2-bot --serve PORTruns the mod's own host core and flies a scripted jet (--script, default orbit), so the game can be tested as a client on one machine. It welcomes one client onto the jet's wing, sends the jet as id 0 at 20 Hz with its PeerInfo, and logs the client's jet once a second with the same fields as the mod host.--start X,Y,Z,HEADINGsets where the jet starts; without it the jet starts 2 km ahead of the client's first State and a second Welcome brings the client to its wing (the first Welcome carries no join position); the bot re-sends it about once a second until the client's States show it there, for at most 10 s.--pause-at S --pause-for Sfreezes its clock to test holds,--lag MSdelays what it handles and the jet's States, and--record DIRwritesbotserve_NNN.lzst(its jet, the client's States, and the new RemoteShown records). - Client network core. A network thread for the client side (connect, Hello, Welcome, clock sync on Pings, checked and queued host messages, Bye).
- The game as a client. With the probe on,
LAZYSF2_CONNECT=host:port(a numeric address or a name) makes the game join that host as soon as a flight starts (the player is known), with the callsign fromLAZYSF2_CALLSIGN(default PLAYER), the player's aircraft type and the theatre. On the Welcome it moves the player's jet onto the host's wing (position and heading; pitch, roll and speed kept), once per session, only when it is more than 50 m away and only while airborne (above 500 m, faster than 50 m/s; on the ground the move waits, logged once);LAZYSF2_NET_JOIN=noneturns the move off. A Welcome without a join position (the bot's--servewithout--start) does not move it; the one that follows does. It sends the player's jet at 20 Hz of the host's time, holds it while the host's clock is frozen or silent, and shows the host and every other client the host announces on an AI aircraft of the player's own flight, predicted to the present; a remote that goes quiet coasts after 3 s and goes back to the AI after 10 s. It records the session toLAZYSF2_PROBE_DIR\client_NNN.lzst(what it received, its own States as kind 7, and what it showed as kind 9). It logs once a second per remote (the host's fields), and the clock only when it syncs, holds or resets. It leaves with Bye 3 when the player changes, and tries again every 5 s after a failure. The log names the address of the first attempt, why it waits (player not known, blocked), and, while retrying, one line every 30 s.LAZYSF2_HOSTandLAZYSF2_CONNECTtogether turn both off. - Recordings on both sides, and the comparison report. Every session file (
stream_NNN,client_NNN,botserve_NNN.lzst) now starts with a SessionInfo record (role, own id, callsign, aircraft) and names the theatre in its header (the host's and the client's). The host also records what it showed of each client (RemoteShown, 10 Hz and every snap) and when an avatar is parked or taken again; the client records the PeerInfos and PeerLefts it gets and the same avatar events; the bot's--serverecords its jet's States as sent.lazysf2-acmiconverts all three kinds of file, and--ghostsadds each shown track as its own green object ("BOT1 as seen by HOST") next to the real one.lazysf2-acmi --report VIEWER.lzst TRUTH.lzst [--id N] [--offset R,B,U]aligns the two files on host time and prints, per 10 s and overall, the median, p95 and max error of the shown jet (along track, across, vertical), the angle error, snaps, coasting time and the shown path's peak acceleration;--offsettakes the host's jet plus a formation offset as the truth, for the bot's formation runs. Seedocs/stream-format.md. - The other player flies in your flight. On both sides a remote player's avatar is the local player's first free wingman, in slot order (#2, then #3, ...), whatever its type or distance. Only when the flight has no free plane does the picker fall back to another friendly aircraft, one within 20 km of where the avatar is placed first, and it logs that as a fallback with the distance moved. Enemy (or unknown-side) aircraft are never taken: with no friendly free there is no avatar.
- Refusals are logged once. A host that refuses before the Welcome (busy, or no free friendly aircraft) is retried quietly every 5 s, and the client names the reason once until a Welcome or a new player. The host logs a client it keeps refusing at most once a minute, with a count.
- Host: a Bye sent just before a disconnect now arrives. The host's refusals and goodbyes (for example Bye 5, wrong theatre) were discarded by the disconnect that followed them.
- The game keeps flying in the background during a session. While a network session runs (the host has a client, or the client is welcomed) and Display Mode is Borderless, Alt-Tab no longer pauses the game: the flight keeps simulating and drawing, and only the keyboard, mouse and joystick are let go until you come back. This works whatever
[OtherOptions] BackgroundModesays, and minimised the frames are paced as with BackgroundMode 1.LAZYSF2_BG_SIM=0turns this off (BackgroundMode still applies). Fullscreen keeps the stock pause (it logs "Borderless only" once). If the session ends while the game is in the background and BackgroundMode is 0, the stock pause applies at once. Sound follows BackgroundMode: it goes silent in the background unless BackgroundMode is 2. - Network: one message per jet per tick. A player's jet now travels as one 54-byte message (position to 4 mm, velocity, attitude, rates, control inputs and the pilot's look) from the sim step, instead of a 78-byte State plus a separate 22-byte animation message on its own timer. The host's old State relay is gone: every jet travels in this message.
Checking a download
Each file was built by GitHub Actions from the tag v1.2.0-alpha.11. To confirm that:
gh attestation verify <file> --repo LazyWorksZA/lazy-sf2-patch
SHA-256:
4828fce8fe71df5ce6b8ae123b71c9ef70d91a69bd2c282b42a17f736e8e219a Lazy-SF2-Patch-1.2.0-alpha.11-Setup.exe
10458ac14de82a62cbb66587bf6fd090c84aaee4b51df7c0a40e85b249647309 Lazy-SF2-Patch-1.2.0-alpha.11-Tacview-AddOn.zip
a8cb515956f724e6b92ed680c423f5d37cd6fd7002cf4bad0c7258e601ff96ab Lazy-SF2-Patch-1.2.0-alpha.11.msi
b75b4c68781909817d88fc0319d2597f79f4533a4e4ecac914d144e9d2b35974 winmm.dll