News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu

Working native port of Stunts with 8 multiplayer over Internet

Started by x29retaliator, August 29, 2026, 07:00:51 PM

Previous topic - Next topic

x29retaliator

Just some testing. In the attached picture we can see that 8 cars are present on the track in a live game.

It is quite painful to do this kind of testing, but it does work.

The car in the top-left drove down the road a bit, turned, and headed back towards the finish line going the wrong way. Just like the original game it then assumes you "finished" and gives you a huge penalty. So the blue car already finished.

Anyway, thought this screenshot might be a bit cool.

I didn't forget about the collision detection, I thought I'd explain how it works but uncovered some problems with it, so I'll deal with that first.

HerrNove

Quote from: x29retaliator on Yesterday at 06:26:34 PMIt is quite painful to do this kind of testing, but it does work.

Reminds me of a time where I had to start six instances of an unstable version of VMWare. It took some attempts before I managed to keep all the VMs alive for the few minutes I needed for my experiment.

Quote from: x29retaliator on Yesterday at 06:26:34 PMAnyway, thought this screenshot might be a bit cool.

It's very cool to me! Congratulations, I think for many veterans this is a dream coming true!

---

(some minor glitches in the speedometer of Jaguar and Corvette: maybe a bug when processing the .PVS files? Sorry for raising an issue now, but I cannot keep myself :) )


Foxpup

Quote from: x29retaliator on Yesterday at 06:26:34 PMThe car in the top-left drove down the road a bit, turned, and headed back towards the finish line going the wrong way. Just like the original game it then assumes you "finished" and gives you a huge penalty.
It really shouldn't though, if all you did was drive the wrong way. I guess you changed the way the start/finish line functions in order to account for cars starting on the previous tile, because in the original game, the start/finish line must be approached from the correct direction to count as completing the race.

Also, it looks like you're unnecessarily truncating the cars' full names to 4 characters depsite cars already having a 4-character short name (the gsna resource in the car*.res file) for exactly this purpose. It is used in the original game to identify the opponent's car on the scoreboard, when a high score is recorded while racing against an AI opponent. (This short name is not to be confused with 4-character filename code used to identify cars, which is often the same but may be different. For example, the Porsche March Indy has a short name of "INDY" and a filename code of "PMIN".)

Quote from: HerrNove on Yesterday at 08:36:48 PM(some minor glitches in the speedometer of Jaguar and Corvette: maybe a bug when processing the .PVS files? Sorry for raising an issue now, but I cannot keep myself :) )
Yeah, I've seen that issue too when converting car files, though I never bothered to investigate the cause.

llm

QuoteBasically, certain small reductions in speed (such as driving up an inclined plane, or driving in a loop), the game intends to reduce the speed. This is represented as a small, negative products. This negative change is multiplied and shifted, by Borland's unsigned 32-bit division routine (?). The problem is that the quotient is enormous but the game only rtains the low 16 bits and does an arithmetic shift. This results in a significant *positive* speed change.

Stunts itself was originally written using Microsoft C 5.1 (~1988) and assembler
restunts switched to the Borland compiler

HerrNove

Quote from: Foxpup on Today at 03:44:28 AM
Quote from: HerrNove on Yesterday at 08:36:48 PM(some minor glitches in the speedometer of Jaguar and Corvette: maybe a bug when processing the .PVS files? Sorry for raising an issue now, but I cannot keep myself :) )
Yeah, I've seen that issue too when converting car files, though I never bothered to investigate the cause.

I think the error is in the treatment of the `ins2` bitmap of the `STDA` file. For Jaguar and Vette, the bitmap is stored in a special format, as shown by the fact that the high nibble of the third byte of the "Channel bitmasks" has some bits set. Probably the bytes are transposed (i.e. the pixels are stored in column-major order).

The screenshot is taken with my fork of stressed, but the regular stressed is also able to process the data just fine. One just need to integrate its handling of special cases: see bitmapresource.cpp#L183 and following lines.


Screenshot_20260904_090649.png

x29retaliator

Quote from: Foxpup on Today at 03:44:28 AM
Quote from: x29retaliator on Yesterday at 06:26:34 PMThe car in the top-left drove down the road a bit, turned, and headed back towards the finish line going the wrong way. Just like the original game it then assumes you "finished" and gives you a huge penalty.
It really shouldn't though, if all you did was drive the wrong way. I guess you changed the way the start/finish line functions in order to account for cars starting on the previous tile, because in the original game, the start/finish line must be approached from the correct direction to count as completing the race.

Also, it looks like you're unnecessarily truncating the cars' full names to 4 characters depsite cars already having a 4-character short name (the gsna resource in the car*.res file) for exactly this purpose. It is used in the original game to identify the opponent's car on the scoreboard, when a high score is recorded while racing against an AI opponent. (This short name is not to be confused with 4-character filename code used to identify cars, which is often the same but may be different. For example, the Porsche March Indy has a short name of "INDY" and a filename code of "PMIN".)

Quote from: HerrNove on Yesterday at 08:36:48 PM(some minor glitches in the speedometer of Jaguar and Corvette: maybe a bug when processing the .PVS files? Sorry for raising an issue now, but I cannot keep myself :) )
Yeah, I've seen that issue too when converting car files, though I never bothered to investigate the cause.

Thanks for the help!

Are you sure it doesn't work like that? I tested this against the original DOS version (although with SuperSight) with DOSBox, and I got the same behavior.

Maybe I did something weird though. I should test again.