Weights and Measures
This week was about the flight model and the server. The ship now comes to a clean stop, every ship carries its own stats, and we ran the first test with hundreds of ships on one server.
That test was promising, and it also uncovered hidden work, so the schedule has been extended. Alongside it, the radar scopes stopped smearing, the race course became easier to find, and the pilot's own hull got its shadow back. The server now builds for Linux, and an independent review of the code began. On paper, we planned how NPC (non-player character) ships will be flown, framed the first weapons, and researched how a ship breaks apart. The Lore Book was split out of the game design document. The concept art turned to targets for a shooting range, a cleaner freighter, and a wrecked dropship. The torpedo, the bomb, and the Torpedo Sled joined the Gallery.

Place Holder: hundreds of ships in the load test.
Coming to a dead stop
Last week ended with a problem. When a ship came to rest from a slow turn, it "popped". This week started with fixing it.
The pop came from two places. A pilot's own machine moves their ship at once, rather than waiting to hear from the server. This is so that flight feels good to the pilot. No one wants to wait for the server. So every ship has two copies: the pilot's and the server's. The first cause of the pop was the engine freezing a ship as it came to rest. The second cause was the two copies "drifting apart", and not having exactly the same location on the pilot's machine and on the server. The first solution was to lower the "sleep" or "freeze" value, where the engine stops all movement, marks the object as "sleeping", and ignores it. Doing this revealed the second issue. Our drag fades as the ship slows, but it never quite reaches zero. With the sleep values lowered, the drift continued longer than before, and both copies kept coasting, very slightly, and very slightly differently between the pilot and the server. When the engine put each one to sleep, they fell asleep at different moments and in different positions. When the server noticed the difference, it corrected the pilot's ship, and that correction showed as a pop.
The fix was to add just a tiny amount of friction alongside the drag. Drag still slows the ship through a coast, so a pilot still has to work to stop. There is still drift, and I like that drift. Friction only really matters right at the end. Unlike drag, it does not fade, so it takes away the last of the motion and the ship stops at exactly zero. When the ship appears to stop, I want it to stop naturally, and the same way every time. I also want the entire flight system to be an equation, and a simple one at that. With this solution, we have no artificial checks in the system. (Have you ever been on a roller coaster, and they have brakes partway along, and then a motor to speed you up? Nah! Not having it. Roller coasters need to be designed so it's just one push, and the rest happens naturally… just like our flight model.)
Then we measured it, with network delay added. With friction in, both copies of the ship stopped at exactly the same moment, every time. All the way to the stop, they stayed far closer together than the eye could ever see. The race flights from the week before, flown without friction, had shown them drifting apart. Once the fix held, we made the friction ten times lighter, so the ship coasts and spins down more naturally, and still stops dead.
The Brake and Maneuvering
With the ship able to drift to a stop properly, the next job was to give the pilot control over how it stops. Last week I described stationkeeping as its own action, separate from a fitted brake. This week we folded stationkeeping into the Brake. The Brake is one item that scales, from stationkeeping at one end to the Flywheel at the other. The Brake is held down, on the spacebar by default, and it slows the ship in whatever direction it is travelling. Every ship starts with the basic brake, which is stationkeeping and nothing more. It is very light: just strong enough to cut any residual drift when stopping or manoeuvring, and this is how the pilot parks. Upgrades make the brake stronger, until it becomes a combat module that can affect a ship at combat speed, and be used to brake into a turn. The Flywheel is a proposed upgrade at the top of the scale: not only a much stronger brake, but one that recovers some of the energy as well.
Reverse Gear, which I also mentioned last week, has been replaced by Maneuvering. Flying a ship at combat speed is one thing. Nudging it into a docking bay, or up to a cargo pod, is another. Maneuvering is a mode or "context" the pilot switches into with one key. "Contexts", in this case, are ways of repurposing key bindings. For example, when flying with the keyboard and mouse, the mouse acts as the joystick in the "Flight" context. In the "Menu" context, it acts as a standard cursor. Maneuvering repurposes the keys for this specific slow-speed mode. Maneuvering is the only place we give in to the need for "6DoF", or six degrees of freedom. The keys allow a very gentle push in any of six directions: up, down, left, right, forward, and back. I only want Maneuvering to be useful at or near a full stop, primarily to save players from embarrassing situations like "I'm stuck in this crater and I can't get out!" Other than docking, I can see a few places to use it in play: creeping through a cave or a tight asteroid cluster, picking up cargo, or any situation where the main engines are too strong to control.
With all this fiddly manoeuvring and stopping and flying, we also spent time in the control UI (user interface). Every control on every device now also has its own dead zone, and its own response curve in every profile. Dead zones control how far you need to move the control before it responds, and the response curve is how sharply the control responds. If a pilot wants more control over the low end, they can soften the curve, for example. This means the player can tune the controls, and how they respond, to their choice.
Two ideas joined the design notes this week. One is that Maneuvering will probably need its own short mission to explain it. The other is Flight School: a set of optional instanced missions that bluntly teach a player how to fly in our game. I'm always frustrated by flight games that let you fly around to get the feel of things, but don't actually TELL YOU what you're supposed to be doing. Every flight game is slightly different. With our flight model equation, I want the players to have the option of actually seeing how our flight works. A cut scene covers the basics of flight, how speed affects a turn, docking, and retrieving, all inside the game world itself. Diegetic to the max! Both ideas are still in development, but I'm convinced they'll be in the game.
What a ship weighs
The other big job for the week was giving every ship its stats. A ship's weight, or really its mass, matters to how it flies: a heavier ship is slower, and takes longer to start and stop a turn. Until now, that weight was simply set on the ship. Now every ship, player or NPC, works out its stats from which chassis it is and what it carries. This works through the engine's ability system, the part of the engine that will run each ship's stats, weapons, and abilities. The ability system is not only enabled, but integrated into the ships, and it affects the flight live.
We already had the Bench, a tool that works out a ship's stats from its parts without running the game. This is the basis of an offline app a player could use to experiment with fittings. We created an automated test to check that a ship in flight and the Bench agree exactly. It passed. The numbers a player sees when fitting a ship will be the numbers the ship actually flies with.
To prove that weight changes according to the model in flight, we built a stand-in bomb that does nothing but weigh something. The fighter carried four in a bomb bay. A key dropped one in flight. Bombs away! The ship became lighter mid-flight, and on every machine at the same moment. With four bombs aboard, the fighter's top speed was clearly lower, and as they dropped, it rose. It is a small test, but it is built as the start of a proper system. The same path will later carry real weapons, dropped cargo, and jettisoned tanks.
Damage now works the same way. A collision lowers the ship's hull strength, and the game records what caused it. If a pilot flies into a rock, the pilot is recorded as the cause. The weapons will use the same path. The combat record will show what did the damage, and who did it. For example, "railgun round, Federation fighter", or "asteroid, self". This will feed into not only hull integrity, but also event participation, target scoring, and more.
The physics flight test: off-centre hits, an object, free flight, friction, resting to flight, collisions and reactions, and a dogfight.
Three hundred ships
The biggest test of the week answered a question: how many ships can one server carry? Last week we had a rough estimate. This week we put hundreds of ships on one server, and measured where its time actually went, part by part.
For the test to mean anything, the ships had to behave like a fight. Every ship, NPC and player alike, flew its own random pattern. It flew straight for a while, changed direction, changed speed, and now and then used the Brake, dropped a bomb, or spent time in Maneuvering. Every machine worked out the same patterns from the same starting number, so nothing extra had to be sent over the network. The ships wore random looks from our stand-in massing models.
Place Holder: the load test in flight.
We flew tests with 100, 200, 300, and 400 ships, with up to 100 simulated players connected. Three hundred ships was an assumed target, not a finish line. We needed this test to give us a gauge. Was this even feasible? Scary, as we had to get to this point to even begin testing.
The good news was that the physics itself was cheap, and it got cheaper per ship as more ships were added. Most of the server's time went on work around the physics. Much of that turned out to be things we didn't need: settings, inefficient construction in our ship definitions, some revealed unknowns, and some poor design choices made in ignorance. These are all now on the fix-it list.
The other half of the question was how much data each player needed to receive. Sending every ship, in full, to every player, all the time, needed several times what a player's connection is allowed. We expected that. The design already plans relevance or distance rings, where nearer ships are sent more often and in more detail. The test told us how much bandwidth those rings needed to save.
How far each ring reaches comes down to how a pilot feels. We named four bands for other ships:
- background ships, seen as pixels;
- distant ships, seen as shapes;
- midground ships, with detail visible, but not part of the fight;
- the foreground ships being fought.
Ships dogfighting in the distance only need to fly reasonably close to their correct path. If their gunfire looks convincing, the flight is believable, and the player feels like they are in a movie, it passes. If a close ship behaves wrongly, or its gunfire doesn't look aimed at its target, that fails. The proposal is to show the ships in the fight exactly, and the rest in a lighter way, updated less often, moved in a convincing manner, similar to the real ship.
Foundation and Schedule
Alongside the big test, we began an independent review of all the code written so far. The job of the review was to make sure the code follows the project's goals, is efficient, and follows professional C++ and game design practices. The first pass mapped everything that exists, and found much of it sound. The ships are built from data, as designed, the flight model is self-contained and ready to be reused, and most systems have their own tests. The review also found structural work to do before the weapons are built on top.
The next step is to better separate ships, players, and NPC pilots in the code. We always planned that there would be one "ship" that could be fitted out and flown by either a player or an NPC pilot. The review found that, partly due to all of our testing, these were not as discrete as they should be, and were becoming muddled in a hazy attempt to keep testing.
Further, we need to build our server infrastructure more completely. Zones need to start up properly, rather than just be test tools. Tests need to be started in the same manner a game would be, and players and NPCs need to be logged in and instantiated properly, even if they are simply performing a test.
This means we need to reorganise our schedule. Moreover, to prevent code congealing badly from inattention while we try to keep to our deadline, I've chosen to relax those deadlines and add seven more weeks to the schedule. If we can do better than predicted, we will claw back as much time as possible, but for now, I feel we need to give space for more design and code reviews, and then the time to fix what the reviews reveal.
The server also took a step towards a real home. It now builds for Linux, the platform it will run on in a data centre. It has been packaged, ready for its first start on a rented machine. This may come sooner rather than later, as we may need to know exactly how this game plays for real.
Seeing clearly
Some of the week went on what a pilot sees. Last week the radar scopes smeared whenever the ship turned. It turned out the engine doesn't give see-through surfaces their own motion, so the scopes were picking up the blur of the sky moving behind them. The scopes are now solid displays, as they always were in the design, and they stay sharp while the sky blurs. We do need to look into how we will handle "HUD (head-up display) overlays", as these will essentially be transparent objects over the sky… but that will wait for later.
The race course is now much easier to find. The sphere where a race starts now shows on the radar (oops—how'd we miss that one!?), and it has a glowing outline, so it stands out against the sky. Each ring now has a circle of small glowing dots, lit in a colour that tells the pilot which ring is next. The dots are a stand-in until the rings are dressed properly. Every ring now responds to the race in the same way, so a new design of gate only needs its model built, not new code.

The race rings lit up, seen from the cockpit.
The pilot's own ship had also lost its shadow. From the chase camera, the ship cast a shadow, but from the cockpit it did not. I was sure hidden objects could cast shadows, and that we must not have set it up correctly. In fact, the fault was in the engine. It stops a hidden model from casting shadows, even when the model has been told to keep its shadow. We proved it, and wrote it up for the engine's makers with a suggested fix. Our first official #BugReport! Our own fix changes how the hull is drawn on the pilot's own machine only, and everyone else sees the ship exactly as before. The cockpit now sits in the shade of its own hull when the sun is behind the ship, as the design intends.
On paper
Before building anything to fly NPC ships, we set out the whole system on paper. It runs from a test ship on a course to a veteran wingmate on either side. NPC ships carry the same mass, power, and ability systems as players' ships, and the only difference is who is at the controls. The steering we already have turned out to be sound. It flies a ship with the same four controls a player uses: pitch, yaw, roll, and throttle.
The proposal builds on that in layers. At the bottom is the ship. Above it are the hands, which turn "point there, hold this speed" into those four controls. Above the hands are the moves, such as an attack run, breaking away, or holding station on a leader. At the top is the decision about which move comes next. That runs from a simple script for a test ship up to a wing's tactics, with pressure and morale. Last week's wingman research fits these layers. The pair is the unit, the best-placed ship leads rather than the highest rank, and a rookie and a veteran are the same pilot with different numbers. All of this is still a proposal.
The weapons were framed too, with a first proposal: two guns, one kinetic and one energy, both aimed by eye. The kinetic gun is a railgun, firing fast rounds from a magazine. The energy gun fires slower, visible bolts from a charge that refills. It's the same theory we've always had, but now scoped in more detail.
We're designing a target range to fly in, probably bounded by asteroids to give a reasonable margin and contained area for the player. We have designed target buoys to practise aiming on, and a target drone that can fly, would fire back, and would break up on camera when its hull reaches zero. I expect to be building this level map this week.
That raised the question of how a ship breaks apart. We call the sequence a ship goes through when its hull reaches zero the deathcycle: destruction, the pilot's escape, and the wreck. We found that the engine can cut a copy of a ship into pieces ahead of time, from large sections down to rubble. That copy looks exactly like the whole ship until the first piece breaks off. So the switch from ship to wreck, hidden in the fireball, can't be seen. The wreck exists only on the players' machines. The server sends only "destroyed" and a starting number, and every player sees the same break. The first ship to try it will be a target drone.
The target buoys need strobe lights, so that was the first subject for art direction research this week. A strobe has to flash, light up the buoy around it, and be seen from a distance. The flash is a bright effect that never runs on the server, and a small real light washes over the buoy near each tip. Each buoy's strobe came out at a tiny fraction of the time the game has to draw each picture. There is no need to share one system between all the buoys yet. I used to do the same thing in another game engine for "blinkies" on spaceships, the equivalent of navigation lights on an aeroplane. This same effect will carry a ship's navigation lights later.
We split the Lore Book out of the game design document, so that we have better control and organisation of the story, the characters, and the history. We are now getting to the point where these need more detail.
We also looked at what it takes to sell the game on a digital store, and at why the website doesn't yet show up in searches. The site needs to be searchable, so the plan is to give the search engines a list of its pages, and register it with them. "SEO" (search engine optimisation) (>_<)! Still, we do want to be found by people looking for us.
Concept art and models
The concept art this week was mostly about targets. We needed a target that was just static: literally something to target on radar and shoot. This is unlike the strike drone, which flies and will eventually shoot back. It had to fit the first zone's style, and belong in the game world. Of the shapes we tried, a double pyramid, two four-sided pyramids joined at the base, was the one. Its two caps became glass, with strobe lights inside, which is where the strobe research above began. We also had some good designs made from decommissioned navigation beacons.

The double-pyramid target buoy, with its glass strobe caps.
The last target we made was the hulk of a Federation Dropship. I had designed a ship a while ago that didn't really fit into this game. I have this thing about wings. Why do spaceships have wings? Meh. I guess we like them because they remind us of aeroplanes. This design has wings, and the ship is a bit of a wedge, so I felt that this must be a "dropship" that would use the shape to bleed off speed when entering the atmosphere… not really needed in the Rift. Then I thought of what really happens to old ships… they get dragged out, anchored, and used as targets. Now the folks in the Rift must have captured some of them thar dropships, and now use them as shootin' targets.

A Federation Dropship hulk, used for target practice.
I was working on a freighter, as I feel we need more of them, and it evolved into something else. Currently it's either a tractor to pull a long line of containers, or it's a tug to help manoeuvre larger ships near a station. Who knows, it could be both!

The tractor or tug.

Pulling a line of containers (left), and working as a tug (right).
The Tractor… or is it a Tug? A… Trugtor!?
The game also has a new group for the human-made things found in a zone, called Artifacts. It holds the navigation beacons, the race rings, and the first torpedo and bomb; again, more stand-in massing models. I just don't have time to spend in Blender right now to finish these. The Torpedo Sled arrived as a new ship to carry the torpedo and bomb. The Gallery now has the Torpedo Sled with the ships, and the torpedo and the bomb under Artifacts.
One nice upgrade to the Gallery and DevLog pages: images on the site now open full size when clicked.
Week five, met. The ship stops cleanly on every machine, the pilot has a Brake and a way to manoeuvre at a standstill, and every ship carries its own stats. The first test with hundreds of ships showed us that the physics is cheap, and showed us the work still to do.
Next: the foundation work, separating ships, players, and NPC pilots, a proper zone start, and a clean release build. Then the weapon design session, and my own flights of the load test's scenes.