Stunts Forum

Stunts - the Game => Stunts Reverse Engineering => Topic started by: Duplode on December 30, 2016, 06:55:44 AM

Title: Brain dump of a lost inquiry
Post by: Duplode on December 30, 2016, 06:55:44 AM
A fried HD has just taken with it the preliminary results of some restunts-related investigations about the game engine that I had performed recently. This post is a brain dump of whatever I can remember from the findings, in case anyone else (possibly even myself, once my disgust over this data loss incident subsides) wants to follow the leads. I will use restunts terminology liberally and (as I am writing this from memory) inaccurately -- any field/subroutine names I mention might be wrong. If I get to recall things better, I will update this post accordingly.

Keep your backups up to date...

Title: Re: Brain dump of a lost inquiry
Post by: Cas on January 05, 2017, 10:21:16 PM
Wow!  Looks like a whole lot is known about the internal workings of Stunts. I would gladly start writing a Stunts-like game if I were more comfortable with some things (namely, triangle collision, 3D triangle-based rendering). My idea is that, if one kept some concepts simple like in Stunts (textureless single-coloured triangles, no shadows, no gradients), one could produce a very fast 3D engine with high resolution and without the need to rely on 3D drivers and graphics acceleration. A tweaked Newtonian engine could incorporate the elements we see in Stunts physics to recreate the feeling of driving in Stunts, while not necessarily producing the exact same results. A portable engine, with no dependencies, would be amazing. If this much is already understood, maybe we could put forces together to create it.
Title: Re: Brain dump of a lost inquiry
Post by: Duplode on January 07, 2017, 05:01:36 AM
My idea is that, if one kept some concepts simple like in Stunts (textureless single-coloured triangles, no shadows, no gradients), one could produce a very fast 3D engine with high resolution and without the need to rely on 3D drivers and graphics acceleration. A tweaked Newtonian engine could incorporate the elements we see in Stunts physics to recreate the feeling of driving in Stunts, while not necessarily producing the exact same results.

I know that is not quite like what you have in mind, but have you already seen the LambdaCube Stunts? (Hackage page (https://hackage.haskell.org/package/stunts); YouTube video (https://www.youtube.com/watch?v=XoE5CKLLnaM); there is also a JavaScript/WebGL port (https://github.com/cobbpg/webstunts)) In that case, the LambdaCube team used Stunts as a tech demo for their 3D engine, plugging in a physics engine (Bullet, or JigLibJS2 in the case of the JavaScript port) to make it playable.
Title: Re: Brain dump of a lost inquiry
Post by: Cas on January 09, 2017, 12:06:48 AM
That's a very interesting one. I know that there have been many different approaches to recreating Stunts. Many of them have been mentioned in this forum. Maybe the best known is Ultimate Stunts, but all are too different from Stunts.

In this particular case, it appears at first sight that the game is much more similar to Stunts because it uses its original 3D models, but it's actually entirely different: the physics are more like that of other car games and the engine is both hardware and software demanding, since it uses 3D hardware effects and if I understood correctly, it's built upon third party libraries (too many dependencies). These things are nice, but I think that, for a recreation of Stunts to stick, it has to be... well... "Stunts". Only a few things can be changed that people would accept such as:

- Make the game run natively on newer OSs
- Allow higher pixel resolution
- Maybe change the collision and physics engine as long as they still appear to be the same (that is, it's not that important if replays are incompatible with the new one, but it is important that the game still feels like Stunts). Changing the engine would allow more practical car design, making the game more flexible
- Allow mods

I've made a triangle drawing function that I could translate to assembly to make it lightning fast, but then comes all the 3D and collision and I fear that will kill me, ha, ha.