News:

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

Main Menu

Recent posts

#91
Chat - Misc / Re: Association game
Last post by alanrotoi - October 18, 2025, 09:07:35 PM
Manowar
#92
Chat - Misc / Re: Association game
Last post by MiDiaN - October 18, 2025, 06:51:30 PM
Brothers
#93
Chat - Misc / Re: Association game
Last post by Mortimer Macmire - October 18, 2025, 04:40:05 PM
Blues
#94
Chat - Misc / Re: Association game
Last post by Duplode - October 18, 2025, 04:12:50 PM
Summertime
#95
Chat - Misc / Re: Association game
Last post by dreadnaut - October 18, 2025, 03:53:30 PM
Sadness

You cannot view this attachment.
#96
Chat - Misc / Re: Association game
Last post by CTG - October 18, 2025, 03:20:24 PM
Mriya
#97
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)
#98
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.
#99
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.
#100
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???!!!