News:

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

Main Menu

Dissecting the Stunts files, trying to. Anyone know more?

Started by Cyberman, July 23, 2004, 08:15:12 PM

Previous topic - Next topic

Duplode

Quote from: BonzaiJoe on May 02, 2009, 01:55:44 PM
I think the bottom one looks more familiar to me. Only it's a bit more grainy than usually. Lower graphics acceleration level?

Quote from: Chulk on May 02, 2009, 08:05:27 PM
Exactly my thoughts (in DOSBox)

Hmmm, that's... surprising, at least for me. The difference between the images is aspect ratio, which is 8:5 (as in 320x200) on the first set and 4:3 (as in 320x240) on the second. DOSBox switched from 8:5 (like I used to play) to 4:3 on setting the "aspect=true" option on the configuration file. Results are somewhat ambiguous. Using 4:3, some bitmaps (such as the main menu road signs and some of the round speedometers) become visibly vertically stretched, but on the other hand the steering wheels look much rounder and the original cars suddenly look much better:

(before, at 8:5...)



(...and after, at 4:3)



In fact, if you are running at 8:5 and try to measure (with a desktop ruler) the pixel dimensions of the car when seen from above, from behind and laterally, you'll realize the measurements on each perspective do not match! Changing the aspect ratio makes most cars a lot more proportional, as you can see in the pics... except for the Skyline: since I ignored dstien's advice to multiply the vertical coordinates by 0.833 (because I though Stunts was at fault, and not my design or my settings), now it looks like a skidding war tank with the correct aspect ratio - to the point I'm starting to consider a bugfix release... :-X I feel a bit silly now for taking so long to realize there was something wrong. Anyway, the main point is that DOSBox users should test the 'aspect=true' setting (if they're not using it already) and see if they get better results - I guess that will be the case.

Overdrijf

I had completely missed that while looking at these pictures, but yes, it's a known effect. My kart is going to be sort of designed for that. Stunts itself renders the screen as 320*200, but stretches itself to 640*460.

dstien

Just upgraded to DOSBox 0.73. Aspect ratio in Stunts is now 4:3 using the new svga_s3 graphics mode (default out of the box).

Duplode

Quote from: dstien on May 28, 2009, 02:28:41 PM
Just upgraded to DOSBox 0.73. Aspect ratio in Stunts is now 4:3 using the new svga_s3 graphics mode (default out of the box).

Oh, that is very good, thanks for making us aware! But it also means there will be a bugfix release for Skyline soon - I can't accept that 90% of the users will have it as tall as a Hummer...

Overdrijf

I have discovered something (okay, only sort of, but still). Can you imagine, me?

To explain what I'll start by quoting the wiki:
QuoteText data
Car information
Data type: Zero-terminated character strings

Address: 32Eh - ???h

Quoting Lukas Loehrer directly:

Car information displayed on the 'choose your car' screen. Use ] (5Dh) for linebreaks. The end of this block can not be given by an absolute address. Look for a byte with the value 00h. It is followed by a 4 byte long car id which is again terminated by a 00h.
The "4 byte long car id" mentioned above is the abbreviation displayed alongside opponent name in the scoreboard. Car information is most conveniently edited via Car Blaster, which has a specific WYSIWYG interface for dealing with it.

Scoreboard car name
Data type: Zero-terminated character string

Address: ???h - EOF

The final bytes of the file (after the terminating 00h mentioned above) make up the scoreboard designation of the car. It can be edited via Car Blaster like the other text pieces as well.

This information is incomplete. It's possible that the end of the information text is identified by a 00h, but the beginning of the "opponent abbreviation" as well as the beginning of the car name are identified by an adress. The position of the abbreviation is identified by the last address in the first 25h bytes, the position of the car name by the second to last address. Both are 25h smaller than the actual value, meaning the adress points at where to be from after the first 25h bytes. Now I'm pretty sure that anyone who worked on carblaster or something similar would already know this, but I still find it pretty cool I discovered something the wiki didn't know yet. ;)

Duplode

Quote from: Overdrijf on August 26, 2010, 05:03:01 PM
This information is incomplete. It's possible that the end of the information text is identified by a 00h, but the beginning of the "opponent abbreviation" as well as the beginning of the car name are identified by an adress. The position of the abbreviation is identified by the last address in the first 25h bytes, the position of the car name by the second to last address. Both are 25h smaller than the actual value, meaning the adress points at where to be from after the first 25h bytes. Now I'm pretty sure that anyone who worked on carblaster or something similar would already know this, but I still find it pretty cool I discovered something the wiki didn't know yet. ;)

Yup, those are the resource "pointers" on the file header, which actually set where the text pieces should start. The 00h is a legacy of C programming, in which all text strings are terminated by the "null character" 00h byte. In fact, I guess that even if you change the header addresses to extend some of these text fields the string will still end at the 00h unless it is removed...

Overdrijf

Quote from: Duplode on September 01, 2010, 02:40:42 AM
Quote from: Overdrijf on August 26, 2010, 05:03:01 PM
This information is incomplete. It's possible that the end of the information text is identified by a 00h, but the beginning of the "opponent abbreviation" as well as the beginning of the car name are identified by an adress. The position of the abbreviation is identified by the last address in the first 25h bytes, the position of the car name by the second to last address. Both are 25h smaller than the actual value, meaning the adress points at where to be from after the first 25h bytes. Now I'm pretty sure that anyone who worked on carblaster or something similar would already know this, but I still find it pretty cool I discovered something the wiki didn't know yet. ;)

Yup, those are the resource "pointers" on the file header, which actually set where the text pieces should start. The 00h is a legacy of C programming, in which all text strings are terminated by the "null character" 00h byte. In fact, I guess that even if you change the header addresses to extend some of these text fields the string will still end at the 00h unless it is removed...
It appears to do so, it terminates at a 00h, but I still found it to be quite annoying having the name on the scoreboard being stuff like ]prize etc etc, so I was pretty happy about finding the address. :)

CTG

Is it possible to place the rev meter outside of the steering wheel's "hole"?

Duplode

Quote from: CTG on November 08, 2012, 03:51:37 PM
Is it possible to place the rev meter outside of the steering wheel's "hole"?

I have not tried it myself, but it must be possible. The rev meter and speedometer coordinates are relative to the coordinates of the ins2 bitmap, so if you place that outside the steering wheel hole the meters should follow accordingly.

CTG

Quote from: CTG on October 13, 2008, 09:23:55 AM
Laika, LOL! (poor dog) ;D Lada 2105 was one of the most common cars in Hungary in the late 80's - early 90's and it's still quite popular. No surprise, we used to be a communist country... By the way it was the best car available for the Eastern European block, maybe only Skoda 120 (another target of my Stunts car designing ambitions ;D) was on the same level.

OFF-TOPIC:

Most of the communist cars disappeared in the last 4-5 years. I tried to monitor the traffic this morning during the usual 30 minutes travel to work and only 7 cars from about 1000 were from that era: 2x Wartburg 353 (4 stroke upgrade ;D), Lada Niva, Skoda 120, Polski Fiat 126, Zil 130 (truck) and a Trabant 601 wreck without wheels. And of course Ikarus 260, but I'm not sure if they are older than 22 years or not (they were produced even in the 90s).

Overdrijf

Quote from: Duplode on November 09, 2012, 12:44:46 AM
Quote from: CTG on November 08, 2012, 03:51:37 PM
Is it possible to place the rev meter outside of the steering wheel's "hole"?

I have not tried it myself, but it must be possible. The rev meter and speedometer coordinates are relative to the coordinates of the ins2 bitmap, so if you place that outside the steering wheel hole the meters should follow accordingly.

This comes a bit late probably, but I have tried this, it works without a hitch. It might be a different matter if you try to take only the rev meter out while leaving the speedo in, but together with the extra sprites that help change/partially cover the meters when the wheel turns it should be doable. ins2 will become big, but as long as you can find the right mystery bites...