No sound and very low framerate.

Do you need help? Ask here!

Bug reporting belongs here: http://developer.wz2100.net/newticket
Post Reply
kernel panic
Greenhorn
Posts: 9
Joined: 10 Jun 2007, 19:52

No sound and very low framerate.

Post by kernel panic »

Hello.

First of all, thanks a ton for bringing this game back to life.  I loved eight years ago and I love it today.


Second, when I install the game on my Gentoo laptop it is unplayable.  There is no sound and the frame rate is VERY low.  My laptop is a Toshiba A105-S4344:  Core 2 Duo @ 1.66, 2GB RAM, and Intel GMA 950 graphics.  I have Gentoo 2007.1 (32-bit) installed and I am using KDE for my desktop.  Warzone is the only ebuild I have installed that Gentoo lists as "Masked for testing."  Package version I am using can be found here:  http://packages.gentoo.org

My CFLAGS and CXXFLAGS are "-O2 -march=prescott -msse3 -mfpmath=sse -pipe"

My USE flags are:  USE="X opengl mesa glx dri sdl openal physfs -ipv6 -cups kde qt2 qt3 qt4 acpi alsa dvd cdr dvdr encode jpeg gif tiff png avi mpg win32codes mp3 ogg vorbis acpi arts objc objc++ objc-gc gcj gtk threads mmx sse sse2 ssl sharedmem"

The game used to work in Ubuntu "Edgy" but I wiped that partition when I installed Gentoo (Besides, I think that one was version 2.0.5).  If you need any more info just ask and thanks for your time.


KP
User avatar
kage
Regular
Regular
Posts: 751
Joined: 05 Dec 2006, 21:45

Re: No sound and very low framerate.

Post by kage »

try compiling with

CFLAGS="-O2 -march=prescott" #(CXXFLAGS set to this as well)

if the above doesn't work faster, just use "CFLAGS=-02"... some code isn't clean enough for gcc's optimization engine to make correct decisions, and could result in code slower than it would be if you tried it without optimizations. this might be the case with wz.

i've never heard of the USE flag... at any rate, i can assure you that warzone has nothing to do with qt, kde, cups, optical drives, acpi, doesn't use alsa as a direct backend (it should use openal, which can in turn use alsa), arts, objective c(++), java, win32codecs, gtk, or ssl... also, you did misspell win32codecs and mentioned acpi twice.

one issue i did see that may be related to USE (if USE is actually used) is that it lists opengl ahead of all other gl-related stuff, and lists mesa ahead of glx and dri... mesa is a fully software opengl renderer, and you're mentioning it before any hardware renderers, so if it's built with mesa, it'd go really damned slow. also, afaik, "opengl" has some limitations compared to glx.
kernel panic
Greenhorn
Posts: 9
Joined: 10 Jun 2007, 19:52

Re: No sound and very low framerate.

Post by kernel panic »

I'll try the CFLAGS ans CXXFLAGS.  As far as the USE flags go, they used by Gentoo to customize software compiled vis Portage.  Consult the Gentoo Handbook for more info.




KP
kernel panic
Greenhorn
Posts: 9
Joined: 10 Jun 2007, 19:52

Re: No sound and very low framerate.

Post by kernel panic »

Recompiling the game with the CFLAGS and CXXFLAGS set to "-O2" had no effect. 



KP
User avatar
kage
Regular
Regular
Posts: 751
Joined: 05 Dec 2006, 21:45

Re: No sound and very low framerate.

Post by kage »

kernel panic wrote: I'll try the CFLAGS ans CXXFLAGS.  As far as the USE flags go, they used by Gentoo to customize software compiled vis Portage.  Consult the Gentoo Handbook for more info.
KP
okay... i figured as much... you might set USE to "X opengl glx dri sdl openal physfs png jpeg ogg vorbis" -- that should cover all the bases for warzone. i looked at the portage manual, and items listed last have highest priority. also, it says that use concerns packages the source (i'm guessing the ./configure script) lists as optional, so if all else fails, you can try it with an empty USE, as well as an empty CFLAGS (portage probably would use the default CFLAGS and CXXFLAGS defined by the warzone configure scripts.
kernel panic
Greenhorn
Posts: 9
Joined: 10 Jun 2007, 19:52

Re: No sound and very low framerate.

Post by kernel panic »

kage wrote: ...you can try it with an empty USE, as well as an empty CFLAGS (portage probably would use the default CFLAGS and CXXFLAGS defined by the warzone configure scripts.

Sorry, Kage.  I am not going to recompile my entire installed system with no optimizations, which is what it seems you are suggesting.  That would completely defeat the purpose of running Gentoo.  Even even if Warzone did work after that almost everything else on the system would be broken or run so pitifully slow as to be pointless.



KP
User avatar
kage
Regular
Regular
Posts: 751
Joined: 05 Dec 2006, 21:45

Re: No sound and very low framerate.

Post by kage »

?

gentoo (just like every single other operating system in existence) allows you to compile different software with different flags -- there's no requirement that *every* piece of software be compiled to same way to be interoperable. in whatever shell you're using, setting CFLAGS, USE, or any other environment variable only is applicable until you logout of that shell, and thus is temporary, and should only apply to the software you're compiling *in that terminal*.
User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: No sound and very low framerate.

Post by DevUrandom »

kage, you are pretty wrong about Gentoo.

1st: It is not an operating system, but a Linux distribution
2nd: Everything is selfcompiled
3rd: This is done via Portage/emerge, which is also the one who uses the USE flags to determine the needs of the user and setup configure flags accordingly
4th: Changing the system USE or CFLAGS (/etc/make.conf) affects the whole system

panic, you are wrong, too.

1st: You can set empty USE flags for Warzone only. Just add "games-fps -*" to /etc/portage/package.use (I don't know about the wildcard, it may be necessary to specify each single flag WZ uses).
2nd: You can also set CFLAGS per package in /etc/portage/package.env (correct filename?). I don't know how that works, though.
3rd: Nothing prevents you from compiling WZ by hand.
4th: mfpmath and msse3 are afaik not needed, since march=prescott implies this. fomit-frame-pointer instead might help, because it frees a register. But only use it in case you don't need debugging functionality.

I don't think that all this recompilation will help anything, though.
The culprit for the poor performance is probably the intel gpu. As far as we know WZ performs badly on non dedicated graphicscards (with binary drivers). Reasons might be the bus becomming too small due to usage of immediate mode, somewhat slow rendering in general and shadows. We are trying to fix the former for 2.1, while you can fix the latter yourself by starting warzone with the --noshadows option.
kernel panic
Greenhorn
Posts: 9
Joined: 10 Jun 2007, 19:52

Re: No sound and very low framerate.

Post by kernel panic »

OK, a few points to clarify what I have done with this. 

1.)  After the Portage emerge of WZ failed to work properly (Which used the CFLAGS, CXXFLAGS, and USE flags from my /etc/make.conf) I tried disabling sound and shadows.

2.)  After that didn't work I unmerged the Gentoo ebuild for WZ 2.0.6 and downloaded the sources from this web site.  This was compiled by hand using the "-O2" flag only.  The problem still persists even with disabled sound and shadows.

3.)  Unless there have been some big changes to the renderer from 2.0.5 to 2.0.6, I am pretty sure that the hardware is not at fault since 2.0.5 worked in Ubuntu 6.10.  I feel it is most likely a problem with a piece of software WZ depends on to run.  If something was changed or broken upstream, or if I have a version lower than that which the games was written for I could see this causing a problem.  I could also be the version of my Xorg drivers.  I am using 1.7.4 and 2.0.0 is marked for testing in the Gentoo Package list.


So here is what I would like to try.  I will download and install the new driver soon. If you could tell me the versions of the packages WZ is written against I'll check to make sure I have the right ones. 


Thanks again for your time.



KP
Giel
Regular
Regular
Posts: 725
Joined: 26 Dec 2006, 19:18
Contact:

Re: No sound and very low framerate.

Post by Giel »

Have you also tried compiling 2.0.5 (on your Gentoo box) ? Because there barely are any changes at all from 2.0.5 to 2.0.6.
"First make sure it works good, only then make it look good." -- Giel
Want to tip/donate? bitcoin:1EaqP4ZPMvUffazTxm7stoduhprzeabeFh
User avatar
kage
Regular
Regular
Posts: 751
Joined: 05 Dec 2006, 21:45

Re: No sound and very low framerate.

Post by kage »

DevUrandom wrote: kage, you are pretty wrong about Gentoo.

1st: It is not an operating system, but a Linux distribution
2nd: Everything is selfcompiled
3rd: This is done via Portage/emerge, which is also the one who uses the USE flags to determine the needs of the user and setup configure flags accordingly
4th: Changing the system USE or CFLAGS (/etc/make.conf) affects the whole system
i had known points 1 and 2, but looking back on my previous post, it does look like i thought it was a unique os.  okay... so then does gentoo also provide wrappers around make so that manually compiled software can still form a "package"?

also, kernel panic, can you confirm that any other 3d games work smoothly on your gentoo install? if not, it may be indicative of a suboptimal compilation of the kernel or xorg/xfree86 gfx drivers.
User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: No sound and very low framerate.

Post by DevUrandom »

kage wrote: i had known points 1 and 2, but looking back on my previous post, it does look like i thought it was a unique os.  okay... so then does gentoo also provide wrappers around make so that manually compiled software can still form a "package"?
Basic description of Gentoo (for more see the website or manual):
Gentoo uses "ebuilds" which are more or less shellscripts with instructions how to compile a piece of software. Those are compiled, installed into a sandbox directory, which is then copied over into the real system. (You can also choose to create a tarball.)
If you compile a piece of software by hand, you can (in no way?) create a package from it, since there are no "packages" in this meaning of the word. You could write an ebuild which automates the steps you would run by hand. Portage would then keep track of installation/uninstallation and so on.
Without an ebuild there is no package. You cannot create a "package" (meaning: tarball with compiled binaries and metadata) you could send to someone else, because it is not know to Portage without an ebuild, which would have to be in the portage-tree (directory-structure with all ebuilds in it).
User avatar
kage
Regular
Regular
Posts: 751
Joined: 05 Dec 2006, 21:45

Re: No sound and very low framerate.

Post by kage »

okay. questions answered.

in this case, i meant something more like "virtual package" -- some way for the system to keep track of files after installation and a way to purge those files, as most distros that handle binary packages do. in this sense, portage looks like it qualifies.
Post Reply