ddnet/src
Robert Müller dcd86cb873 Use golden angle to generate unique, distinct DDTeam colors
The DDTeam colors were previously generated in HSL by taking the team index and multiplying it by 360/64° to calculate the hue, which results in team colors being evenly distributed over the entire color range like a rainbow. However, this causes colors of adjacent teams to be very similar and therefore hard to distinguish.

Now, the hue is calculated by multiplying the team index with the golden angle (~137.50776°) and taking the modulo 360° of that. Due to the properties of the golden angle, this can generate never repeating sequences of unique colors where the adjacent colors are very distinct.

Duplicate code is reduced by adding the `CGameClient::GetDDTeamColor` function.
2023-09-13 18:56:47 +02:00
..
android Add tests for overloaded hash operators, use operator instead 2022-11-12 20:36:38 +01:00
antibot Allow antibot to record data into teehistorian 2023-08-25 14:26:09 +02:00
base Fix typos 2023-09-05 22:32:09 +03:00
engine Disable scissor for clearing the framebuffer 2023-09-10 09:44:32 +02:00
game Use golden angle to generate unique, distinct DDTeam colors 2023-09-13 18:56:47 +02:00
macos Huge variable naming format 2022-07-08 18:01:29 +02:00
masterping Add tool to manually ping the mastersrv 2022-12-29 12:50:24 +01:00
mastersrv mastersrv: Go to RawValue directly 2023-09-08 11:03:07 +02:00
rust-bridge Fix being run from rust-analyzer with a clean environment 2022-11-09 15:09:42 +01:00
steam Replace all usages of C standard headers with C++ headers 2023-03-01 19:26:51 +01:00
test teehistorian: Omit "prev_game_uuid" instead of setting it to null 2023-08-27 16:11:45 +02:00
tools Add CImageInfo::PixelSize function, use enum EImageFormat 2023-09-03 20:40:28 +02:00