GoldenEye: Source Forums

  • December 03, 2020, 05:28:46 pm
  • Welcome, Guest
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: 4.2.3 RC1 & 4.2.2: HUD Message's colour fades when it's overwritten.  (Read 1602 times)

0 Members and 1 Guest are viewing this topic.

Joe

  • Secret Agent
  • **
  • Posts: 139
  • Reputation Power: 54
  • Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.
  • Offline Offline

This bug doesn't occur when the HUD message's colour is a pure colour (I tested the pure colours with their alpha = 0).

To test this bug, add the following code to the Death Match script and then repeatedly press the voodoo key when playing it, the HUD message's colour will become white after several presses of this key:
Code: [Select]
test = 0

def OnPlayerSay(self,player,text):
if text == "!voodoo":
GEUtil.HudMessage(None,"test:" + str(DeathMatch.test),-1,-1,GEUtil.Color(100,184,234,255),GERules.GetRoundTimeLeft(),1)
DeathMatch.test += 1
« Last Edit: June 01, 2013, 07:56:22 am by Joe »
Logged
Free games:FPS + RTS: Renegade X & Battlezone 1.5,RTS: 7 Kingdoms & Open Red Alert, TBS:Hedgewars, playcatan.com & www.wesnoth.org

killermonkey

  • GES Programmer
  • Retired Lead Developer
  • GE:S Fanatic
  • *
  • Posts: 5,474
  • Reputation Power: 346
  • killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!
  • Offline Offline
    • DroidMonkey Apps
Re: 4.2.3 RC1 & 4.2.2: HUD Message's colour fades when it's overwritten.
« Reply #1 on: June 01, 2013, 01:37:29 am »

Alpha 0 is used as a flag in the backend to ignore the color. Don't test with alpha 0. Pure color is alpha 255
Logged

Joe

  • Secret Agent
  • **
  • Posts: 139
  • Reputation Power: 54
  • Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.
  • Offline Offline
Re: 4.2.3 RC1 & 4.2.2: HUD Message's colour fades when it's overwritten.
« Reply #2 on: June 01, 2013, 08:01:23 am »

When I said this bug didn't happen when the HUD message used a "pure colour" I was referring to the colours: (255,0,0) (0,255,0) and (0,0,255).

Changing the alpha value from 0 to 255 hasn't prevented the colour from fading in this code's HUD message, I've also tried 220:
Code: [Select]
test = 0

def OnPlayerSay(self,player,text):
        if text == "!voodoo":
            GEUtil.HudMessage(None,"test:" + str(DeathMatch.test),-1,-1,GEUtil.Color(100,184,234,255),GERules.GetRoundTimeLeft(),1)
            DeathMatch.test += 1
« Last Edit: June 01, 2013, 08:04:00 am by Joe »
Logged
Free games:FPS + RTS: Renegade X & Battlezone 1.5,RTS: 7 Kingdoms & Open Red Alert, TBS:Hedgewars, playcatan.com & www.wesnoth.org

killermonkey

  • GES Programmer
  • Retired Lead Developer
  • GE:S Fanatic
  • *
  • Posts: 5,474
  • Reputation Power: 346
  • killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!
  • Offline Offline
    • DroidMonkey Apps
Re: 4.2.3 RC1 & 4.2.2: HUD Message's colour fades when it's overwritten.
« Reply #3 on: June 02, 2013, 09:29:05 am »

Wow, awesome catch! I have fixed this now as well... problem was the messages were not "overwriting" the previous ones on the same channel. Thus the colors stacked up on each other. Pure colors didn't go to white since their color component was already 255. The whiteness is actually an artifact of drawing the same message over several times.
Logged

Troy

  • GE:S Coder
  • 00 Agent
  • ***
  • Posts: 822
  • Reputation Power: 260
  • Troy is awe-inspiring!Troy is awe-inspiring!Troy is awe-inspiring!Troy is awe-inspiring!Troy is awe-inspiring!Troy is awe-inspiring!Troy is awe-inspiring!Troy is awe-inspiring!Troy is awe-inspiring!Troy is awe-inspiring!Troy is awe-inspiring!Troy is awe-inspiring!
  • Offline Offline
Re: 4.2.3 RC1 & 4.2.2: HUD Message's colour fades when it's overwritten.
« Reply #4 on: June 02, 2013, 12:53:52 pm »

I knew it did this when you omitted a channel, but I didn't know it did this if you defined a channel.  Definately shouldn't overlap then.
Logged
Complete - Arsenal, One Bullet is Enough, Tournament DM v2, TurboDM
Defunct - Agent Under Fire
VC - Being such a dick, KM must be stroked before springing into action.

Joe

  • Secret Agent
  • **
  • Posts: 139
  • Reputation Power: 54
  • Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.
  • Offline Offline
Re: 4.2.3 RC1 & 4.2.2: HUD Message's colour fades when it's overwritten.
« Reply #5 on: June 09, 2013, 04:13:59 am »

Wow, awesome catch! I have fixed this now as well... problem was the messages were not "overwriting" the previous ones on the same channel. Thus the colors stacked up on each other. Pure colors didn't go to white since their color component was already 255. The whiteness is actually an artifact of drawing the same message over several times.

Thanks for fixing this bug.
Logged
Free games:FPS + RTS: Renegade X & Battlezone 1.5,RTS: 7 Kingdoms & Open Red Alert, TBS:Hedgewars, playcatan.com & www.wesnoth.org
Pages: [1]   Go Up