News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu

Other games?...

Started by Matei, February 05, 2024, 02:39:31 PM

Previous topic - Next topic

Cas

Quote from: Matei on February 11, 2024, 09:37:24 AMHas anyone noticed that Romania rhymes with Trackmania?
;D

Yes, I was able to compile your program. It was the viewer that I saw I had to compile and didn't have the energies to do that, ha, ha.

But yes, I've been looking at the models in Stunts previously many times and they are not very "diplomatic". What I mean is, one would normally make a rendering engine with its quirks, but would try to make sure it can render mostly everything that's well-behaved in the expected manner. At the same time, whoever designs the models would try to make them well-behaved, so that the special quirks of whatever rendering engine will not bring their personality up to view. Instead, only what the renderer has in common with every other renderer will be seen.

This is not the case with Stunts. Models exploit the engine quirks with complete impunity. So then, when you try to render them with something else, you're bound to see some differences. There's a flag for rendering bias. It clearly serves that purpose, but it's not clear how. Many triangles are unnecessarily 2-sided. Line segments are used sometimes directly attached to walls (like inside tunnels or at the Joe's sign), which is problematic because they can't be 1-sided, as they have no "normal", so it's impossible to sort them against the background surface. So it's either guess how the original engine handles these quirks and do exactly the same or simply recreate some models to avoid this. The only thing I've seen that Stunts models do well is I've never seen a concave polygon in any of the built-in models. Great, because it's not clear how they should be rendered to look the same as they would in Stunts.
Earth is my country. Science is my religion.

Matei

The models are easy to fix, but I will do it after everything else is finished. If you have at least a Pentium 4 CPU, we can leave all triangles "2-sided" without any problem. I just sent you another file. If you can give me a program that converts the track into a text file with the positions and rotations of all models, that's all I need.

Cas

2-sided triangles can be drawn anyway, but it's a waste of CPU. Having 1-sided triangles helps in sorting when using a Painter's Algorithm. I think even if the machine can handle it, it's bad practice to use 2-sided for PA when it's not needed. For Z-buffer, of course, this doesn't matter much. I would like to implement Z-buffer myself. I had also thought of dynamic material shading. This is, that the same material will look a little brighter or darker depending on the orientation of the car. This would look great, but I have to do some good tests with vector products and I'm feeling too lazy for that.

For the whole track, it's more work to do the reverse-rendering. Most of what you have to do is just placing the objects in the grid, but some track elements do get transformed.

Do you do the actual Z-buffer and then just tell SDL to draw the result or does SDL do the Z-buffer?  Right now, I think I'd concentrate more on solving the physics problem, then maybe I can try to improve the graphics. For rendering, I have a little problem with near clipping. It becomes more clear when rendering a race from inside the car.
Earth is my country. Science is my religion.

Matei

#33
Do you want to drive on the track or not? You already made a program that renders it. I need a file which looks like this:

objtypes n
name_1
name_2
...
name_n

objects m
o_1 x y z rot
o_2 x y z rot
...
o_m x y z rot

where name_j can be the model's name or number (anything by which I can identify it), o_i is the model number from the first list (1 < o_i < n), x, y and z are the coordinates of the track element and rot is the horizontal rotation, which you can write anyway you want, I'll figure it out. What you already did seems much more difficult than that. 1-sided triangles can be solved later.

[edit]
About "Do you do the actual Z-buffer and then just tell SDL to draw the result or does SDL do the Z-buffer?":

https://sourceforge.net/projects/simple3d/

"images can be displayed with SDL-1.2, SDL-2, or saved in a *.bmp file;"
[/edit]

Matei

Edsger Dijkstra:

QuoteIt is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.

BASIC is not so bad for 8-bit computers, though. I used it a little. Mr. Linus Torvalds also has something to say about the C language:

https://matei.one/gnlx.html#start

Daniel3D

Quote from: Matei on February 11, 2024, 09:37:24 AMHas anyone noticed that Romania rhymes with Trackmania?...
Hahaha, no. We do know that there was a French stunts remake being made called "STUNTS Mania" . His last update post was about solving a physics issue. Not long after he went silent Track Mania was launched.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Matei

#36
It must be a coincidence, because Trackmania doesn't have any physics. Or maybe he didn't solve it and gave up. I played with a gratis version a little, more than 10 years ago. Not very good, but it had some nice ideas in it, like the track suspended over the ground, which greatly simplifies track editing for the programmer(s).

Daniel3D

#37
It has very different arcade like physics indeed. But it has the same replay system, the first version lacked stunts but had all other stunts track elements and asphalt or dirt road variations. It has a single player time trial just like STUNTS.
I had the original TM, it's very difficult to find online, but I believe it even had different cars...

Found a video of it
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Matei


Daniel3D

Quote from: Matei on February 12, 2024, 05:42:48 PMDethKarz and Pod were better than any version of TrackMania.

https://en.wikipedia.org/wiki/POD_(video_game)
Obviously...
I love POD, it one of the few games I still have the disk from.. (somewhere)..
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Matei

I no longer have the disk with POD (Gold), but I remember it, it was the first CD with games that I got. It also had Need for Speed II SE, Quake II, Tomb Raider III, Mortal Kombat 4 and Unreal on it. A file in Mortal Kombat 4 contained a virus called Win95 CIH, but I found it before it caused any serious problems. After I got rid of the virus, Need for Speed III also started to work, but that was from another disk, obviously.

Cas

#41
I'm reading my code to try to find the best way to create that output text file. There are some complications. Stunts applies some transformations to ramps when they're on a hillside. This isn't represented anywhere in the shape files. My engine does it on-the-fly. I can hook on the LoadTrack function and generate a text file with the position of the elements and their rotations, but sometimes, there will be an element that's a processed ramp. It's not trivial. I guess you could sort this up by actually developing the transformed shape and load it separately.

EDIT: Here it is. I'm uploading it. It's not exactly the same format, but should be pretty straightforward.
Earth is my country. Science is my religion.

Matei

And now that all the technical details are solved, thanks to Mr. Cas, I must mention that I already have replacements for many of the 3D models found in Stunts. If we replace all of them, we will have a 100% free (as in freedom) game with hundreds of tracks already available. It won't be like Stunts, but that's the idea, because there's no point in having 2 identical games anyway. The models which compose the terrain are made of 1 or 2 triangles, so we can keep those and, of course, the option to use tracks with the original models will still exist. I will eventually do it myself anyway.

alanrotoi

Is it possible to export the cars to another game?

Matei

#44
Only the 3D models, but I have enough of those, some made by me and some which I took from TORCS. Have you looked at my games?

Quick Reply

Name:
Email:
Verification:
Please leave this box empty:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
Who won the 2023 season of ZakStunts?:
Shortcuts: ALT+S post or ALT+P preview