Message2752

Author jesusalva
Recipients
Date 2014-04-10.01:11:24
Content
EXPERIMENT: Playing with tux colors
==============================
INSTRUCTIONS:

In view.c:1980 change
		b = 0.2;
to
		b = 0.2 * Me.paralyze_duration;
======================================
TESTING

To test it, use the Emergency Shutdown skill on 2nd revision.
======================================
EFFECT

Tux will start purple, then as the time goes, it will be red and when it
oversaturate (be somewhat orange) the skill time will end and Tux will return to
normal.
===========================
THEORY

We will multiply 0.2 by the paralyzed duration, making Tux's color vary as the
time is decreasing, making easy to understand that the time is ending.
Experimental Table:
Paralyzed_Duration | Blue amount (0.2 * Paralyzed_Duration)
25.0 | 5.0
10.0 | 2.0
05.0 | 1.0
01.0 | 0.2
0.75 | 0.15
00.5 | 0.1
0.25 | 0.05
00.0 | 0.0

With this we conclude that we will have excessive blue at the start, making Tux
purple. Because values greater than 1.0 are ignored, Tux will remain purple util
the timer strikes 5 seconds. Then, blue will start fading away, giving a red
impression util 1 second left, Then blue will be lower than green and Tux will
start getting yellow, but before Tux strikes yellow (what is impossible because
green value is 0.2) the counter reaches 0 and the effect ends.

We can obtain the inverse by changing the multiplication to a division (instead
of purple - red - orange, orange - red - purple).
The same effect can be obtained changing the multiplication by a sum, but this
is not recommended. WARNING: subtraction is not supported!

NOTE: Utilizing
b=0.2 * (Me.paralyzed_duration/2);
Proved to be much better.

===========================
OTHER EXAMPLES
I got the yellow formula:
		g = 0.2 + (r+0.1);
		b = 0.2;
		r = 0.2 * (Me.paralyze_duration/2) + 0.5;
History
Date User Action Args
2014-04-10 01:11:25jesusalvasetmessageid: <1397092285.0.0.166909375146.issue338@freedroid.org>
2014-04-10 01:11:24jesusalvalinkissue338 messages
2014-04-10 01:11:24jesusalvacreate