Author Topic: [SA] Sparks Replay Fix  (Read 2172 times)

0 Members and 1 Guest are viewing this topic.

Offline Reynard The Fox

  • Reynolds
  • Senior Member
  • Posts: 3291
    • View Profile
[SA] Sparks Replay Fix
« on: February 25, 2023, 03:51:25 AM »
Sparks Replay Fix

Introduction

After, getting the wheels and suspensions of bikes to work in replays I set out to get sparks in replays. One of the two reasons why grinds in SA are so much lamer is that there are no sparks to show the friction of the body of the vehicle with the rail or ledge. The other being of course that grinds lose speed very quickly when FL is turned off.

Getting the sparks to work has been a real challenge. Once I got something to work something else would pop-up and would require twice as much work as needed before. In short these are the following bugs features I needed to implement. First of all the camera matrix did not update properly when using the replay system. This caused the sparks to always be flying towards the camera that was still at the position of the player outside of the replay. In SA sparks are dependent on the position of the camera and this is why they move when you rotate the camera.

Secondly, collision had been turned off when replays are playing. Collision detection is used to determine whether two objects are touching. Sparks are created inside this collision procedure, but only when certain speed limits are passed and some flags are enabled. This was understandable as enabling it causes all types of problems. When enabling it collision forces will still be applied when a collision is detected and because the replay system will update the position of the player every frame, this would give all sorts of weird interactions. After a lot of trial and error I was able to get it into a reasonably stable state. I hope the player does not go flying off in random locations anymore.

The sparks are only enabled for the player vehicle, when the player is riding it. I had to do it this way because of the aforementioned reasons.

All in all, I think I got it in a pretty decent state. It has taken many days and long nights of frantic disassembly scrolling and dealing with ASM bugs, and frankly I don't wish to work on this anymore.

Results

Here you can see the results on some simple grinds I landed with the script.

https://www.youtube.com/watch?v=aFSE0QgbUmk

Compatibility and Bugs

The replays generated when using this fix are able to be played when the fix is not active. It would look exactly the same as before. It should work with replays not landed with this fix. No data is read from the replay in order to get the sparks and therefore any old replay will do.

With cars there can still be quite some bugs and it can appear unstable. In general it seems to work okay, but the collisions around cars and their wheels are more finicky.

For some down-hill rails no sparks are created and during RADs there aren't as many sparks as in game. I am not sure if I can fix this problem. It may happen that the game does not detect any collisions, there is not much I can do about this.

I have not tested if it is compatible with freeplay or other .asi scripts but I foresee no problems there.

Download

You can download it here

Instructions

Put the .asi script in the GAME_FOLDER/scripts folder and use your favourite .asi loader to load it. I recommend Silent's which you can find here.

Disclaimer


I am not responsible for any corrupt replays if you choose to use this fix.

Thanks

Thanks people on the GTAS discord for their support along the way. I hope you can appreciate this work.

Offline Demo00n

  • Posts: 254
  • ``````````````````````````````````````````````````
    • View Profile
Re: [SA] Sparks Replay Fix
« Reply #1 on: February 25, 2023, 11:51:16 AM »
great job rey :)

Offline Srcry

  • DUSTED
  • Veteran Member
  • Posts: 1872
    • View Profile
Re: [SA] Sparks Replay Fix
« Reply #2 on: February 25, 2023, 01:32:06 PM »
I can definitely appreciate this.

Offline VaNilla

  • next week m9
  • Veteran Member
  • Posts: 3809
    • View Profile
    • YouTube
Re: [SA] Sparks Replay Fix
« Reply #3 on: February 26, 2023, 03:51:45 AM »
It works with replays landed without the fix? That makes this a must have as long as it works well with most rails :o. I'm guessing this works with all motorbikes (not just the NRG), and bicycles too? Awesome job, this will make all future SA videos look much better :cheernutz:.
« Last Edit: February 26, 2023, 03:58:26 AM by VaNilla »

Offline Demo00n

  • Posts: 254
  • ``````````````````````````````````````````````````
    • View Profile
Re: [SA] Sparks Replay Fix
« Reply #4 on: February 26, 2023, 04:00:21 AM »
yup, it also shows sparks when RADding (cool effect for in video's imo)

Offline Plani

  • --
  • Veteran Member
  • Posts: 4387
  • Since 2008
    • View Profile
Re: [SA] Sparks Replay Fix
« Reply #5 on: February 26, 2023, 06:22:11 AM »
Fucking awesome :ajaja:

Offline VaNilla

  • next week m9
  • Veteran Member
  • Posts: 3809
    • View Profile
    • YouTube
Re: [SA] Sparks Replay Fix
« Reply #6 on: February 26, 2023, 07:20:01 AM »
yup, it also shows sparks when RADding (cool effect for in video's imo)

That's great :mellow:. It should deliver sparks for any collision that would normally cause them (so I guess helicopter grinds should work too :ninja:), I just wanted to make sure since I can't test right now :euro:.

Offline Demo00n

  • Posts: 254
  • ``````````````````````````````````````````````````
    • View Profile
Re: [SA] Sparks Replay Fix
« Reply #7 on: February 26, 2023, 10:01:03 PM »
While yes it does give sparks, I do think it'd be nice if there was a way to increase it

Offline Rusch69

  • Senior Member
  • Posts: 2990
    • View Profile
Re: [SA] Sparks Replay Fix
« Reply #8 on: March 03, 2023, 03:45:58 AM »
Oh nice... so I get to re-record everything I guess :cheersad:

Offline Faiz

  • DSS Crew
  • *
  • Posts: 170
    • View Profile
Re: [SA] Sparks Replay Fix
« Reply #9 on: March 03, 2023, 03:55:47 AM »
Oh nice... so I get to re-record everything I guess :cheersad:
holy shit! is that what I think is it?

Offline Rusch69

  • Senior Member
  • Posts: 2990
    • View Profile
Re: [SA] Sparks Replay Fix
« Reply #10 on: March 05, 2023, 01:42:28 AM »
Oh nice... so I get to re-record everything I guess :cheersad:
holy shit! is that what I think is it?

Probably :hmm:
https://www.youtube.com/watch?v=J6m7hUg5zQc

Offline Mati

  • Dr. Dre
  • Veteran Member
  • Posts: 3801
    • View Profile
Re: [SA] Sparks Replay Fix
« Reply #11 on: March 05, 2023, 01:09:41 PM »
oh my god

Offline Herrarge

  • Veteran Member
  • Posts: 2401
    • View Profile
Re: [SA] Sparks Replay Fix
« Reply #12 on: March 10, 2023, 08:44:29 AM »
No way this is possible after all these years.

Someone try custom sparks with effects.fxp please!

Offline Diaz

  • Veteran Member
  • Posts: 3314
  • WH
    • View Profile
Re: [SA] Sparks Replay Fix
« Reply #13 on: March 11, 2023, 12:41:41 AM »
I do appreciate it, it already looks amazing in your replays shown as examples. Also, thanks for making new additions to SA stunting.
Also, let me insert my previous post on DC's RepCopy tool which I wrote like 10 minutes ago:
It's always awe-inspiring to see such tools are being released in times likes this. I mean it's 2023 and stunting is not THAT active of a scene anymore, I admire the dedication of all of you. But I also think like 'cool, I wish these stuff were released 10 years earlier to make stunting convenient'. Still, thanks pal  :P

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal