7 ms·
BTW, WRT projects using a lookup table... https://hg.hedgewars.org/hedgewars/file/tip/hedgewars/uSinTable.pas https://hg.hedgewars.org/hedgewars/file/tip/hedge
by capitainenemo 3y ago
BTW, WRT projects using a lookup table...
https://hg.hedgewars.org/hedgewars/file/tip/hedgewars/uSinTable.pas https://hg.hedgewars.org/hedgewars/file/tip/hedgewars/uSinTa...
I think there's even a github mirror someone made since that's where you were looking. Maybe a little out of date, but this is old code.
- capitainenemo 3y agooh... also, sine table isn't just a performance thing. Hedgewars does fixed point custom math for deterministic lockstep, so keeps the math simple and predictable on various compilers/hardware.
- nitwit005 3y agoThat's something I'd wondered about with games that require determinism. Seems fairly challenging to deal with for that sort of game.
- capitainenemo 3y agohttps://nicolas.brodu.net/en/programmation/streflop/index.html https://nicolas.brodu.net/en/programmation/streflop/index.ht... is apparently pretty reliable, but yeah, it's a big problem. Spring and 0AD both struggled with it too.
- deleted 3y ago[deleted]