Jump to content

Photo

Road Rash pre-alpha on Jaguar at 30 fps

Road Rash GPU 30 fps

581 replies to this topic

#401 VladR OFFLINE  

VladR

    Stargunner

  • Topic Starter
  • 1,481 posts
  • Location:Montana

Posted Wed Dec 6, 2017 12:30 PM

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:



#402 VladR OFFLINE  

VladR

    Stargunner

  • Topic Starter
  • 1,481 posts
  • Location:Montana

Posted Sat Dec 16, 2017 12:26 AM

- 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.

 



#403 JagChris OFFLINE  

JagChris

    River Patroller

  • 3,522 posts
  • Location:Oregon

Posted Sat Dec 16, 2017 3:05 AM

For some reason I am reminded of the the Big Bang Theory

#404 swapd0 OFFLINE  

swapd0

    Moonsweeper

  • 252 posts

Posted Sat Dec 16, 2017 7:32 AM

Much better now with the Z-clip fixed.



#405 pacman000 OFFLINE  

pacman000

    Stargunner

  • 1,302 posts

Posted Sat Dec 16, 2017 8:14 AM

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.



#406 swapd0 OFFLINE  

swapd0

    Moonsweeper

  • 252 posts

Posted Sat Dec 16, 2017 8:23 AM

Club drive on steroids XD



#407 sd32 OFFLINE  

sd32

    Dragonstomper

  • 568 posts
  • Location:Mexico

Posted Sat Dec 16, 2017 9:23 PM

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?



#408 VladR OFFLINE  

VladR

    Stargunner

  • Topic Starter
  • 1,481 posts
  • Location:Montana

Posted Sat Dec 16, 2017 10:01 PM

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.



#409 tschak909 ONLINE  

tschak909

    River Patroller

  • 2,733 posts
  • Location:USA

Posted Sat Dec 16, 2017 10:24 PM

How about Moon Patrol 2000? :D

 

/me ducks :)



#410 CrazyChris OFFLINE  

CrazyChris

    Dragonstomper

  • 888 posts
  • Location:OH

Posted Sun Dec 17, 2017 8:24 AM

I'm curious to see how fast you can make it go?



#411 Stephen OFFLINE  

Stephen

    Quadrunner

  • 7,128 posts
  • A8 Gear Head
  • Location:No longer in Crakron, Ohio

Posted Sun Dec 17, 2017 3:44 PM

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.



#412 Clint Thompson OFFLINE  

Clint Thompson

    River Patroller

  • 4,345 posts
  • Kiss Reality Goodbye.
  • Location:Indianapolis, Indiana

Posted Sun Dec 17, 2017 6:21 PM

I'm curious to see how fast you can make it go?


That's a good question or curiosity. What's this thing look like unleashed running at full speed? Nice progress btw, look forward to seeing more videos!

#413 Lost Dragon OFFLINE  

Lost Dragon

    River Patroller

  • 3,139 posts

Posted Mon Dec 18, 2017 12:59 AM

ATD's Rollcage..PS1 and PC let you drive on walls and the ceiling, once you were going fast enough:


Edited by Lost Dragon, Mon Dec 18, 2017 1:04 AM.


#414 Jeffrey_Bones OFFLINE  

Jeffrey_Bones

    Stargunner

  • 1,026 posts
  • Location:Charlotte, NC

Posted Mon Dec 18, 2017 2:26 AM

ATD's Rollcage..PS1 and PC let you drive on walls and the ceiling, once you were going fast enough:

 

 

Thats like one of my favorite games of all time! I still have it on my PC today! It was made by the same folks that made Battle Morph and Cybermorph. ATD



#415 Lost Dragon OFFLINE  

Lost Dragon

    River Patroller

  • 3,139 posts

Posted Mon Dec 18, 2017 10:10 AM

Never tried it myself or the sequel, as driving games aren't my bag.

I just remember the PS1 press at the time making a lot of it.

ATD also handled ST Super Sprint...

They often take flak, but we're decent enough developers in their time.

#416 JagChris OFFLINE  

JagChris

    River Patroller

  • 3,522 posts
  • Location:Oregon

Posted Fri Dec 22, 2017 1:58 AM

That looks like a fun game. ATD put some real thought into that.

#417 ZylonBane OFFLINE  

ZylonBane

    River Patroller

  • 3,953 posts
  • Location:KC, KS, USA

Posted Sat Dec 23, 2017 11:42 AM

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.

 

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



#418 Stephen OFFLINE  

Stephen

    Quadrunner

  • 7,128 posts
  • A8 Gear Head
  • Location:No longer in Crakron, Ohio

Posted Sat Dec 23, 2017 5:33 PM

 

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").



#419 tschak909 ONLINE  

tschak909

    River Patroller

  • 2,733 posts
  • Location:USA

Posted Sat Dec 23, 2017 7:27 PM

To be fair, we've all told ZylonBane to go fuck himself at one time or another.

 

-Thom



#420 leech OFFLINE  

leech

    Stargunner

  • 1,229 posts

Posted Sat Dec 23, 2017 9:02 PM

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!



#421 Jeffrey_Bones OFFLINE  

Jeffrey_Bones

    Stargunner

  • 1,026 posts
  • Location:Charlotte, NC

Posted Wed Dec 27, 2017 2:10 AM

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.

#422 VladR OFFLINE  

VladR

    Stargunner

  • Topic Starter
  • 1,481 posts
  • Location:Montana

Posted Thu Dec 28, 2017 5:41 PM

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...

#423 madman ONLINE  

madman

    River Patroller

  • 2,727 posts
  • Location:127.0.0.1

Posted Thu Dec 28, 2017 7:27 PM

Six months timeframe? Sounds about right.



#424 Stephen OFFLINE  

Stephen

    Quadrunner

  • 7,128 posts
  • A8 Gear Head
  • Location:No longer in Crakron, Ohio

Posted Fri Dec 29, 2017 1:04 PM

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.



#425 VladR OFFLINE  

VladR

    Stargunner

  • Topic Starter
  • 1,481 posts
  • Location:Montana

Posted Tue Jan 2, 2018 6:32 PM

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 :)






7 user(s) are browsing this forum

2 members, 5 guests, 0 anonymous users