Stunt Racer 2000 50fps

Discuss the project, or ask a general question
Post Reply
wmd
Posts: 120
Joined: Thu Feb 04, 2021 1:02 am

Stunt Racer 2000 50fps

Post by wmd »

I've just seen the video on youtube that shows this game running at 50fps. Was that patch only for the Pi / RISC PC or can ARM3 machines benefit from that?
User avatar
IanJeffray
Posts: 162
Joined: Mon Jan 18, 2021 1:51 pm

Re: Stunt Racer 2000 50fps

Post by IanJeffray »

Did you try just typing in the mods to the !Run file shown in that video?
JonAbbott
Posts: 2957
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Stunt Racer 2000 50fps

Post by JonAbbott »

wmd wrote: Wed Nov 15, 2023 12:20 am I've just seen the video on youtube that shows this game running at 50fps. Was that patch only for the Pi / RISC PC or can ARM3 machines benefit from that?
ARM3 isn't powerful enough, the original run at around 12.5fps on ARM2. You'd be lucky to even hit 25fps on ARM3 as its not fundamentally that much quicker.

The videos were recorded on a Pi1 although I don't think I ever finished coding it - it was just something I was tinkering with as we'd just imaged the development machine and I was going through it trying to figure out what the source-code belonged too. From memory, I don't think I ever got the cars to exactly replicate how they act when the game is at its original 12.5fps.

Zarch 50fps has a similar issue, where the ship movement can't be adjusted to exactly match the original.

The problem virtually all Arc games have is the game loop is tied to the video update loop, not time, so as you adjust the FPS the game speeds up. To work around that there's two options:
  1. Adjust all the movement and decision making to account for the time to the last frame
  2. Thread the update code, so the game objects are updated independently from the video output
The first option isn't always obvious as values is generally hardcoded and even if you do manage the variablise all of it, quite often you end up working with fractional values...as in the case with Zarch 50fps.

The second option, assuming the original game did implement frame pacing (neither Zarch or Stunt Racer do), does result in the correct game speed, but will look odd as the game objects will be static for several frames unless the object update rate matches or exceeds VSync. I think I did start work on threading one or both of them at some point, with a 100Hz thread updating the game objects and the video update running at VSync.

One thing which several people also pointed out at the London show I demoed Zarch 50fps at, was how unplayable it became. The reason for that is that as the game update rate increases, your reaction time has to improve accordingly!
wmd
Posts: 120
Joined: Thu Feb 04, 2021 1:02 am

Re: Stunt Racer 2000 50fps

Post by wmd »

IanJeffray wrote: Wed Nov 15, 2023 1:44 am Did you try just typing in the mods to the !Run file shown in that video?
No, I didn't want to input a load of hex before checking if it worked!
Post Reply