Official WINE thread

ApteryxApteryx Join Date: 2008-11-16 Member: 65475Members
edited April 2010 in NS2 General Discussion
<div class="IPBDescription">Post your issues / solution regarding NS2 running on WINE</div>Are some folks out there already trying to run the NS2 engine test on WINE? What about the tools? Have you had any success?
Edit : After some helpful posts and experimentation (thanks to everyone!), we have a good idea of what is possible to do at the moment with WINE and NS2.

Here is what is known to work:
<ul><li>Installation / running NS2 Engine Test (Using WINE 1.1.33/1.1.34 or CrossOver Games 8.1.4, with VideoMemorySize set in registry)</li><li>Installation of the NS2 Tools</li><li>Launch Pad</li><li>Builder</li><li>Viewer (WINE 1.1.33 / 1.1.34 only)</li></ul>
Here is what does NOT work :
<ul><li>Shadows are not drawn in Engine Test. </li><li>Game Engine (NS2) crashes at initialization (WINE 1.1.36+ or WINE 1.1.x without VideoMemorySize set in registry)</li><li>Game Engine (NS2) crashes upon entering game if graphic settings at high (happens on 8800GTS 640Mo)</li><li>Editor crashes instantly</li><li>Viewer display is black or missing lightning (CrossOver Games 8.1.4 or WINE 1.1.42)</li><li>Low performance : about 15-20 fps on Q6700 + 8800GTS 640Mo)</li></ul>
A quick how-to to get you started :

1) Install plain WINE 1.1.33 / 1.1.34 or <a href="http://www.playonlinux.com" target="_blank">PlayOnLinux</a> or buy <a href="http://www.codeweavers.com/products/cxgames/" target="_blank">CrossOver Games</a>.

2) Install Steam.

3) Install your NS2 pre-release bundle. <b>You must install it in the same wine-prefix as Steam, else NS2 will refuse to launch, warning about failed network services initialization</b>. With plain WINE, you don't have to do anything special, as everything is installed at the same place by default. PlayOnLinux, by default, creates a new wine-prefix for every new installation. The trick is to give the "new" prefix the same name as the previously created one. On CrossOver Games, you must choose the same "bottle" (wine-prefix).

4) For a reason or another, NS2 seems to fail to auto-detect your video card memory and will crash with texture memory overflow. The way to solve this is to tell it specifically in the registry. Open regedit : if you have installed wine, juste type "regedit" in a terminal or with Alt-F2; for PlayOnLinux, right-click the launcher and select "Registry Base"; if using CrossOver Games, you need to execute this command : ~/cxgames_installation_path/bin/wine --bottle "your_bottle_name" --cx-app regedit.exe. Example: ~/cxgames/bin/wine --bottle "Steam Games" --cx-app regedit.exe.
Now that you have opened Regedit, browse to HKEY_CURRENT_USER -> Software -> Wine. Right click on Wine, and select New key. Name this new key: Direct3D. Right click on Direct3D, and choose "New String value". Name this string value: VideoMemorySize, and set its value to the amount of your video card memory, <b>in megabytes</b> (256, 512, 640, 1024, etc.). You should now be ready to go!

5) Remember to start Steam first. Once it's connected, you can start Natural Selection 2. Two warnings though: <b>do not attempt fullscreen mode, as you won't be able to click on any buttons after and will have do a clean re-install to remove the setting. Also, set the video settings at medium, else the game might crash when you join / create a game.</b>

Game is playable, but fps are low at around 15-25 images per second. The game takes around 600 megabytes of ram during play.

Test System:
-Ubuntu 10.04 Lucid Lynx 64 bits
-Q6700 CPU, eVGA 8800GTS 640Mo, 8GB ram
-PlayOnLinux and CrossOver 8.1.4
<img src="http://i40.tinypic.com/x4pvd1.png" border="0" class="linked-image" />
<img src="http://i42.tinypic.com/ke7qsl.png" border="0" class="linked-image" />
<img src="http://i40.tinypic.com/2uyqdjp.png" border="0" class="linked-image" />
<img src="http://i44.tinypic.com/245j1wn.png" border="0" class="linked-image" />
«1

Comments

  • jamesbchjamesbch Join Date: 2004-04-20 Member: 28035Members, Constellation
    I've the same problems here. Editor used to work a little before the updates. I hope they will improve the compatibility with wine or do the linux version soon !
  • TagertsweTagertswe Join Date: 2010-03-04 Member: 70825Members
    edited April 2010
    did you start the steam client as well?
    I had the steam client started on windows 7, but it complained about that anyways, and that was because I had to run steam in administrator mode.
    So it probably applies to linux too since you emulate.

    So either if you forgot to start steam, or it is the admin problem part with steam.

    Only things I can come up with :P
  • ApteryxApteryx Join Date: 2008-11-16 Member: 65475Members
    <!--quoteo(post=1766889:date=Apr 14 2010, 05:35 PM:name=Tagertswe)--><div class='quotetop'>QUOTE (Tagertswe @ Apr 14 2010, 05:35 PM) <a href="index.php?act=findpost&pid=1766889"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->did you start the steam client as well? [...]

    So either if you forgot to start steam, or it is the admin problem part with steam.<!--QuoteEnd--></div><!--QuoteEEnd-->
    I have Steam started --it's present in the tray. As for the admin rights, I'm not sure about what you mean? Are you saying that you had to use a user account with administrator privileges in Windows?

    The <a href="http://wiki.winehq.org/FAQ" target="_blank">WINE FAQ</a> says : "As far as Windows programs are concerned, you are running with administrator privileges. If an application complains about a lack of administrator privileges, file a bug; running Wine as root probably won't help."

    Some other <a href="http://wiki.jswindle.com/index.php/General_Wine_Troubleshooting" target="_blank">link</a> suggests to attempt running the program in Win98 mode, where admin rights did not exist yet. This is a no go, as Steam will remind you to inactivate compatibility mode, then close.
  • JirikiJiriki retired ns1 player Join Date: 2003-01-04 Member: 11780Members, NS1 Playtester, Squad Five Silver
    Its ages since I tried to emulate stuff in Wine, so I'm afraid I cannot help but if you ever get it working, I hope you can make an article to <a href="http://www.linux-gamers.net/" target="_blank">Linux-Gamers</a>. One of my main nuisances is that information about running games in Linux is scattered all over the internet.

    But does it say anything in wine console (standard output) ?
  • TagertsweTagertswe Join Date: 2010-03-04 Member: 70825Members
    <!--quoteo(post=1766896:date=Apr 14 2010, 07:22 PM:name=Apteryx)--><div class='quotetop'>QUOTE (Apteryx @ Apr 14 2010, 07:22 PM) <a href="index.php?act=findpost&pid=1766896"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I have Steam started --it's present in the tray. As for the admin rights, I'm not sure about what you mean? Are you saying that you had to use a user account with administrator privileges in Windows?

    The <a href="http://wiki.winehq.org/FAQ" target="_blank">WINE FAQ</a> says : "As far as Windows programs are concerned, you are running with administrator privileges. If an application complains about a lack of administrator privileges, file a bug; running Wine as root probably won't help."

    Some other <a href="http://wiki.jswindle.com/index.php/General_Wine_Troubleshooting" target="_blank">link</a> suggests to attempt running the program in Win98 mode, where admin rights did not exist yet. This is a no go, as Steam will remind you to inactivate compatibility mode, then close.<!--QuoteEnd--></div><!--QuoteEEnd-->

    I see, well I have no idea then :(
  • Lemming JesusLemming Jesus Join Date: 2010-04-13 Member: 71385Members
    That's a lot of trouble to go through when you could just dual boot.
  • ApteryxApteryx Join Date: 2008-11-16 Member: 65475Members
    <!--quoteo(post=1766897:date=Apr 14 2010, 06:24 PM:name=Jiriki)--><div class='quotetop'>QUOTE (Jiriki @ Apr 14 2010, 06:24 PM) <a href="index.php?act=findpost&pid=1766897"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Its ages since I tried to emulate stuff in Wine, so I'm afraid I cannot help but if you ever get it working, I hope you can make an article to Linux-Gamers. One of my main nuisances is that information about running games in Linux is scattered all over the internet.<!--QuoteEnd--></div><!--QuoteEEnd-->
    You should give it a try sometime. It's getting pretty good for a lot of stuff.
    <!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->But does it say anything in wine console (standard output) ?<!--QuoteEnd--></div><!--QuoteEEnd-->
    WINE is not printing any problem in the terminal to the point where NS2 warns that it cannot find Steam. See : <img src="http://i40.tinypic.com/2hrcxg0.jpg" border="0" class="linked-image" />
  • JAmazonJAmazon Join Date: 2009-02-21 Member: 66503Members
    Im cold... My feet hurt... are we there yet?

    Oh WINE! I thought this was the whine thread D:
  • WestwoodWestwood Join Date: 2004-07-23 Member: 30057Members
    edited April 2010
    User like you are the reason why there will never be many native linux-versions of upcoming pcgames. Sorry to say that!
  • ApteryxApteryx Join Date: 2008-11-16 Member: 65475Members
    <!--quoteo(post=1766948:date=Apr 14 2010, 08:22 PM:name=Westwood)--><div class='quotetop'>QUOTE (Westwood @ Apr 14 2010, 08:22 PM) <a href="index.php?act=findpost&pid=1766948"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->User like you are the reason why there will never be many native linux-versions of upcoming pcgames. Sorry to say that!<!--QuoteEnd--></div><!--QuoteEEnd-->
    You are entitled to your opinion, but I think you are misjudging the situation. In the current case, the Unknown World developers have expressed their will to _someday_ release a Linux build of their game. To support them and because I love NS, I've bought their game. Using WINE in the meantime A) by curiosity and B) to see the status of the development. IMHO, the more users come here and express their issues running the game in WINE, the more the alternative OS crowd get noticed by the developers.
  • MaMuSMaMuS Join Date: 2009-10-09 Member: 68990Members
    I'm at the same boat. Lastest verion of wine:

    <img src="http://img198.imageshack.us/img198/487/winens2fail.png" border="0" class="linked-image" />

    Also, I've experienced the same problems as the OP
  • zimzumzimzum Join Date: 2004-09-02 Member: 31200Members, Reinforced - Shadow
    edited April 2010
    identical problem as the post above. also, the map editor was working great with the initial release until a few updates back and then insta-crash.
  • simon kamakazisimon kamakazi Join Date: 2009-04-28 Member: 67296Members
    i think i remeber some one in the initial closed engine test was running it in wine, said they got good frame rate too,
  • zimzumzimzum Join Date: 2004-09-02 Member: 31200Members, Reinforced - Shadow
    yeah, wine + initial release were great. subsequent updates to the editor killed that.
  • Bobby is going homeBobby is going home Join Date: 2010-04-11 Member: 71323Awaiting Authorization
    <!--quoteo(post=1766948:date=Apr 14 2010, 09:22 PM:name=Westwood)--><div class='quotetop'>QUOTE (Westwood @ Apr 14 2010, 09:22 PM) <a href="index.php?act=findpost&pid=1766948"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->User like you are the reason why there will never be many native linux-versions of upcoming pcgames. Sorry to say that!<!--QuoteEnd--></div><!--QuoteEEnd-->
    That b*s*. Sorry to say that!
  • MrYiffMrYiff Join Date: 2004-08-24 Member: 30867Members, NS2 Playtester
    I cant test this myself so no idea if it will help at all but have you tried adding NS2 to Steam as an external game and then launching it from there? My thinking is that as it then gets launched by the same process as Steam it may be able to see it.
  • scary_jeffscary_jeff Join Date: 2003-07-27 Member: 18459Members
    <!--quoteo(post=1766903:date=Apr 14 2010, 05:40 PM:name=Lemming Jesus)--><div class='quotetop'>QUOTE (Lemming Jesus @ Apr 14 2010, 05:40 PM) <a href="index.php?act=findpost&pid=1766903"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->That's a lot of trouble to go through when you could just spend £100+ on a copy of windows and dual boot.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Fixed that one for you :)

    Anyway, I'm running the latest version of Wine (visit the wine site for details on adding their repo to get the latest version, 'apt-get update' or similar won't get the newest version), and was able to get further than the 'Steam' message by being logged into Steam before trying to run NS2. After doing this, the program would just exit without giving a message. I tried Wine in verbose mode, which gave a load of output which I had no idea what the relevant parts of it were. I then tried the CrossoverGames demo version. That did better, getting to the point of drawing the NS2 window - however, it crashed at that point (leaving a window showing only blackness). I am running an older ATI card and am not using the ATI binary driver, so that could be the reason. Hopefuly someone will get further with this, if anyone can get it working on the Crossover Games demo, I think I'll but the full Crossover Games, they have a 25% off offer at the moment.
  • taledentaleden Join Date: 2003-04-06 Member: 15252Members, Constellation
    edited April 2010
    Neither the editor nor the game works for me either (on wine 1.1.42 + ubuntu 9.10 64bit + nvidia8800gts +amd64), although I can play other 3d games (almost anything Source engine, NS1, etc) just fine.

    When I launch the editor, I get a "Debug Report" window which suggests the sound system couldn't initialize an output device (why does the editor need sound? is that just a side effect of the editor containing the full game engine?).

    When I launch the game with Steam running, a window flashes briefly and disappears too fast to look at, but it seemed vaguely empty-gray-ish. The console outputs a few "fixme:d3d:" messages from wine, but no obvious fatal errors.

    So, I imagine the UWE folks are focusing on making it work on Windows for the moment, but if you're ever interested in pursuing Linux compatibility, I'm sure lots of folks out here (myself included) would be more than happy to help you test/debug/research/report/whatever.
  • ApteryxApteryx Join Date: 2008-11-16 Member: 65475Members
    I confirm that I get a quick flashing frame of NS2 if I start the game from WINE's menu. If I copy the exact command line directive as found for the NS2 shorcut in the menu to the terminal and run it, it reports that Steam is missing.

    So for some odd reason it won't find Steam if I launch it from a terminal, but it will if I launch it from menu. I don't get it yet. This annoyed me, as I couldn't see the debug information regarding what was going wrong. Next I gave it a try with my CrossOver Pro / Games suite.

    With CrossOver, a frame is drawn (not full screen, about 1280 x 900 instead of my native 1280x1024), but it stays black and the debug report window pops up. Music is played though! Nice track! The crash log produced by NS2 contains lines such as these :

    IDirect3DDevice9::CreateTexture(2048, 2048, 0, D3DFMT_A8R8G8B8) failed (Out of video memory)
    Direct3DDevice::Texture initialize failed- A8R8G8B8, xSize=2048, ySize=2048)

    This using a 8800GTS 640Mo with latest drivers.
  • scary_jeffscary_jeff Join Date: 2003-07-27 Member: 18459Members
    Thanks for trying CrossOver Aptery, when you say latest drivers, I'm assuming you're using the binary nVidia one? I think I had that same error as you in Crossover. Hmm.
  • 2m42hy2m42hy Join Date: 2010-04-17 Member: 71435Members
    edited April 2010
    <img src="http://tof.canardpc.com/view/2f3c6399-c716-4b70-8c08-fecc6208b5a8.jpg" border="0" class="linked-image" />

    <img src="http://tof.canardpc.com/view/31e9f276-d39d-45fe-98eb-0821f41f2df3.jpg" border="0" class="linked-image" />

    <img src="http://tof.canardpc.com/view/97caac69-4933-4d1e-a338-388c5981fbd5.jpg" border="0" class="linked-image" />


    Linux Pandore 2.6.33-gentoo-r1 #4 SMP Thu Apr 15 22:05:16 x86_64 Intel® Core™2 CPU 6420 @ 2.13GHz GenuineIntel GNU/Linux
    OC 2.83

    Nvidia 9800 gx2 drivers legacy 195.36.15

    Edit!: work with wine 1.1.33 like the sdk , don't work with all cedega/transgaming engine no test with crossover sorry .Need some stuff from winetrick physx vcrun200X maybe need directX9 or some native dll . Don' t work fine in full screen ( cose f.. .king onverlay/ black screen and mouse bug , only full screen )
    Sorry for my freaky english :p
  • AsranielAsraniel Join Date: 2002-06-03 Member: 724Members, Playtest Lead, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow, Subnautica Playtester, Retired Community Developer
    how did you do that? what wine version?

    i get this debug output when running with wine 1.1.41:

    fixme:win:EnumDisplayDevicesW ((null),0,0x32f284,0x00000000), stub!
    fixme:d3d:WineD3D_ChoosePixelFormat Add OpenGL context recreation support to SetDepthStencilSurface
    fixme:d3d:debug_d3dformat Unrecognized 1280070990 (as fourcc: NULL) WINED3DFORMAT!
    fixme:d3d:getFormatDescEntry Can't find format unrecognized(1280070990) in the format lookup table
    fixme:d3d9:Direct3DShaderValidatorCreate9 stub
    fixme:d3d:WineD3D_ChoosePixelFormat Add OpenGL context recreation support to SetDepthStencilSurface

    Any clues? no error messages nothing apart from that
  • 2m42hy2m42hy Join Date: 2010-04-17 Member: 71435Members
    edited April 2010
    Hi i edit my first post sorry for loose some info :)

    PS of course like window you need launch steam before with the same wineprefixe
  • AsranielAsraniel Join Date: 2002-06-03 Member: 724Members, Playtest Lead, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow, Subnautica Playtester, Retired Community Developer
    installed physx vcrun2005 and directX9 but the error stayed exactly the same..

    anyway.. i want a native version,.. please?
  • ApteryxApteryx Join Date: 2008-11-16 Member: 65475Members
    <!--quoteo(post=1767501:date=Apr 17 2010, 08:50 AM:name=scary_jeff)--><div class='quotetop'>QUOTE (scary_jeff @ Apr 17 2010, 08:50 AM) <a href="index.php?act=findpost&pid=1767501"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Thanks for trying CrossOver Aptery, when you say latest drivers, I'm assuming you're using the binary nVidia one? I think I had that same error as you in Crossover. Hmm.<!--QuoteEnd--></div><!--QuoteEEnd-->
    Yes, I'm using the 195.36.15 binary drivers.
  • ApteryxApteryx Join Date: 2008-11-16 Member: 65475Members
    edited April 2010
    @2m42hy : Thanks for sharing! That gives a little hope ;) I don't think we need to specifically install VC++ runtime library though, as the game come with them already (msvcr80.dll is in the "Natural 2 Selection" game folder). I've tried installing it anyway (Visual C++ 2005 Redistributable install in winetricks/CrossOver) and it didn't help the video nor changed the log details. As even some Windows users are having the same log output as mine, it might not even be a WINE issue (see <a href="http://www.unknownworlds.com/ns2/forums/index.php?showtopic=109285" target="_blank">Video error on making game</a>). One user suggest he got it working by lowering graphical details to minimum. Don't know how he did that if, like us, had no video output. I'll see if it can be changed from some config files in the game folder.
  • SupernornSupernorn Best. Picture. Ever. Made. Ever. Join Date: 2002-11-07 Member: 7608Members, Constellation
    edited April 2010
    I'm ashamed to say i first read this thread's title as "Official WHINE thread"

    I'm not sure if i'm disappointed or relieved now though.
  • jamesbchjamesbch Join Date: 2004-04-20 Member: 28035Members, Constellation
    edited April 2010
    I made it working. Using wine-1.1.33 :

    <a href="http://www.zimagez.com/zimage/capture-naturalselection2.php" target="_blank"><img src="http://www.zimagez.com/miniature/capture-naturalselection2.jpg" border="0" class="linked-image" /></a> <a href="http://www.zimagez.com/zimage/capture-naturalselection2-a.php" target="_blank"><img src="http://www.zimagez.com/miniature/capture-naturalselection2-a.jpg" border="0" class="linked-image" /></a>
    <a href="http://www.zimagez.com/zimage/capture-naturalselection2-2.php" target="_blank"><img src="http://www.zimagez.com/miniature/capture-naturalselection2-2.jpg" border="0" class="linked-image" /></a> <a href="http://www.zimagez.com/zimage/capture-naturalselection2-5.php" target="_blank"><img src="http://www.zimagez.com/miniature/capture-naturalselection2-5.jpg" border="0" class="linked-image" /></a>

    Bug so far:
    - Really low frame rate: 5-15 fps (high quality)
    - Some targets are missing legs and aiming near but not on it killed them.
    - Repeating output while in main screen: <a href="http://pastebin.com/irhuAJiv" target="_blank">http://pastebin.com/irhuAJiv</a>
    - Bugged keystroke in console
    - Editor is still not starting (crash and bug report appears)
    - No shadow (no fans projection shadows, neither on ground neither on player)
  • 2m42hy2m42hy Join Date: 2010-04-17 Member: 71435Members
    edited April 2010
    I make another test , he work easy !

    Quick crapy howto

    wine-1.1.33 , winetricks ( for directX9 physx and vc2005 )
    note : vc2008 = msvcr90.dll / vc2005 = msvcr80.dll

    1 install wine , check alsa , now with nano or some thing like

    nano DirectX.reg and put thas

    REGEDIT4

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectX]
    "InstalledVersion"="hex:00,00,00,09,00,00,00,00"
    "Version"="4.09.00.0904"

    now regedit DirectX.reg after thas open regedit and go to HKEY_CURRENT_USER/Software/Wine/ and add new key Direct3D

    now add String Value for Direct3D

    OffscreenRenderingMode --> fbo
    UseGLSL --> enabled
    VideoMemorySize -->XXX (256 /512 /1024 ect)

    now you can install directx9 , physx and vc2005 , time for install steam and natural selection 2 engine test . Launch steam and launch engine test , enjoy
    note : maybe physx make some error or stuck i not a real problem.

    PS if you need see my wine flag <a href="http://pastie.org/924700" target="_blank">http://pastie.org/924700</a>

    Edit owned by jamesbch :p
  • ApteryxApteryx Join Date: 2008-11-16 Member: 65475Members
    @jamesbch, 2m42hy : Thanks for these details! I've updated the first post with many info, a quick tutorial and fresh screenshots. <a href="http://unknownworlds.com/forums/index.php?showtopic=109355&st=0" target="_blank">See post #1.</a> By experimenting, I've found that the only necessary thing to do in order to make NS2 run, is to create the VideoMemorySize key and to use WINE 1.1.33 / 1.1.34 or Crossover Games. No need to mess around with physx or any else libraries, as they seem to come with NS2 installer.
Sign In or Register to comment.