News:

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

Main Menu

Recent posts

#81
Season's Chat - CCC / Re: an idea for 2025 Christmas...
Last post by stanceboyCZ - October 13, 2025, 03:27:04 PM
and CCC should have option to upload your own track and select one or multiple cars that are allowed
#82
Season's Chat - CCC / Re: an idea for 2025 Christmas...
Last post by stanceboyCZ - October 13, 2025, 02:51:10 PM
I'm glad you find the idea very suitable. Could you guys create any tracks and upload them here? Thank you.
 
 Your dearest stanceboyCZ
#83
Stunts Reverse Engineering / Re: Restunts repository - Git ...
Last post by llm - October 13, 2025, 09:53:36 AM
@dstien

do you test/compare 16- and 32bit (with wcl386 on DOS or even gcc/clang on Linux?) built results of the pure C functions tests?
to make clear that they give the same results

im currently doing wcl/wcl386 for dos,clang-32/64bit,msvc-32/64bit for windows and gcc/clang on linux builds for my simple test - thanks to your switch to "fixed-width integer" makes it easy to build the code, also using clang-tidy on it :)

#84
Competition 2025 / Re: ZCT291 - The Fjords
Last post by Shoegazing Leo - October 13, 2025, 03:13:24 AM
Digdin sou fjord (only brazilian maybe will understand)
#85
Stunts Reverse Engineering / Re: Restunts repository - Git ...
Last post by Duplode - October 12, 2025, 05:57:06 AM
Quote from: dstien on October 11, 2025, 03:22:42 PMDoes anyone remember some particular replays that has the "can't fast-forward" bug? If not, I guess we should be able to find them automatically. All competition replays are supposed to finish successfully, while a bugged run would either crash or never cross the finish line in repldump.

I have attached a collection of unstable replays, which I had assembled last time we were doing in-game experiments about this behaviour.

(Side note: While we have eventually settled on taking the fast-forward/repldump outcome as canonical, because it is the one that's consistent across machines, competitions at times were more liberal than that about unstable replays. That being so, the collection includes two examples of replays that can finish successfully on a straight in-game replaying but not on repldump: 13gutix.rpl and C232OVE.RPL.) 
#86
Stunts Reverse Engineering / Re: Restunts repository - Git ...
Last post by HerrNove - October 12, 2025, 12:31:38 AM
Quote from: dstien on October 11, 2025, 03:22:42 PM(The replay controls aren't redrawn on every frame, so printf debugging kinda works.)

This was a funny part in my writeup :) If you need something more sophisticated, I recommend intro_draw_text which does the job quite nicely (example)

If you are analysing conformance, I remind you that the ported `update_car_speed` is currently disabled because it leads to desyncs with respect to the original game.




#87
Stunts Reverse Engineering / Re: Restunts repository - Git ...
Last post by dstien - October 11, 2025, 03:22:42 PM
Quote from: llm on October 10, 2025, 02:00:01 PMax seems to be undefined if x and y = 0 in the asm routine

so the question is: does Stunts rely on this "random" behavior? and if - how to fake it in C?

clvn implemented this by just doing return result; before assigning any value to result. Since this type of randomness isn't portable, I did some (probably too brief) testing and determined that AX is always 0 in the game in these situations. But now that you brought it up I started wondering whether the case could be otherwise in certain circumstances. If I recall correctly, Stunts have a type of bug where a replay can't be fast-forwarded, because the simulation outcome is different than when it's played through, indicating that there's undefined behaviour that changes when the graphics code is involved. I did a repldump batch run on 100s of replays from the Zak Stunts archive, and it turns out that atan(0/0) happens frequently. But every occurrence that I tested in-game has AX=0, for example for @Duplode on ZCT289:

(The replay controls aren't redrawn on every frame, so printf debugging kinda works.)

Does anyone remember some particular replays that has the "can't fast-forward" bug? If not, I guess we should be able to find them automatically. All competition replays are supposed to finish successfully, while a bugged run would either crash or never cross the finish line in repldump.

Edit: Found a bunch of files don't register as finished in the last frame, but the only one I have confirmed with this behaviour so far is zct244/02-ROT.RPL. Haven't found any connection to atan(0/0) though. Looks like hitting water ends the joyride in the pure analysis, while the playback let the car continue straight over the surface.
#88
Stunts Reverse Engineering / Re: Restunts repository - Git ...
Last post by Matei - October 11, 2025, 03:11:12 PM
I always want the source code to compile it myself, so that single exe without dependencies, which has a lot of dependencies, is not very useful for me.

https://drv.nu/freebasic/building/freebsd/

Besides, I already used BASIC (for ZX Spectrum) and Pascal, so I know what we're referring to. Example:

https://matei.one/oprog.html

Click on "Power on", then on "Open" and select "Civil Engineering". JavaScript required, but the emulator and all the used files can be downloaded and used offline. Also, I wrote the BASIC program with Fuse, not when I was using a ZX Spectrum; I'm not that old.

I downloaded Cas's track viewer, it worked now and it's not actually that slow. How do I look up and down?
#89
Stunts Reverse Engineering / Re: Restunts repository - Git ...
Last post by llm - October 11, 2025, 10:00:40 AM
@Matei

CAS explained his views on third-parties serveral times over the years, he don't like (someway hates) 3rd-party dependencies (and the deployment/dependecy "burden" - he preferse tiny single exe builds without dependencies - like in the old times, 40 years ago) and FreeBasic is giving him an enviroment were he can get that and still be productive - its just the way he personally wants to do coding, and he wants to do it in a Basic-Language, and he wants the FreeBasic graphics interface - even if its nearly the same as SDL (its just a tiny fraction of less functions needed to get it running)

its clear for everyone that using third-parties, install and deploy them is just as normal in professional developing buisness as drinking water, writing non trivial multi-platform applications without third-parties just don't work anymore - you can do it but no one will pay you re-inventing wheels and consuming endless time doing it

maybe CAS does not work in professional software development, in a very small (lucky) niche were he could prevent using third-parties over a very long time or he choosed that way for his hobby-time - he chooses FreeBasic because it fits his needs fully out-of-the-box

it makes no sense to argue about it - he choose it for reasons we don't see as problematic as he do

but still, he creates nice tools for the community :-*
#90
Stunts Reverse Engineering / Re: Restunts repository - Git ...
Last post by Matei - October 10, 2025, 10:49:44 PM
Quote from: Cas on October 10, 2025, 10:28:15 PMBut programming for SDL feels very different to me from programming in a language. The library takes over and you really are no longer writing the graphics code.

Excuse me, but I wrote the graphics code with SDL more than you did in FreeBASIC.

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

You never looked at that. SDL has a little problem, however. It's at version 3 and if you didn't start with it at version 1 like I did, you might get some wrong ideas about it.