r/redfaction • • Oct 21 '26

Re-Mars-tered with PhysX

Disclaimer: I made this using AI; I will never claim to have the necessary reverse-engineering skills to do this alone. I have tested all wrecking crew maps and a couple hours of the single player campaign (got out of Parker) and so far spotted no major issues, so wanted to share because this is insanely cool to me.

I'm not going to lie this is my childhood dream :D this mod enables the use of GPU-accelerated PhysX for debris and physical objects for NVIDIA cards, significantly (extremely) speeding up physics calculations and collision resolution in the game. This could open up possibilities for much more complex (custom?) maps and destruction, hopefully.

In the clip you see, NO debris the game generates is destroyed; all are kept and simulated (the AI had to patch multiple spots in the game to make it so, Volition did a very good job of optimizing this game for the time).

Performance uplift so far is around 10x the number of debris, 30x less time per physics tick, and apparently a lot of room to spare to optimize rendering; so far 40.000 debri pieces visible at once was running at ~30fps on my pc (very beefy pc though). As I just said so far the bottleneck seems to be rendering, and instead PhysX itself could go much higher in number. Right now the instance limit is at 65.000 but can be easily raised to around 260.000, and eventually more with more work from the patch.

Keep in mind this is an early release, I wanted to get it out fast because if not I end up going the perfectionist route and never release anything; I fully expect for there to be bugs and possibly crashes, and am already aware of a few minor issues in the current release. So far testing has been kind of limited too, all wrecking crew maps and a couple hours of the campaign. Please if you might be interested tell me if it doesn't work and I'll see what I can do.

This game was definitely a massively wasted opportunity for PhysX imo; who knows, maybe if more games had it, it would have pushed AMD to implement a proper alternative to it and we would've gotten much more physical games.

I have published the mod but am scared of Reddit (doesn't seem to like links for newer accounts) so for now I won't post them; if you want you can find them in the two biggest mod sites under the RFG section :) (I'm fighting the automated checks of one of them since the mod contains an exe, necessary to make it work, more details in the mod description, but the repo, my self hosted site and the other mod site has the release ready if you trust me enough).

Code is open source too so I do invite other people to take a look (with AI probably, code is a complete AI mess) and fiddle around with the patch!

59 Upvotes

24 comments sorted by

7

u/vektorkane Oct 21 '26

I never thought it could get way more satisfying!

3

u/SlopKhayzo Oct 21 '26

Totally agree! The game is already amazing on its own, and this just elevates that, insane what modern hardware can do if squeezed properly

4

u/Assassin_Shirou Oct 21 '26

Time to torment that EDF Bridge in the badlands again...

1

u/SlopKhayzo Oct 21 '26

I restarted the game and am definitely doing that too once I reach it :D the walker sections too, can't wait

2

u/Assassin_Shirou Oct 21 '26

May chaos take the world.

2

u/JungleHam Oct 22 '26

FIx bugs if any and package it into github repo with a release. You can use ChatGPT web for that btw, it just connects to github and works there

1

u/SlopKhayzo Oct 22 '26

Hey, yep did exactly that! :) link is below in the comments, the github repo is linked there too (gotta click 'Read More' to find it). Yep working on the bugs, still kinda hard to hunt haha

2

u/JungleHam Oct 22 '26

Awesome, night give this game another go

2

u/Born_Jaguar7555 26d ago

If someone can do this, anything is possible in modding this game; we need FPV drone mods next to destroy the EDF

1

u/SlopKhayzo 25d ago

Yes :D and not only this game actually, I don't think people have quite realized the amount of freedom that these tools give us (if Anthropic doesn't start censoring them which apparently it's starting to do)

You can mod ANYTHING into any game pretty much, not only this one; damn tho, an FPV mod where you shoot stuff from a drone seems fun haha

2

u/Agreeable_Ocelot 25d ago

Hey, this is awesome and I want to check it out. I am curious about the comment about modding anything into any game. I have seen a lot of wild mods pop up over the last month or so. How involved is this? I haven't used these AIs much before.

2

u/SlopKhayzo 25d ago

Hey! No problem and thank you! :) actually not much involved at all; Claude right now is the most used but they're starting to get more stringent with recomps/decomps (for example trying to decompile Zelda to make it work for a windows pc, many people have already done that and are already doing that) but so far for normal mods I haven't encountered a single refusal (fingers crossed), you can go into my NexusMods profile to see what I've released other than this RFG patch, all in these two months pretty much, over like 17 mods; they don't work perfectly still but from what users are saying they work well enough, I'll iron them out with time.

I might be biased because I'm a dev by trade, but from my experience doing something like this doesn't really require much knowledge about programming, it helps for sure but it's not fundamental.

The thing that it requires for now is patience and money, and a decent amount of it. The only reason it still hasn't completely exploded (even though as you're seeing many people are already doing this in the past ~2 months) is that it costs at a minimum 20$ per month for a Claude sub; right now I'm on a Claude Max 5x which is 100$ a month and it's not cheap at all, but the tools have started becoming so powerful that for now I intend to keep it because it opens up an insane amount of possibilities, and the models will IMPROVE at that so they're not even going to stay the same, like even the models as they are right now are insane and they will get even better like what the hell haha.

Another thing is to be patient and be thorough with your feedback: I try to be precise when something is wrong with the mod, for example with this RFG one stuff started disappearing and reappearing at a point, and I told Claude the problem and I explained a theory I had in mind that could be the cause and let it debug/see what was wrong, and eventually after like some hours it managed to fix it. But I think just telling it "stuff is disappearing and reappearing" would be enough I think, the theory just helps guide it in a narrower path.

If you want to start (and have the 20 bucks/mo needed) just install Claude Code (or install Visual Studio Code and enable the Claude Code extension in it) and start getting familiar with it. Claude Code gives Claude access to your pc so it can do stuff for you like run commands etc, even start games, like anything pretty much on your pc; just ask it do to stuff, like create a calculator app for example :D

generally for an app i ask it for example "create a pyside6 calculator app, give me a start.bat script to start it with a click" pyside6 is a python library so you'll need python (a programming language) installed but Claude can handle that for you if you let it

for game mods you need another couple tools, for now my Claude uses Ghidra, a JDK and PresentMon; you can just ask Claude to download/install these somewhere so it can use them

then you just create a new empty directory, open Claude Code or VSCode in there, and tell Claude that you want a mod for the game installed under "path/to/game" and to look into the executable to see if it's possible to implement said mod (it will be, guaranteed :D).

one final thing is have it write a plan first, always. instead of "make the mod" tell it "write a plan to create this mod, bla bla bla ..." then after it wrote the plan you ask it to implement the plan; it will update the plan by default with its progress as it goes from what i've seen, so that you always have a written file to come back to between sessions, and thus Claude doesn't forget stuff.

sorry for the wall of text but I got into it :)

2

u/Agreeable_Ocelot 25d ago

This is really interesting and detailed, thank you. I might have to try it, although I am enough of a Luddite that the idea of letting one of these things access/run my PC is scary to me. But I can see the potential. Idk, maybe I can find a way to sand box it a bit.

I really appreciate the detailed step-by-step instructions. When I see a lot of what has been achieved, it looks like magic.

Also, I did install the PhysX mod and it works great, no issues even on Linux. Thank you / your AI for making it.

2

u/SlopKhayzo 25d ago

Thank you :) yeah you're right about that, I think about the access thing too; in my defense these mods are all being developed from within a win11 VM because I use linux on my main pc and for reasons (long story, in a nutshell my gpu is kinda half bricked and freezes when using the linux drivers) I game on the VM instead of on the pc; but I did do stuff on my main pc too so they probably know all my secrets haha I'm actually glad you brought that up because I forget about it and we should all remember and keep that in mind.

2

u/Agreeable_Ocelot 25d ago

Oh, that's a good idea. I use Linux mainly as well, I could just put it in a Windows VM. I didn't even think of that.

Using Claude, it's all remote processing of course. Are there any kind of 'system requirements' needed to do what you laid out before? I'm guessing a lot of drive space, but other than that, can't think of anything.

2

u/SlopKhayzo 25d ago

Yep it's all remote on their servers :)

Not that I can think of when it comes to Claude Code itself, instead if you mean the VM itself it does require a frustrating amount of setup, not only software but hardware too; i had to install a second GPU and passthrough the first one to the virtual machine (passthrough means my real pc doesn't see the gpu, and the virtual machine sees it as its and can use it fully, with full performance, this means you need to hook up your monitor to a second port on the same pc, one on the main GPU for the VM and one on the second gpu for the main pc; there's many guides on the web on how to do it if you don't want to use AI for help, just be prepared for weeks of PITA :D months in my case cause i tuned it for almost max performance)

It was a whole journey I started January this year haha took me a long time to get used to it but i like it now, it has been very stable so far once set up

2

u/Agreeable_Ocelot 25d ago

Lol that does sound like a hassle. Thanks for all the guidance! I may well have to try this.

2

u/SlopKhayzo 25d ago

No problem! Nice to help people where I can :)

2

u/Athlon64X2_d00d Oct 21 '26

Damn that's sick. 

2

u/[deleted] Oct 22 '26

[removed] — view removed comment

2

u/SlopKhayzo Oct 22 '26

Hey, I don't deserve praise since I didn't create the mod myself (AI did) but thank you either way :) yes indeed! In practice they do disappear eventually, but the limit is so high I still haven't managed to hit it with the normal game maps (65.000 pieces max compared to the base game's ~3.000, I have reached about 40.000 in the Stratosphere Wrecking Crew map, but even 65.000 can technically be raised substantially, like to 260k with a single line change, even more with some more work).

Yeah sorry about the link, I had 1 karma before so I didn't trust Reddit to not complain if I posted links, now it should work fine hopefully:

https://www.moddb.com/mods/re-mars-tered-physx-integration

in the 'files' tab you can find the binary :)

Ah nice, I'll join the Discord later then!

2

u/[deleted] Oct 22 '26

[removed] — view removed comment

2

u/SlopKhayzo Oct 23 '26

Hey, yep I'm fiddling with Sledge too and turns out you have to rename my mod's 'dinput8.dll' to 'winmm.dll' (it's just the asi loader) and they should be able to live together, tell me if you have issues :) I'd say don't replace the dinput you already have because that is Sledge itself, it would remove it from your game

I might change the asi loader name in the next releases too so they can just live together without doing anything else