Stunts Forum

Stunts - the Game => Stunts Chat => Topic started by: mrdries on May 10, 2023, 08:31:28 AM

Title: Stunts trials
Post by: mrdries on May 10, 2023, 08:31:28 AM
Anyone ever seen motorcycle trials, where they jump with their motorcycle from rock to rock?

It's pretty fun to imitate this in Stunts. Here's a simple track;


You cannot view this attachment.
You cannot view this attachment. 
Title: Re: Stunts trials
Post by: KyLiE on May 10, 2023, 10:28:26 AM
Hello @mrdries and welcome to the forum!  Yes, I have seen motorcycle trials and it's interesting to see this imitated in Stunts! :)
Title: Re: Stunts trials
Post by: mrdries on May 10, 2023, 05:54:06 PM
Thanks!
Title: Re: Stunts trials
Post by: alanrotoi on May 10, 2023, 06:28:11 PM
Hey cool idea!
Title: Re: Stunts trials
Post by: mrdries on May 10, 2023, 11:07:18 PM
Thanks! You're very fast. I saw your name.  :)

Here is another track. With some weird looking stunts.



You cannot view this attachment.
You cannot view this attachment. 
Title: Re: Stunts trials
Post by: Duplode on May 11, 2023, 01:03:59 AM
Hello and welcome, @mrdries ! That's a fun track building style. Here's some Jaguar hopping on TRIAL2 -- lovely highway cul-de-sac!
Title: Re: Stunts trials
Post by: mrdries on May 11, 2023, 08:37:38 PM
Thanks! Really cool.

Perhaps one more. This one is like a puzzle to solve. Couldn't make it with the Jaguar though. The runway was a little too short.



You cannot view this attachment.
You cannot view this attachment. 
Title: Re: Stunts trials
Post by: Daniel3D on May 11, 2023, 09:30:15 PM
Very cool stuff.
Never considered this way of using the game engine.
I sense a challenge coming up.

On a different note. Don't we have a motorcycle in the custom vehicles?
Title: Re: Stunts trials
Post by: alanrotoi on May 11, 2023, 10:07:10 PM
It reminds me of Plus Track 1 from ZakStunts: https://zak.stunts.hu/tracks/ZCTP1

Wasn't there Mark L. Rivers tracks like this?

Anyway I think the "puzzle track to be solved" is a new cool idea from mrdries. Congrats!
Title: Re: Stunts trials
Post by: Cas on May 12, 2023, 12:17:42 AM
Hey!  This is a very original idea!  It enables a completely new way of driving :D
Title: Re: Stunts trials
Post by: Cas on May 12, 2023, 04:57:31 AM
Here's a replay on trail2!
Title: Re: Stunts trials
Post by: Daniel3D on May 12, 2023, 06:37:44 AM
@Cas , could you add these to the permanent competition page at r4k?
Title: Re: Stunts trials
Post by: Cas on May 12, 2023, 07:51:12 PM
Uhm... yes, I can do it. I should add the tracks and then pull the replays. I'm thinking I'll have to do it manually because we currently don't have a function to upload something in the name of somebody else (which we admins should have), so maybe I should implement that first. I've been thinking for a long time of an update for the track section.
Title: Re: Stunts trials
Post by: mrdries on May 12, 2023, 09:01:17 PM
Thanks, man!

I downloaded a collection of tracks and I saw tracks on Stunts with lots of track elements, one after another, disconnected from the main road. Never occurred to me that you could do that. That's where I got the idea from.

Only making it more like motorcycle trials, that was a new idea to me.
It really is a different style of driving. I'm glad. Never expected this from Stunts myself.

I made one more.




You cannot view this attachment.
You cannot view this attachment. 

Title: Re: Stunts trials
Post by: mrdries on May 13, 2023, 10:00:54 AM
You can even jump from a pipe, over the water, back into a pipe. Pretty crazy stuff.  :)

I hope some people will make some challenging Stunts trials. I like playing those. One could make really pretty crazy tracks, you know. Mine are still somewhat basic. Challenging but... pretty doable. :)
Title: Re: Stunts trials
Post by: Daniel3D on May 13, 2023, 12:19:09 PM
I haven't tried yours yet. But I guess you can always make it more challenging with a slower car  8)
Title: Re: Stunts trials
Post by: mrdries on May 13, 2023, 04:29:24 PM
Trial 3 and 4 are possible with the Jaguar. Extra tricky.  8)

Oops... made one more... going back and forth 5 times along that long stretch of road, just to escape it. Had to try one jump beforehand. Pretty crazy...

Edit: There was a possible shortcut. Made a small correction and tested it again.



You cannot view this attachment.
You cannot view this attachment. 
Title: Re: Stunts trials
Post by: Cas on May 14, 2023, 05:13:22 AM
Very ingenious!
Title: Re: Stunts trials
Post by: mrdries on May 14, 2023, 08:30:19 PM
Thanks, man!

I might be running out of ideas. I made one more track. I called it TRIAL6. But I should have called it LIL_JOKE.  :)  Makes you go back and forth 4 times, including 2 times on the grassy strip between the roads. Really, really silly!  :)

Well, thanks anyhow, for letting me post all these tracks here. Perhaps this will be the last one for a while.




You cannot view this attachment.
You cannot view this attachment. 
Title: Re: Stunts trials
Post by: Cas on May 15, 2023, 06:14:20 AM
I'm feeling it might be possible to turn around on the boulevard without having to go to the end of the highway. I should give it a try
Title: Re: Stunts trials
Post by: mrdries on May 15, 2023, 10:01:45 AM
Yeah, I tried it with the Indy. Couldn't make it. Don't know if it's possible. Perhaps a car with a smaller turning radius. It has to be a fast car though. Barely made the jump at the end with the Porsche 962.
Title: Re: Stunts trials
Post by: mrdries on May 15, 2023, 03:27:30 PM
Well, okay. I have one more trick. Don't know if it's been done before.
Here is trial 7:



So, how to finish it as fast as possible? Seems very hard to make the jump at the beginning. Though you can take the road below. You go through the tunnels and through the pipes. And then the road splits.

If you take a left turn, you can finish but with a huge penalty time of more than 6 minutes.

So what if you didn't go left and go straight ahead instead? Well, all fine, you take a different road but you can't seem to cross the bridge. Though you can jump down on the dirt road. Now you can go through these tunnels and pipes once more. So what difference does that make?

Well, if you now take the left turn, you won't get the penalty time. Because, according to Stunts, you took a different road. Because you passed that little hill with the icy road before. So now you can go ahead and finish without penalty time.

So it's a way of letting you do the same road twice.

You cannot view this attachment.
You cannot view this attachment.
Title: Re: Stunts trials
Post by: Cas on May 17, 2023, 12:30:05 AM
Very interesting trick!  The logic of Stunts can sometimes appear very random
Title: Re: Stunts trials
Post by: mrdries on May 17, 2023, 10:54:43 PM
Thanks, I'm glad it worked. Sometimes it looks very random indeed.

I think I might make 10 trials in total. Still have a bit of trickery and unexpected stunts. Here is trial 8. A bit longer. Not easy.

I hope some people will play these later on in some competition or in some collection. It has been quite an exploration. Lots of things I didn't expect. Lots of fun little tricks that might be useful to someone that wants to design an unusual track.



You cannot view this attachment.
You cannot view this attachment. 
Title: Re: Stunts trials
Post by: dreadnaut on May 17, 2023, 11:38:31 PM
I quite enjoyed #8, thank you!
Title: Re: Stunts trials
Post by: Daniel3D on May 19, 2023, 08:32:14 AM
Still have to tryout this...
But since I am not very skilled. I think that I'll try with a motorcycle first..
Title: Re: Stunts trials
Post by: mrdries on May 19, 2023, 02:36:36 PM
Thanks! Glad you enjoyed it.  :)


Haven't tried the motorcycle myself. I'll have to try it myself. Don't think I'm that skilled myself. Had to give it lots of attempts to finish it.


As a side question, I noticed you can put blue formula 1 cars on the map as some kind of scenery. The Bliss software lets me do it. Though I drive through them.

Now, if I were to design a "car" that happened to be shaped like umm... a wall... could I put that wall on the map just like it's possible with those blue formula 1 cars?

I'd drive through it. But even then, if I could give that wall a grey color, it might look a little like mist. Taking away the visibility. Might look kind of cool. Though I'm not sure it's even possible to make a car as long as a tile.

And I forgot that other people would have to import that "car", in order to see it on their map...
Title: Re: Stunts trials
Post by: Daniel3D on May 19, 2023, 06:27:58 PM
The cars are connected to the player and opponent car that is selected.
Title: Re: Stunts trials
Post by: mrdries on May 19, 2023, 09:32:17 PM
Thanks, I looked over that.

Probably too weird to do. If I would be able to design a car that didn't look like a car but looked instead like... I don't know... a rock... And if that car had the lowest top speed and acceleration possible, then I could give my opponent this rock as a car and place rocks all over the terrain. Don't think I'll be doing that.
Title: Re: Stunts trials
Post by: mrdries on May 20, 2023, 04:21:07 PM
Okay, trial 9 is finished.


 
You cannot view this attachment.
You cannot view this attachment. 

I'm really out of ideas after all.
This will be the last one. Unless I could make new stunts by designing a new track element. Though if I understand it correctly, it's only possible to create new cars?
Title: Re: Stunts trials
Post by: Cas on May 20, 2023, 06:16:34 PM
As of now, with what we know, it's possible to create new track elements, but... you have to replace an existing element (cannot "add") and the physical model of it cannot change, so it's only the appearance that will.

We would like to find the trick to change physical models and maybe something we can tweak so we can add a few more slots for stunts. I think the second one is easier to find.
Title: Re: Stunts trials
Post by: mrdries on May 20, 2023, 10:09:33 PM
Okay. Yeah, seems so hard to discover how to do these things without the source code. Have no idea how that's even possible.

But I love the fact that there is a Stunts community. Really cool. Always loved this game too.
Title: Re: Stunts trials
Post by: Cas on May 20, 2023, 10:43:34 PM
It's not easy, but some things can be done. A lot of work came during the disassembly phase and then the ASM extraction analysis. I wasn't part of that. The idea was to begin translating all that to C, but very little of that was done. So what I've been doing with the folks more recently is working on the pure ASM code, guided by the remarks left by the guys that did the disassembly.
Title: Re: Stunts trials
Post by: mrdries on May 21, 2023, 09:34:55 AM
That's quite something. Very intriguing stuff. It's like deciphering Rosetta's stone.

I guess, if it were somehow possible, I suppose not, to put two track elements on the same location, you could have a pipe with the roof of a tunnel. Or a banked road on top of a highway.

If you could somehow switch slots, especially slots from landscape elements and track elements, you could have a road in the shift-F1 menu and since it would be a landscape element, you could put something on top. Though I'm sure that's not how it works.

Just changing colors from a track element or a landscape element, is kind of cool though. Like a light grey road or a dark brown bridge or a muddy hill. It may not look ugly or out of place.
Title: Re: Stunts trials
Post by: Cas on May 22, 2023, 09:13:14 AM
The issue here lies in how Stunts engine does rendering and physics during gameplay.

In my graphics engine, track grids are converted to a group of models that are placed at the right positions and with the right rotations to agree with the map, but in theory, the engine supports placing them at non-integer locations and with non-right angles and it's perfectly possible to put one on top of another. As you play, elements are rendered by distance at their designated positions.

But Stunts does not do it this way. It does still use the grid while rendering, so a tile remains a tile during the game and two elements cannot share a tile. This sets a limit to what we can do by tweaking, unless we found a way to separate these attributes.

Your suggestion of using terrain codes to render track elements does have a greater chance of working. I don't know where in the code terrain codes are resolved, but if I find that, I could have the engine look at codes beyond the currently available and load other graphic models. The physics models of these new elements, if the attributes (graphical and physical identity) are not split, would have to be, for example, all equivalent to plain grass at low level, but if we could split that, we could choose to assign any of the existing terrain models to the new graphical models. Then the only thing that would not work would be Stunts recognising them as part of the track, so we'd have to use a trick like your trials to actually use these elements, but it's still a pretty good thing!
Title: Re: Stunts trials
Post by: Daniel3D on May 22, 2023, 11:55:44 AM
If I understood and remember correctly the game builds a track tile in phases. First the terrain, then the track/scenery a road surface area and finally the collision model.
A terrain/track combination is connected to one or several collision models. But there are a limited number of possibilities.

The road surface code and collision models are not yet fully understood. And can't be changed as it is.
Title: Re: Stunts trials
Post by: mrdries on May 22, 2023, 03:19:13 PM
I see. I guess that if you could find the position of the physical properties of a normal straight road tile, within the code. And if you'd also find the physical properties of a muddy or an icy straight road within the code, then you could compare the code of these two tiles. And since the only physical difference of these two tiles, would be the traction of the road surface, then you might be able to figure out where this is determined within the code. And perhaps, how it works.

And perhaps then, you could change the traction of other track tiles too?

Though I'm sure, the real difficulty might be to locate the physical properties of a track element within the code.

Although, I suppose that the similarity of the F1, F2 and F3 tiles, normal, muddy and icy roads, would make the code of these tiles very similar. Almost like the tiles are repeated three times. So the code might also almost repeat itself three times? And thereby, it could expose its location? Just guessing.
Title: Re: Stunts trials
Post by: Cas on May 23, 2023, 08:14:45 PM
In my understanding, surface type is handled by Stunts as an attribute already separate from collision, which is handled via physical models based on two structures called "plan" and "wall". At some point of the source, it is hard-coded which track code leads to which combination of surface type, collision model and graphical model. If this place in the source is found (which surely has already been found when it was disassembled and analysed, so it must have labels and comments there), we could tweak this, but for a track element won, there's a track element lost.

An issue here would be that, if we change the collision model of a track code, it's logic circuit part correspondence will not change. So your track piece will continue to fit only in the same combinations as it used to fit before (except in trials-like tracks, of course).

Going back to graphical models and using terrain codes, I forgot to say the last time that Stunts works out terrain codes by applying a "special product" operator. That is, you take one terrain code and one track code and you obtain a new track code as a result. This is only done for track elements on the sides of hills. When there is water, the models are indeed both rendered. When there's something on top of a hill, it's elevation is updated and also, the hill model is rendered. This means that higher track values are often reserved for models of roads on the sides of hills.
Title: Re: Stunts trials
Post by: mrdries on May 23, 2023, 11:49:50 PM
Yeah, one track element won is one track element lost. That really sums it up.

Thanks for explaining. It's clearer now.

The only thing I can think of right now that might feasible and may have a significant impact, is to have a "concrete tile" in the terrain.
So that you could move over it, just like you would on a road.
It would have quite an impact on the game play, because it allows for a far greater diversity in the curves we take. Now, we take the curves that are determined by the different tiles, like a sharp corner or a big corner, etc. But it you would have a "concrete tile" or "asphalt tile", you would make different trajectories. If you have for example two tunnels and you'd have to drive through both of them, you could take a more diagonal path when driving from one tunnel to the next, which isn't always possible when you have to follow the existing tiles.
Of course, there would still need to be a road that would connect those two tunnels, unless for trials. But that would still be possible. You could connect them with roads and cut corners by driving on a concrete tile.
It may allow for other cool stuff, like driving close to a building when you're cutting a corner and such. So I really think it would make quite a difference in game play.
Though I guess that even including this one new terrain element, may result in the loss of another terrain element?
Title: Re: Stunts trials
Post by: mrdries on May 24, 2023, 01:46:18 PM
I know this is all very off topic, but one other idea, would be to use a brown terrain tile and a white terrain tile to simulate the effects of a muddy road or an icy road.

Probably complicated to do but if you had a white terrain tile with two parallel surfaces, a bit like the tunnel where you can drive in it and on it. But the difference between these two surfaces would be minimal. The tile itself would be slippery. If you'd have a road on it and if the track element as well as the terrain element would be active, you would see white spots on the road. That's the second surface of the terrain tile, slightly above the road. It has white spots so it appears that the road is icy. And you would drive on these white spots and they would be actually slippery, so the road becomes slippery.

All this would be to eliminate all the icy roads from the F3 menu.

The same could be done with the muddy roads.

So you'd have lots of new slots by using two terrain tiles like some kind of multiplier. And if you'd have lost terrain elements by doing so, perhaps they could be reinstated as track elements.

It would be like a Stunts mod.
Title: Re: Stunts trials
Post by: Cas on May 24, 2023, 10:28:38 PM
Well, as for a full-asphalt tile, the closest to that I know in Stunts, at least physically (not graphically) is the chicane, which works like a 2x2-tile full asphalt surface. Of course, it has one entry and one exit, but through the magic of "illusion", you can merge two of them and create a two-input/two-output such block.

The more I read about ideas like this, the more I wish I could crack the physical part of the engine or come up with a good idea of how to develop my own, because the graphical part is pretty much resolved.
Title: Re: Stunts trials
Post by: Daniel3D on May 25, 2023, 09:05:55 AM
I believe that surface effects are isolated from collision models and graphic models. So that would make full tile surface effects to replace grass the most feasible of all ideas. Also because there is room in terrain. Although also limited because they all share the same group of element ID.
Title: Re: Stunts trials
Post by: mrdries on May 25, 2023, 11:02:26 AM
Yeah, man... what can I say... I hope you do. Or I hope you guys do. I have this feeling it could be cracked.

Looks like a pretty cool achievement.
When there is room in terrain, you wouldn't even have a terrain element lost.
Title: Re: Stunts trials
Post by: Daniel3D on May 25, 2023, 12:13:00 PM
It a long way ahead. Even if llm, Duplode, CAS and I would each spend many hours a week on the matter, it may still take a few years.
Title: Re: Stunts trials
Post by: mrdries on May 25, 2023, 04:16:09 PM
Yeah, much harder than I thought.

Would it be any easier if you could 'copy' the chicane into the terrain code to make it into a 2x2 terrain element?
Title: Re: Stunts trials
Post by: Daniel3D on May 25, 2023, 06:53:05 PM
Quote from: mrdries on May 25, 2023, 04:16:09 PMYeah, much harder than I thought.

Would it be any easier if you could 'copy' the chicane into the terrain code to make it into a 2x2 terrain element?
I think that it is easier to use the hilltop.
Because that is a terrain tile with ground properties. If we know how ground properties are set we could maybe redirect that.
Off course it's also possible that it works the other way around. If no surface is set, then it must be ground/grass...
Title: Re: Stunts trials
Post by: mrdries on May 25, 2023, 10:23:46 PM
Hmm... I imagine that when there's some willingness to create some new track or terrain element, you'd want to start with something easier than this.

So just supposing for a moment that you'd want to create a Stunts mod, with your own track and terrain elements, as a side project. You don't have to care about deleting or modifying existing elements. You could do whatever you like. But you'd want to do more than just visual effects.

Would anything be somewhat straightforward?

Making a road wider?
Changing the grip of the road to whatever it might be?
Combining an icy road with the collision properties of road blocks?
Adding a sharp corner to an existing tile?
Deleting collision effects on a tile so that your car wouldn't crash?
Deleting the surface properties of a road but without deleting the road visually?

Just wondering.
Title: Re: Stunts trials
Post by: Duplode on May 26, 2023, 04:05:45 AM
Quote from: mrdries on May 24, 2023, 01:46:18 PMSo you'd have lots of new slots by using two terrain tiles like some kind of multiplier. And if you'd have lost terrain elements by doing so, perhaps they could be reinstated as track elements.

This is a very interesting idea! It would likely still be too hard to put in practice right now (changing the surface of a road depending on the terrain code would require adding a bit of code to the road element branch, and adding code is the bane of the assembly-poking techniques we've been using lately), but I think it's the approach with the highest chance of working under the current state of the art that I've heard of in a long while.

Quote from: mrdries on May 25, 2023, 10:23:46 PMWould anything be somewhat straightforward?

[1] Making a road wider?
[2] Changing the grip of the road to whatever it might be?
[3] Combining an icy road with the collision properties of road blocks?
[4] Adding a sharp corner to an existing tile?
[5] Deleting collision effects on a tile so that your car wouldn't crash?
[6] Deleting the surface properties of a road but without deleting the road visually?

Assuming we're limited to our current assembly-poking methods (because if we were to begin porting to C again, in principle everything is possible): #1, #3 and #6 should be straightforward. #2 doesn't seem feasible because the grip modifiers for the surfaces are on the car files, and not on the track element code. #4 wouldn't be difficult (just imitate what the game already does for splits), but the need to add code to the element branch would most likely be a blocker. #5 should be possible, but not straightforward, in particular because there are multiple types of crash (for instance, crashes against walls are handled differently from crashes against trees and other 3D objects).

(By the way, on Restunts exploring: much of the physical model construction is laid out in seg004 (https://bitbucket.org/dreadnaut/restunts/src/master/src/restunts/asmorig/seg004.asm), and in particular build_track_object. While that's a big function, the code paths are relatively straightforward, and it is moderately well documented. Once upon a time I had made good progress in documenting its caller, update_player_state (https://bitbucket.org/dreadnaut/restunts/src/master/src/restunts/asmorig/seg001.asm#lines-849), which is crucial for understanding things like collisions, but then I lost my data (https://forum.stunts.hu/index.php?msg=72215).)   
Title: Re: Stunts trials
Post by: Cas on May 26, 2023, 05:34:29 AM
I've been working with Daniel3D on the needle-colour mod, which, I think, is the first assembly-poking mod in Stunts. What I can tell you from having tried... and succeeded is this:

My first idea, something I predicted by taking a look at the code before touching anything, was that replacing a single word, a pointer, could allow for turning what previously was a constant (the needle colour) into a variable that could be pointed at a field in the car parameter structure. This change, we later made and worked perfectly, it was super simple and I can assure you, completely stable, but most modifications we will be interesting in making cannot be solved by changing a single word. We were lucky that this was the case.

Then, as an improvement, by injecting additional code, we set sail to try something active, that would allow for independently changing the colours of the two needles. This is something we made chiefly to demonstrate that it is possible to make effective mods by assembly code injection (or to fail miserably and prove myself wrong otherwise). It worked, but we had to add some nops to fix code alignment problems and while the code hasn't failed ever so far, we will never be 100% sure that it's stable. The same thing will happen with any code injection we make this way. We do it this way because we don't have the original source code. If we had it, it'd be a million times better to work on that source instead.

The best thing we can do with what we have, that is, before one day the whole code is ported to C or before I or somebody else can come up with a whole new engine, is, instead of making tons of code-injecting mods, make a single code-injecting "hub" that accepts external plug-ins. This way, there would be a single source of potential instability. This is akin to what Forge does on Minecraft, I guess. It's no easy work, but I think it should be done before mods begin to proliferate wildly :)
Title: Re: Stunts trials
Post by: Daniel3D on May 26, 2023, 12:32:41 PM
Or maybe rewrite the whole segment..
Title: Re: Stunts trials
Post by: mrdries on May 26, 2023, 03:33:58 PM
Thanks!

Yeah, I think I understand. Poking is possible but rather challenging. So you guys are looking for a better long term approach.

It's surprising how fun it would be to be able to play around with track elements.
I mean... road blocks in a tunnel with an icy road surface. :-)
Title: Re: Stunts trials
Post by: mrdries on May 26, 2023, 10:29:16 PM
Anyway, losing your code sucks. Used to program a little myself, had a backup... till it fell on the ground. Lost it all.

Best of luck to you all. It's pretty cool stuff. I'm going to download the alternative Indy colors.