Jump to content
IGNORED

Road Rash pre-alpha on Jaguar at 30 fps


VladR

Recommended Posts

I ended up moving everything over to the GPU because I ran into hardware bugs in the DSP (something about external writes failing under certain conditions) that made the program not work on real hardware.

If your hope is to not experience bugs coding GPU, you might have more luck playing lottery :)

 

 

Are you saying you're doing all that in one GPU program?

- Yes, the 3D Engine runs off GPU in a single chunk.

- While I got the code swapping to work few months ago, I'm not a huge fan of how much performance gets destroyed (just bloody wiped out) even if you have just one another chunk to run.

- Swapping code is OK if you don't mind falling down to 15 fps very near down the road, but I'd rather not take the easy way out.

- Also, there's no way I could run just the track at 60 fps (internal average framerate fell down from 80.00 to 73.17 after I fixed the front-plane gap last weekend) if I was lazily swapping the code (even just one swap).

- Once you start swapping, there's no incentive to optimize. It's much easier to keep the first (horribly inefficient) version of code and just swap it out once done

 

So, I prefer to get creative in refactoring :)

 

The following runs on 68000 in parallel with GPU:

- The OP List refresh

- Input

- AI finite state machine,

- LevelOfDetail computations,

- various distances calculations,

- interpolating camera position to follow the track

- there's quite a few slow divisions there

 

Contrary to popular misconception that has been constantly spread over last few decades, none of the code above is slowing GPU down. There's no measurable difference whether I run a 2-line endless loop on 68000 or all the code above. I have about a dozen compile flags that turn whole sections on and off. And I run about 20-30 benchmarks each week (takes 10 seconds to adjust flags and redeploy). Of course, It's been carefully designed from the get go to allow for complete parallel execution (no chokepoints between GPU and 68k).

 

Of course, if you turned 68000 off, you would get some little boost in GPU performance, as 68k would not be hitting the bus. But people conveniently never mention that then you have to start swapping the code, which will cause much greater performance impact than 68000 hitting the bus.

 

If I had to shut off 68000 and code all the above stuff on GPU, I would need at least 2 more chunks (but most probably three, as GPU often needs 5x-10x more instructions to achieve same thing, as it's a RISC), which means 3-4 swaps per frame. I could forget 60 fps for Time Trial. Forget 30 fps for regular gameplay.

 

But hey, I could then claim (best if read with Eddie Izzard's voice&performance) "Hey, Player! No 68000 has been used on this game. Now go and enjoy your 15 fps !" :rolling:

Link to comment
Share on other sites

  • 2 weeks later...

- Level of Detail (LOD) on Track
- LOD on enemies raises the number of on-screen concurrent enemies quite drastically
- doubled the drawing distance
- real-time spawning of enemies (based on a ruleset)
- enemies follow the track elevation
- track has been smoothed along the hills
- fixed the glitch for the nearby polygons (obviously, none of the bullshit theories posted by some on previous page were remotely close to the actual reason of the glitch!)
- average 55 fps at 768x200, so there's ~90% of frame time available for audio/effects/more details and still keep the 30 fps lock

- without enemies, I'm way above 60 fps, so Time Trial mode will definitely be possible at 60 fps. When I'm playing it on my 50" LCD, at max speed it's quite an experience!

 

 

I believe the real-time spawning of enemies is the most important feature of this update:

- this has huge advantage as it's a procedural content generation , which I am a huge fan of, since it guarantees endless replayability (compared to manually placed enemies that you'll know by heart upon second playing)

- won't have to place every single enemy manually into every single track.

- AI can adjust to the difficulty with the number of enemies and their parameters - something that requires multiplication of the human effort if it's done manually by a level artist.

- From my past experience with my prior 3 published games, this is probably the single most important feature in terms of productivity and assets creation for final game

- I'll rather spend a week or two creating the algorithm and testing it, than risking wasting a lot of time when change is required and all content has to be remodified/recreated/retested from scratch

- this will also enable creating an endless-runner mode

 

I think I want to try the new spaceship LOD on my massive space scene.

 

  • Like 8
Link to comment
Share on other sites

Really Cool. It reminds me of Hot Wheels: Stunt Track Driver

 

 

Good, no, great work, and I hope you're able to complete something fun.

Thanks, glad you like it, though no idea what exactly reminds you of the Hot Wheels:Driver :)

Hot Wheels:Challenge is perhaps what you meant ? That's flatshaded.

 

That draw distance, smooth framerate and getting rid of the nearby polygons glitch... your 3d engine has come a long way!

 

So what are your next goals for it?

Thanks !

Well, jag doesn't need another Checkered Flag, so even if it seemed like I'm unhealthily obsessed with performance, the journey was worth it, as now - with 55 fps - I have 90% of frame time avalable for any additional features, whether it's better physics, more complex AI and some particle effects/other visuals.

 

I now need to focus on PC-side tools - like loader that will keep reloading mesh from 3dsmax in preset intervals and show them in my 3D viewer. I sure as hell don't want to mess with "3D modelling" from within Notepad anymore :)

I almost started 2 weeks ago, but then realized that I still will need to have Level Of Detail implemented, as without it, I would not have real benchmark data in terms of how far I can push it, yet still retain 30 or 60 fps - hence I worked on LOD now - as the last thing I wanted to do is create all art assets and then find out they're too detailed for 30/60 fps.

 

In terms of art direction, I am currently very heavily leaning towards sci-fi setting:

- imagine a track built around an asteroid, or a moon (simple 2D bitmap as a background, though 3D rendered at load-time using my engine, as at 768x200 not many backgrounds would fit on cart) - that would certainly be original both on a concept level and visual level

- remember Prey's gravity flips ? It was an FPS, but certainly this feature could be used in action racing (and it's entirely possible it was, in past, I just didn't play anything like that). You miss a flip, and just get Lost In Space through the momentum :) The level design then could have you racing on either of 4 sides of screen

- there's actually quite a good story that can be built around it (unlike generic desert/ice/jungle/city racer) - think missions. The track could really be just a travelling means for the giant mining space station that would have extensions/outposts on the sides of the track. From there, the story can branch into mining/power/faction conflicts, so it wouldn't be just a mindless racer.

  • Like 3
Link to comment
Share on other sites

I would beg for 60fps over 30fps, even if resolution has to suffer a tiny bit. The mighty Yak himself, said that a 60 Hz FUR was the ultimate goal, and it took a few more generations of hardware before he could achieve his vision that smoothly.

 

Think about it this way - 2600 games were 60Hz.

Link to comment
Share on other sites

 

Please tell us you don't seriously say "FUR" to mean frame rate.

If you knew anything about Yak, or his old blog, I did not say it. He did. Specifically, Frame Update Rate. I am not a furry. I re-posted something I found amusing from Yak's blog circa 1995.

 

Have a good day (or since you never have anything good to say to anyone, I'll translate that to "go fuck yourself").

  • Like 4
Link to comment
Share on other sites

If you knew anything about Yak, or his old blog, I did not say it. He did. Specifically, Frame Update Rate. I am not a furry. I re-posted something I found amusing from Yak's blog circa 1995.

 

Have a good day (or since you never have anything good to say to anyone, I'll translate that to "go fuck yourself").

I need to have that etched into a sign!

  • Like 1
Link to comment
Share on other sites

VladR I just want to say that I would really love to see a stun runner clone come out of this. I imagine one with a motion blur camera effect in my head and scenery wizzing by.

 

I would definitely support a project of this scope, it would be something to go great with the new reproduction pro controller.

 

Also 30 FPS is fine.

 

Filter out the usual noise and keep up the good work.

  • Like 1
Link to comment
Share on other sites

Sorry for late reply. Didn't get a chance to record the 60 fps video with my phone as I was busy with the work and preop arrangements. I just got out of surgery for the carpal tunnel that has been plaguing me last 6 years.

 

So, it's unclear how long will recovery take. Ideal scenario is 4 weeks and I can type then. But these things swing wildly across 6 months time frame too, so just will have to wait and see...

Link to comment
Share on other sites

Sorry for late reply. Didn't get a chance to record the 60 fps video with my phone as I was busy with the work and preop arrangements. I just got out of surgery for the carpal tunnel that has been plaguing me last 6 years.

 

So, it's unclear how long will recovery take. Ideal scenario is 4 weeks and I can type then. But these things swing wildly across 6 months time frame too, so just will have to wait and see...

Hope the recovery is a quick one. I am scared I may require that surgery at some point.

  • Like 1
Link to comment
Share on other sites

Hope the recovery is a quick one. I am scared I may require that surgery at some point.

If the Carpal Tunnel is not limiting your freetime / outdoor activities, then there's indeed little reason to undergo surgery, given high ratio of returned (or even worse) symptoms after the surgery.

 

Jaguar coding is not the highlight of my freetime activities ;) - I have been stuck with my current winter mountaneering skills, as with Carpal Tunnel:

- I can't climb up icefalls with just left hand in reasonable time

- can't haul heavy loads for multiday snow hikes as inevitably you use the affected hand, which is a serious issue at normal temperatures around -30C

- frostbite on affected hand is also a problem - while I am comfortable frolicking in -40 Celsius weather, CT is moving that threshold - left hand is alright at -40 C, but right hand with CT becomes sensitive already at mere -30 C

 

I moved to Montana recently for a reason. Glacier National Park is but one :)

  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...