Alternate Player Color Randomizer

For developmental things relating to the graphics of the game.
Post Reply
User avatar
sinewav
Graphic Artist
Posts: 6413
Joined: Wed Jan 23, 2008 3:37 am
Contact:

Alternate Player Color Randomizer

Post by sinewav »

I had an idea for something similar to PLAYER_RANDOM_COLOR, but a different application. The current code tries to find a player color unlike the other bikes in the server, then it stays there. It takes a couple rounds, but you usually end up with the color mauve. (Previously identified) That's not really random at all.

What I'm thinking is a function to randomize your bike's color once per execution. Don't like what came out? Randomize again. Make a true color randomizing tool, unlike the current one which is totally useful (actually essential) in team games, but should be renamed to something more appropriate.
User avatar
Light
Reverse Outside Corner Grinder
Posts: 1667
Joined: Thu Oct 20, 2011 2:11 pm

Re: Alternate Player Color Randomizer

Post by Light »

If you know how to add a command, it should be pretty easy if you compare it to the color_r/g/b_# command. If it's in the client, I was unable to find it, though I'm pitiful at C++ so it could have been right in front of my face.

rand() % 48 for r/g/b would give ability to have multi-colored tails w/ diff color bike
rand() % 32 for chance of diff color / bike
rand() % 16 for regular colors

I'm assuming there's a premade function to set the colors, so it should be an easy add for someone who knows where.

Like I said though ... this is just an assumption. I don't know for sure.
Post Reply