GoldenEye: Source Forums

  • March 28, 2024, 02:15:04 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 3819 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, 06:56:22 pm 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,473
  • 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, 12:37:29 pm »

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, 07:01:23 pm »

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, 07:04:00 pm 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,473
  • 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, 08:29:05 pm »

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: 821
  • 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, 11: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, 03:13:59 pm »

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