View unanswered posts | View active topics It is currently 26 Mar 2019, 23:39



Reply to topic  [ 7 posts ] 
 Graphics problem under WINE (Ubuntu) 
Author Message
Crewman
User avatar

Joined: 22 Jul 2010, 02:39
Posts: 21
Hi guys. Nice game you have here :D

I'm having a problem though getting BotE to run properly under WINE on Ubuntu 10.10. The graphics are transparent on the left menu bar (I can see my desktop files/other open windows in the menu bar between the menu buttons) and the galaxy view doesn't show anything (just as the background of the left menu bar)... Other than that the game runs fine...

Also, the graphics on the buttons are a little edgy compared to when running on Windows... Can someone help me out on this?

Here is a screenshot with the game right after it opens, and another one in the research menu:
Image

Image


28 Jan 2011, 16:21
Profile
Crewman
User avatar

Joined: 14 Jan 2011, 23:19
Posts: 17
I had the same problem with Ubuntu 10.10 and Bote Alpha 5.1
Never got it to play right. Now playing again under windows 7.


28 Jan 2011, 21:09
Profile
Fleet Admiral
Fleet Admiral
User avatar

Joined: 13 Nov 2006, 01:00
Posts: 2111
Location: Germany
the transparent left view is probably due to the transparent png image used for it in-game. Probably you can fix it when you open ../bote/graphics/backgrounds/con_menuv2.bop after renaming it to *.png (I think it is v2, if not just try the other images with con_). Then save it as jpg with black background (or to make sure it has a black background, use GIMP and fill the transparent space with a black layer). then rename it to .bop again and play it again. Should be intransparent and black then like it is by default in Windows.

hm, thinking about it, why do we have transparent png here anyway? SirP, could you check if jpg works too here in this case? Would have save a bit hdd space ;).

At some point when we switched from GDI to GDI+ for galaxy map view, we lost WINE support somehow (before you could perfectly play it under WINE and Ubuntu for example). Could be that their implementation of GDI+ is requiring some additional code that we lack right at the moment or it's a bug in WINE or BotE. I guess someone with Linux and coding experience could probably solve it. It would be nice to know if it can be worked out so if you want to test it, just go ahead. If you know something about coding, BotE source can be downloaded at bote.codeplex.com .

btw. is that a full screenshot or just a cut-out of one? Since I'm missing the lower parts where your empire logo on bottom left and your system panel on bottom right is shown (cf. other (german) screenshots in bote alpha 6 release thread).


29 Jan 2011, 09:54
Profile WWW
Crewman
User avatar

Joined: 22 Jul 2010, 02:39
Posts: 21
Thank you both for your feedback :smile:

JanZonderVrees wrote:
I had the same problem with Ubuntu 10.10 and Bote Alpha 5.1
Never got it to play right. Now playing again under windows 7.

Right now I'm using VirtualBox to play the game with winXP... So this problem is not on my side only... I'll try to reproduce the issues on some other machines.

Malvoisin wrote:
At some point when we switched from GDI to GDI+ for galaxy map view, we lost WINE support somehow (before you could perfectly play it under WINE and Ubuntu for example). Could be that their implementation of GDI+ is requiring some additional code that we lack right at the moment or it's a bug in WINE or BotE. I guess someone with Linux and coding experience could probably solve it. It would be nice to know if it can be worked out so if you want to test it, just go ahead. If you know something about coding, BotE source can be downloaded at bote.codeplex.com .

I'll have a try at it, but I can't promise anything though... I have a feeling that before trying to solve the issues described below, this one has to be solved first as it may be related to the others.

Malvoisin wrote:
the transparent left view is probably due to the transparent png image used for it in-game. Probably you can fix it when you open ../bote/graphics/backgrounds/con_menuv2.bop after renaming it to *.png (I think it is v2, if not just try the other images with con_). Then save it as jpg with black background (or to make sure it has a black background, use GIMP and fill the transparent space with a black layer). then rename it to .bop again and play it again. Should be intransparent and black then like it is by default in Windows.

hm, thinking about it, why do we have transparent png here anyway? SirP, could you check if jpg works too here in this case? Would have save a bit hdd space ;).

I'm with you on the jpg issue, it would be simpler to not use a transparent background if possible.

You're right, that was the file with the problem. Every race has a different GUI and there are multiple *_menuV2.bop files to edit in order to display the menu correctly for each one. A workaround for fixing this without editing the images is running wine in its own desktop (Configure Wine > Graphics > Emulate virtual desktop). The menu background is still transparent, but instead of seeing random stuff like icons and windows through it, you see the background of the virtual desktop window created for wine (of course, if you minimize and restore the window, you again see the windows/iconds from underneath).

The default color for the wine desktop is blue, but you can set it to black (Configure Wine > Desktop integration > Select Item "Desktop" and set the color to black) and then the menu's display exactly as they should in the game (that is, until you minimize/maximize).

Malvoisin wrote:
btw. is that a full screenshot or just a cut-out of one? Since I'm missing the lower parts where your empire logo on bottom left and your system panel on bottom right is shown (cf. other (german) screenshots in bote alpha 6 release thread).

The parts that are missing were cut off when starting the game and are not visible. The solution to see the full GUI is to run wine in its own desktop as I said above; then you see the whole GUI and the transparency problem is not that severe. Of course, this is just a quick and dirty workaround, not a fix for both problems.

I'll try to work a little on this to see if anything can be done...


30 Jan 2011, 13:23
Profile
Fleet Admiral
Fleet Admiral
User avatar

Joined: 13 Nov 2006, 01:00
Posts: 2111
Location: Germany
cool, thanks a lot ;).


30 Jan 2011, 13:37
Profile WWW
Fleet Admiral
Fleet Admiral
User avatar

Joined: 13 Nov 2006, 01:00
Posts: 2111
Location: Germany
as someone on our german boards pointed out, using winetricks (http://wiki.winehq.org/winetricks) and installing native gdiplus libraries in console (sh winetricks gdiplus) solves GUI issues with the galaxy map (at least for him, we haven't tried it out ourselves but if someone wants to do it on his mac or linux distribution and post feedback, it'd be welcome).


10 Feb 2011, 18:51
Profile WWW
Crewman
User avatar

Joined: 22 Jul 2010, 02:39
Posts: 21
Before anything, I'm sorry for this late response. The game runs fine under any Linux and if someone wants to see how to run the game I'll post the exact instructions and try to explain why the problem occured. I should've posted these faster, maybe someone needed them..

So there are basically two ways of getting things done, one safe (which uses winetricks) and one not so safe (but works without requiring an internet connection and may be faster) which uses the GdiPlus.dll file found in the BOtE root directory.

The "safe" method:
- Run "sh winetricks gdiplus" (do this before installing the game)
- Install the game normally through wine (if something goes wrong make sure you have the privileges and the game setup can be executed)
- For fullscreen mode, enter Wine Configuration > Graphics > Check "Allow DirectX apps to stop..." and Uncheck the rest of the checkboxes.
- For windowed mode, in Wine Config > Graphics > Check "Emulate a virtual desktop" and select a resolution if you want

The offline and faster method:
- Install the game normally thorugh wine
- Go to Wine config > Libraries > Enter "gdiplus" without the quotes in the New Override for lib field. Click Add. Click Ok.
- If you are having display problems (like the GUI not showing fully) then select either one of the options presented for fullscreen or windowed mode above.

The problem is with Wine's implementation of GDI+; some guys at wine are currently working at creating wrappers for GDI, but there are a lot of functions which remain to be implemented. This is why GDI+ support is so shady for the majority of applications which are a bit more complex, like BOtE... Since BOtE already has gdiplus.dll in its root, you just need to tell wine to override that library. The paths of interest to us are checked in this order for gdiplus.dll (asuming native is selected in config): app folder, current folder, ~/.wine/drive_c/windows/system32.

So if you just make that setting in wine config, it will work out of the box. There is just one problem though, and this is why I call this method unsafer than the first: You install BOtE first and the built in lib is used. Some functions needed by the installer are stubs.. Those are not critical, but in the future who knows how the installer will be modified and what functions it will need from the wine lib to make it unusable? After the installation, the *good* library will be used, because the app folder is checked first. One may bypass this problem if the good gdiplus.dll is in ~/.wine/drive_c/windows/system32 and native overriding is selected (this is what the winetricks command above does).

I''ve tried to find other alternatives, like mono's implementation, libgdiplus, but they implement only a basic set of functions they need for drawing. There have been attempts to make wine work with libgdiplus, but they all have been abandoned because, honestly, it isn't worth it. Better than wrapping libgdiplus to work under wine one could implement some of the missing stubs in wine's GDI+.

So, in the end, the best (and only, to my knowledge) way to get BOtE running in Linux is using the native library as you've said above, Malvoisin. :thumbsup:

Hope this helps... The game runs fine.


01 Apr 2011, 06:23
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by STSoftware.