Soldak Home   Drox Operative   Din's Curse   Depths of Peril   Zombasite  

Go Back   Soldak Entertainment Forums > News > News/Blog comments
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
  #361  
Old 12-19-2011, 12:28 PM
Shadow's Avatar
Shadow Shadow is offline
Super Moderator
 
Join Date: Jun 2007
Location: Dallas, TX
Posts: 10,130
Default

It's amazing how many things I can accidentally break by introducing 1 perfectly innocent looking line of code.
__________________
Steven Peeler
Designer/programmer
Depths of Peril, Kivi's Underworld, Din's Curse, Drox Operative, Zombasite, Din's Legacy, Drox Operative 2, & Din's Champion
Wishlist Din's Champion
Reply With Quote
  #362  
Old 12-19-2011, 12:54 PM
Roswitha Roswitha is offline
Elite
 
Join Date: Nov 2008
Posts: 697
Default

Can I ask what the line of code was?
Reply With Quote
  #363  
Old 12-19-2011, 03:54 PM
Shadow's Avatar
Shadow Shadow is offline
Super Moderator
 
Join Date: Jun 2007
Location: Dallas, TX
Posts: 10,130
Default

Quote:
Originally Posted by Roswitha View Post
Can I ask what the line of code was?
Of course. The offending line was:
setAlpha( databaseEntry->getFloatValue( "Alpha" ) );

This just sets the alpha value for an entity based on the value in its database entry. Looks and sounds perfectly ok doesn't it?

Too bad if a value in the database isn't specified it defaults to 0. So all of a sudden half of the objects in the game disappeared and effects would show up late, flicker, or never show up.
__________________
Steven Peeler
Designer/programmer
Depths of Peril, Kivi's Underworld, Din's Curse, Drox Operative, Zombasite, Din's Legacy, Drox Operative 2, & Din's Champion
Wishlist Din's Champion
Reply With Quote
  #364  
Old 12-19-2011, 03:59 PM
Bluddy Bluddy is offline
Legend
 
Join Date: Jan 2011
Posts: 2,062
Default

So the correction is just

if (databaseEntry->contains("Alpha"))
setAlpha(databaseEntry->getFloatValue("Alpha"));
else
setAlpha(1.0);

(tabs aren't showing up for some reason)
?
Reply With Quote
  #365  
Old 12-19-2011, 05:29 PM
Shadow's Avatar
Shadow Shadow is offline
Super Moderator
 
Join Date: Jun 2007
Location: Dallas, TX
Posts: 10,130
Default

I could have done that but in this case I only needed that line of code for one thing so I moved the alpha value into the shader instead.
__________________
Steven Peeler
Designer/programmer
Depths of Peril, Kivi's Underworld, Din's Curse, Drox Operative, Zombasite, Din's Legacy, Drox Operative 2, & Din's Champion
Wishlist Din's Champion
Reply With Quote
  #366  
Old 12-19-2011, 06:13 PM
Shadow's Avatar
Shadow Shadow is offline
Super Moderator
 
Join Date: Jun 2007
Location: Dallas, TX
Posts: 10,130
Default

This kind of goes with my last thing, but sometimes I wish I had another programmer to blame bugs on
__________________
Steven Peeler
Designer/programmer
Depths of Peril, Kivi's Underworld, Din's Curse, Drox Operative, Zombasite, Din's Legacy, Drox Operative 2, & Din's Champion
Wishlist Din's Champion
Reply With Quote
  #367  
Old 12-20-2011, 03:03 PM
Shadow's Avatar
Shadow Shadow is offline
Super Moderator
 
Join Date: Jun 2007
Location: Dallas, TX
Posts: 10,130
Default

by seeing this post you agree to not sue Soldak or join any class action lawsuits against us (this is a joke of course
__________________
Steven Peeler
Designer/programmer
Depths of Peril, Kivi's Underworld, Din's Curse, Drox Operative, Zombasite, Din's Legacy, Drox Operative 2, & Din's Champion
Wishlist Din's Champion
Reply With Quote
  #368  
Old 12-21-2011, 05:19 PM
PixelLord's Avatar
PixelLord PixelLord is offline
Elite
 
Join Date: Jul 2009
Location: Dallas, TX
Posts: 635
Default

Quote:
Originally Posted by Shadow View Post
Of course. The offending line was:
setAlpha( databaseEntry->getFloatValue( "Alpha" ) );

This just sets the alpha value for an entity based on the value in its database entry. Looks and sounds perfectly ok doesn't it?

Too bad if a value in the database isn't specified it defaults to 0. So all of a sudden half of the objects in the game disappeared and effects would show up late, flicker, or never show up.
That was such a strange build to me. I didn't know it was only one line of code. I'd never have thought that line alone could cause disappearing objects AND the beam effects to show up late (oh, I bet the beam effects that I did see started on frame 6 or so instead of on entry). Anyway, you can't blame me for that! ...but there are a lot of other things you can blame me for.
__________________
Stephen A. Hornback
Reply With Quote
  #369  
Old 12-21-2011, 06:18 PM
Bluddy Bluddy is offline
Legend
 
Join Date: Jan 2011
Posts: 2,062
Default

Quote:
Originally Posted by Shadow View Post
by seeing this post you agree to not sue Soldak or join any class action lawsuits against us (this is a joke of course
This was a strange tweet until I read the Sony story and got the joke
Reply With Quote
  #370  
Old 12-21-2011, 06:19 PM
Bluddy Bluddy is offline
Legend
 
Join Date: Jan 2011
Posts: 2,062
Default

Quote:
Originally Posted by PixelLord View Post
That was such a strange build to me. I didn't know it was only one line of code. I'd never have thought that line alone could cause disappearing objects AND the beam effects to show up late (oh, I bet the beam effects that I did see started on frame 6 or so instead of on entry). Anyway, you can't blame me for that! ...but there are a lot of other things you can blame me for.
How do you guys share builds?
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 06:41 AM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2007 - 2024 Soldak Entertainment, Inc.