Page 1 of 1

Laser with Bolt texture; Config parser reverts changes

Posted: Tue Feb 17, 2004 7:31 pm
by Legoguy
2 bugs that I would like to have confirmed...
(Linux, built from source)

1: All lasers, instead of having the apropriate laser beam texture, have the bolt (bullet) texture, therefore making a laser beam look like a super stretched bullet. Not good.

2: When checking config files, I found a lot of things commented out, such as

Code: Select all

#set laserTexture laser
. I uncommented these, reran BZFlag with no fixed laser. I go back to find that the config file had returned to it's previous state. This happened about 3 times before I set the permissions on the file to read-only, and the problem stopped, but I could not see any change at all. Maybe that variable isn't effective yet, and I'm stuck with a laser-bolt. I'll try recompiling and report back.

Posted: Wed Feb 18, 2004 12:37 am
by blast
What version of the source are you using? 1.10.4 or CVS? I've built the 1.10.4 source on Windows and haven't had a problem with that. Haven't got a Linux box set up with gcc yet, so I can't try to duplicate the problem. Did you modify the source in any way?

Posted: Wed Feb 18, 2004 1:07 am
by Legoguy
1.10.4 release and haven't touched the source. Maybe I'll just delete the folder and try it clean, but just recompiling it didn't fix it...I'm also a bit upset that configure doesn't actually use my CFLAGS and CXXFLAGS :?

But I'm pleased to report that, since I went through and changed all the makefiles by hand with my optimization flags, Windows can't beat my Linux FPS, in fact I get double on Linux (130 fps on HiX 2.0), I have a 128mb GeForce4 MX 440, newest kernel drivers from NVIDIA :)

Posted: Wed Feb 18, 2004 2:12 am
by blast
I'd love to go Linux, but it confuses my parents too much. ;) "What happened to the Start button?" lol

As for the problem, you could also try renaming the laser images for each team to like "<teamname>_laser2.png" and then changing the config to use laser2. You could also try compiling 1.10.2 source code and see if that works.

Not sure if this is releated, but the lasers in 1.10.4 (at least on Windows) are really hard to see. Is that how they are supposed to be? or could there be a link to this problem?

Posted: Wed Feb 18, 2004 7:55 am
by JeffM
my windows XP and linux system bith with GeForce FX cards run the exact same FPS. Perhaps your windows system isn't set up right.

or maybe it knows you hate it :)

Posted: Wed Feb 18, 2004 2:21 pm
by blast
Maybe his Windows install has V-Sync on and the Linux install doesn't.

Posted: Wed Feb 18, 2004 5:08 pm
by Legoguy
Neither have V-Sync on. Maybe it was just luck (or lack thereof), I'll try again next time I boot Windows (which isn't going to happen for a long time...)

Anyway, the problem you described about lasers being hard to see is the bug I'm talking about. If you look at the laser beam from the side or top, you can see that it's a really stretched bullet. I'll take a pic and post it when I get home.

Since my dad is a ham radio person, there's a lot of stuff for ham radio that requires Linux - so he actually let me install Linux on a seperate drive (I'm dualbooting with XP). But what really saves my Linux is the old 350mhz pos on the other side of the room that the rest of the family uses; otherwise I'd constantly being bugged by my sister to boot into Win so she can play sims ;)

By the way, blast, I patched the source with the tabbed message panel, nice work. The only thing I can suggest is that when the tabs are turned off the name of the current panel is displayed in the upper-right corner of the box.

Posted: Wed Feb 18, 2004 5:38 pm
by blast
Here's a good screenshot of how my lasers look.

Posted: Wed Feb 18, 2004 6:25 pm
by blast
Just searched the 1.10.4 source code for "laserTexture". It only appears once, and that's in bzflag.cxx where it defines the default value.

Posted: Wed Feb 18, 2004 6:51 pm
by blast
Well, I found the problem. The bolt texture is being hard coded for the laser. This is in LaserStrategy::LaserStrategy(...).

ShotStrategy.cxx Line 993:

Code: Select all

  TextureManager &tm = TextureManager::instance();
  std::string imageName = Team::getImagePrefix(tmpTeam);
  imageName +="bolt";
  OpenGLTexture *texture = tm.getTexture(imageName.c_str());
The third line there specifies it to use the bolt texture. Relacing it like this seems to fix it:

Code: Select all

  TextureManager &tm = TextureManager::instance();
  std::string imageName = Team::getImagePrefix(tmpTeam);
  imageName += BZDB.get("laserTexture");
  OpenGLTexture *texture = tm.getTexture(imageName.c_str());
Haven't been keeping track of the 1.11 code, but this may already be fixed.

Posted: Wed Feb 18, 2004 11:23 pm
by JeffM
hmm odd that that got missed.

Posted: Thu Feb 19, 2004 5:17 pm
by Legoguy
I'm suprised that didn't get noticed earlier; it's really really apparent. To me anyway. Glad it was a bug and not me. Thanks for confirming and helping fix this ;)

Will another release be made soon to fix it? I myself being a graphic designer consider it a relativley serious bug, being so exposed to the end user like this.

[edit] This happened in revision 1.85 of ShotStrategy.cxx; someone did a bit too much copy-pasting and forgot to change vital strings:
http://cvs.sourceforge.net/viewcvs.py/b ... 84&r2=1.85

And it was then overlooked again in revision 1.89:
http://cvs.sourceforge.net/viewcvs.py/b ... 88&r2=1.89

And lastly overlooked a second time in 1.91:
http://cvs.sourceforge.net/viewcvs.py/b ... 90&r2=1.91

And then it was separated into SegmentedShotStrategy.cxx, and has not been fixed yet in that file either.

Bah. :?

Posted: Thu Feb 19, 2004 11:07 pm
by blast
They are working on 1.11 now, but it will be a while before a new version is released (1.12). However, when I get BZFlag XL 1.10.4 done, it will have that bug fixed.

Posted: Fri Feb 20, 2004 5:58 pm
by Chestal
Besides the incompatible 1.11 branch we also have a maintenance branch for 1.10 which mostly includes bug fixes. There are no plans to do a 1.10.6 release right now, but if demand is high and we have the time we can do this pretty quickly.

Posted: Fri Feb 20, 2004 6:03 pm
by Legoguy
Submitted a bug on SourceForge; hopefully that will get the bug fixed for 1.12.