emoose / OutRun2006Tweaks

Turning and spinning and spinning and turning, woah!
MIT License
304 stars 0 forks source link

New environment visual assets don't always show immediately #49

Open Gamma00Ray opened 1 month ago

Gamma00Ray commented 1 month ago

I'm using 0.4.1. I'm having an occasional issue with driving into a new area after the transition section and the new area's visual assets don't always show immediately. The big characteristics of this are that the skybox appears to load in, my car is visible, other cars are visible, the HUD is visible, and below the skybox is black. No visual aspects of the environment show, not even as something weird like wireframe. The physics data seems to load because I've hit walls when I couldn't see them. Usually the weirdness will only present itself for three or four seconds before the visuals suddenly appear.

This seems to happen in any mode, but, for instance, if I'm playing a 15 stage run, the problem will present itself maybe once per this run.

I've had this issue on both a hard drive and on a solid state drive. I have had it when the INI setting for alternate high resolution textures is set to true and false.

My PC specs are: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz Nvidia GeForce GTX 1080 8GB 16GB RAM

I'm running the game at 1920x1080.

I uploaded the log file and the INI file. Note that I renamed the extension of the INI file to upload it here. It's normally .ini, but it's .txt here. I'll try to get a screenshot of what I'm seeing and upload it later.

I'm enjoying this enhancement of OutRun 2006! Thanks for doing it! I know you guys are doing it in your spare time and everything, so I'll be patient, but I'm looking forward to when it's all finished and perfect!

OutRun2006Twea [OutRun2006Tweaks.txt](https://github.com/user-attachments/files/16134818/OutRun2006Tweaks.txt) ks.log

Gamma00Ray commented 1 month ago

I don't know what happened with the formatting of the text around the attachments, but they seem fine if you click on them.

Gamma00Ray commented 1 month ago

Here's a screenshot for you. It happened early in a 15 stage run this evening. It actually happened a second time in this run, but I wasn't quick enough to take a screenshot of it.

I am using texture packs for the UI. I did have an environment texture pack installed, but I was experiencing hitches in the transition periods while the enhanced environment pack was loading, so I deleted all of the textures and only re-copied the environment textures. I was running the game off of my slower hard drive at that time, so that might have been a factor.

This screenshot was without enhanced environment textures and on my solid state drive.

Please let me know if you have questions.

20240708181313_1

lance8765 commented 1 month ago

Heh it happened to me at least 2-3 times as well, but during normal OutRun Mode, in OutRun2SP and with OutRun2 tracks. Not using texture packs here, not Full HD resolution, and no SSD. I haven't played that much since then.

Gamma00Ray commented 1 month ago

Heh it happened to me at least 2-3 times as well, but during normal OutRun Mode. Not using texture packs here.

So I'm not the only one! It seems like it can happen in any mode for me. It's just that a 15 stage run is efficient in coaxing it out.

Tenome commented 1 month ago

Same thing also happens to me. Bummer! I'm on an NVME SSD too, so it's not that.

lance8765 commented 1 month ago

Now i suddenly remember seeing something similar years ago, but on PS2 and usually at the end of 15 continuous courses on C2C mode. But at that time i probably blamed the aging lens of my console. Who knows.

Tenome commented 1 month ago

I definitely didn't encounter it while playing with the FXT mod on Windows 7, so I don't think it's a porting issue.

Tenome commented 1 month ago

I imagine it's something to do with how Tweaks is streaming the textures for level transitions. It only lasts for a few seconds, and only on certain levels it seems (Bay Area in Outrun2SP 15 mode, for example--or maybe it caches the next couple levels in advance?), but it's still a pretty major issue imo.

You can tell when it's about to occur because the next level doesn't rise out of the horizon. However, pausing and unpausing seems to immediately fix the issue.

polybius22 commented 1 month ago

I rarely get an issue like this but when it occurs it is always at the first checkpoint and is demonstrated by a YouTube clip here: https://youtu.be/LUhWVjBWzyQ?si=n_ughVtiRCWYZEnn&t=59

Tenome commented 1 month ago

That's what it looks like for me too, but sometimes it lags by a few seconds. It also sometimes happens with checkpoints later down the line. I wonder what's causing it? I'm on an AMD Ryzen 5 1600, NVME SSD, 1080ti, and Windows 10 (my last FXT setup was Windows 7, i5 2500k, an SSD, and an AMD RX 570 with no issues).

emoose commented 1 month ago

Hm, not really sure what it could be if there's no stage texture replacements setup (those are known to cause stutters, but doesn't sound like that's what's happening here)

Only guesses I have are

  1. maybe UI texture replacements are causing loading to get delayed for some reason? not sure how that would be the case though, unless they're just too large (would recommend UI texture makers to use DXT1/DXT3/DXT5 with mipmaps disabled to keep the size down, texconv.exe -f DXT1 -m 1 ...)
  2. FPS limiter involved somehow - I know that disabling the limiter & vsync makes load screens almost instant for me, could be affecting loads during gameplay as well, it might be worth testing with increased FramerateLimit + vsync disabled.
  3. Maybe settings like DisableStageCulling & DisableVehicleLODs are causing too much to load in at once? Could be worth trying with those disabled.

Will try looking into the limiter some more, could be some signal/event it should be sending to the file loading thread to keep things moving.

E: might have something for that, there's a FileLoad_Ctrl func that game calls to pump file loads each frame, if I call that inside our framelimiter it reduced load time quite a bit. Here's a build with that: OutrunTweaks-FilePumper.zip

Tenome commented 1 month ago

E: might have something for that, there's a FileLoad_Ctrl func that game calls to pump file loads each frame, if I call that inside our framelimiter it reduced load time quite a bit. Here's a build with that: OutrunTweaks-FilePumper.zip

That completely fixed the issue for me, thanks. I figured it was something regarding load times somewhere, it reminded me of when I played GTA Vice City on a PS2 hard drive and you could run so fast that you can see the world popping in in front of you.

Off-topic question, but since you presumably have the code open I wanted to ask if there are separate values for Slipstreaming cars? I'm almost positive that slipstreaming rivals give you a bigger speedboost, but I haven't tested it.

emoose commented 1 month ago

That completely fixed the issue for me, thanks. I figured it was something regarding load times somewhere, it reminded me of when I played GTA Vice City on a PS2 hard drive and you could run so fast that you can see the world popping in in front of you.

Good to hear, btw is your monitor refresh rate higher than 60hz? Not sure how well that pump fix would work if game is vsynced at 60hz really, afaik D3D doesn't really let us do things during vblank, so maybe wouldn't work as well.

I wanted to ask if there are separate values for Slipstreaming cars? I'm almost positive that slipstreaming rivals give you a bigger speedboost, but I haven't tested it.

Got a few slipstream funcs named but not really sure what they're doing yet (https://pastebin.com/0aGQDiki is what I have to work with...), seems it's checking the othcar speed/position & also some field_1C4 value, not sure what that is yet though.

Tenome commented 1 month ago

Monitor + game + vsync is 60hz for me. Running the game higher than that seems like it would risk breaking things so I don't let it go any higher.

Gamma00Ray commented 1 month ago

E: might have something for that, there's a FileLoad_Ctrl func that game calls to pump file loads each frame, if I call that inside our framelimiter it reduced load time quite a bit. Here's a build with that: OutrunTweaks-FilePumper.zip

I'm looking forward to trying this out this evening. Thanks!

Gamma00Ray commented 1 month ago

Oooooooooh yeah, that FilePumper build is fantastic. I played about an hour, and I had no environment loading problems.

The load time reduction has go to to be real. Even on solid state with a vanilla OutRun 2006, the cars would load in slowly on the car select screen. Standard 0.4.1, too. FilePumper? Cars load practically instantly.

Bravo! Thank you!

I'm also running my game at 60Hz with vsync, too.