News:

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

Main Menu

Recent posts

#91
Stunts Reverse Engineering / Re: Restunts repository - Git ...
Last post by llm - October 17, 2025, 04:24:38 PM
@dstien

are you interested in generators for the "magic" value tables?

creates the values for "Quarter-wave lookup table for sin_fast()"

    int16_t sine_table2[SIN_STEPS + 1];
    for (int i = 0; i <= SIN_STEPS; ++i) { // +1 for last 90 degree
        double angle = (M_PI / 2.0) * i / SIN_STEPS; // 0 .. Pi/2
        int16_t val = (int16_t)round(SIN_SCALE * sin(angle));
        sine_table2[i] = val;
    }

creates the values for "One-octant (45°) lookup table of the arctangent in 0x100 steps + the peak"

#define ATAN_STEPS 0x100      // 256 steps
#define ATAN_SCALE 128.0 / (M_PI / 4.0)  // map radians 0..Pi/4 --> 0..128

    std::vector<uint8_t> atan_table2(ATAN_STEPS + 1);
    for (int i = 0; i <= ATAN_STEPS; ++i) {
        double ratio = (double)i / ATAN_STEPS;       // x/y ratio, 0..1
        double angle = atan(ratio);                  // radians, 0..Pi/4
        uint8_t val = (uint8_t)round(angle * ATAN_SCALE);
        atan_table2[i] = val;
    }

and math.h based implementations that scale to the integer range of the original routines

    int16_t int_atan2(int16_t x, int16_t y)
    {
        if (x == 0 && y == 0) return 0;
        double ang = atan2((double)x, (double)y);
        int16_t v = round(ang * 512.0 / M_PI);
        if (v > 512) v = 512;
        if (v < -511) v = -511;
        return v;
    }

and

    int16_t int_sin(uint16_t angle) {
        double radians = angle * M_PI / 512.0;  // 10-Bit angle -> 0..2Pi
        return (int16_t)(sin(radians) * SCALE + 0.5);   // rounded
    }

with a maximal error of 1 (which is still more correct but not exact as stunts implements it)
#92
Season's chat - R4K / Re: 2025 - Guest tracks - R4K
Last post by Spoonboy - October 16, 2025, 09:51:12 AM
Hi @KyLiE, I won't have the chance to make a track this time, but @stanceboyCZ sounded like he was keen.
#93
Stunts Reverse Engineering / Re: Restunts repository - Git ...
Last post by Matei - October 15, 2025, 11:04:39 PM
Another thing:

Quote from: Daniel3D on October 10, 2025, 09:20:31 PMthere are several kind of people who fly planes at my club.
Two main groups are,
* those who built a plane piece by piece, cut and glue and paint for months to get is just the way they want..
And
* Those who buy a whole plane, mod it and go flying.

With the physics I did both:

https://matei.one/ - Open Dynamics Engine

If I hadn't used Open Dynamics Engine first, I would have never known how to do this:

https://matei.one/idxscr.html - my functions

Which I didn't do so much because I absolutely wanted to do it myself, but because I couldn't get the interactions with triangles to work properly with Open Dynamics Engine.
#94
Chat - Misc / Re: Football Fanats 2025
Last post by Akoss Poo a.k.a. Zorromeister - October 15, 2025, 10:14:52 PM
One of the best performances of the Hungarian national football team I've ever seen,

Yesterday:

Portugal - Hungary 2-2,

even if scoring the equalizing goal just before stoppage time, it must have been noted that there were at least one (or even two) situations where a penalty should have been awarded for our team because of Portuguese handball. We also hit the post once, however, the opponent did so twice.

It was a great game, nevertheless - and congratulations for our goalie, Balázs Tóth, who played earlier for Kazincbarcika and born in Zubogy, a nearby village in my county.

Even if we clinch the second spot in our group, a very hard playoff will await our team, where our chances are not too big. And saying a big thank you to FIFA, several teams weaker than Hungary from other federations will qualify - if there are 48 teams, why there aren't more European teams instead of chanceless teams mostly from Asia and Africa???!!!
#95
Season's chat - R4K / Re: 2025 - Guest tracks - R4K
Last post by KyLiE - October 15, 2025, 02:28:14 AM
@Spoonboy and @stanceboyCZ, can you please confirm who will be designing the track for the November race?
#96
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
#97
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
#98
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 :)

#99
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)
#100
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.)