The mouse
While the game's rendering engine drives most of the feel of Noctis, a second contributor is the handling of character movement. I'll include the REPL here at the top so you can see what I mean. What follows is a bit more assembly trawling that I will try to keep brief.
What's going on here? Well, another title not to leave home without, 1986's Microsoft Mouse Programmer's Reference Guide, reminds us that the DOS mouse API is really three things: button clicks, an absolute cursor position, and motion counters. I am embarrassed to admit I was not aware that the fundamental unit of the mouse is called a mickey, which is about 1/200th of an inch. Here, some more assembly is prepared to pull the mickeys directly from the resident mouse driver, which has been listening to the hardware's interrupts and summing deltas into a running counter. The counter accumulates over time and resets when asked, so generally speaking each poll receives exactly one frame's worth of motion.
mov ax, 0xb // motion counters: mickeys since last call
int 0x33 // (the driver zeroes them on read)
mov mdltx, cx // this frame's delta x
mov mdlty, dx // this frame's delta y
Each impulse lands in a velocity buffer, and the buffers decay geometrically each frame before snapping to zero when they dip below a threshold.
user_beta += dlt_beta; // turning integrates its velocity...
dlt_beta /= 1.5; // ...which decays every frame,
if (fabs(dlt_beta)<0.25) dlt_beta = 0; // then snaps to rest
shift /= 1.5; if (fabs(shift)<0.5) shift = 0; // sideways dies fast
step /= 1.25; if (fabs(step)<0.5) step = 0; // forward coasts longer
There is nothing revolutionary in these snippets--versions of this type of thing live in many programs. Nevertheless, I have always found the effect quite elegant. It was also a relief to find something familiar under the hood for one of only a few occasions in this project.