• ✨ ARCHIVE MODE ✨
    The forum has now been set to read-only mode, no new posts, resources, replies etc will not be possible.
    We recommend you join our Discord server to get real-time response: Discord Invite Link

Launcher without HTML rendering (or webkit/something else) for possible Linux playing (wine)?

Thunder Bullet

Starting Trainer
Hello! As discussed here, the launcher does not work on some linux distros because libgluezilla "is missing". Actually, this needs firefox 3 to run, which doesn't work on recent linux distros. For unknown reasons, it seems to work on arch linux. We're still trying to figure out why, but a modified launcher would get rid of the problem without modifying so much of the OS.

If the launcher used webkit, some other way of HTML rendering or no HTML at all, it would work fine on linux (wine), but currently, we're unable to launch the game because of this. It would be really great if there is such a launcher at some point, even if it isn't downloadable from the "downloads" page and only posted somewhere in a "how to play this game on linux" thread.

Thanks so far! I'm sure at some point this game will run fine on linux, even as good as it does on windows!
 

mma

Trainer
Hi there, I am currently trying to achieve the same.
It does work using some tricks (via wine).
winetricks dotnet40 xna40 d3dx9 directmusic directplay wmp9
I am not sure whether winetricks mono28 vcrun2010 corefonts was also required...

I got the game itself running (without sound), however it hangs for some minutes at the intro screen before it gets ready. Also, at every battle => normal or normal => battle or scene changing it does hang again. I am unsure what the game is doing then really. But it is in fact playable.

Another trick I am trying currently to achieve is to get it work via mono. There is a XNA port which does work in fact under Linux, Android and Windows as well, called ANX Framework https://anxframework.codeplex.com/
It is API compatible, but the namespaces have to be swichched from Microsoft.Xna.Framework to ANX.Framework (or similar). However, I have downloaded, changed and recompiled the library, so that it declares the Microsoft.Xna.Framework namespace instead. The LUA script engine might be exchanged via https://github.com/gfoot/kopiluainterface/releases which claims to be api compatible as well. It needs to be exchanged since the basic LUA implementation relies on native (Windows) code.
Via ilmerge I could change the references of the original assembly, but at the end I get this exceptions with mono
Code:
Invalid type _2._5DHero.BV2.BattleScreenV2 for instance field _2._5DHero.BV2.SwitchPokemonQueryObject:TempScreen
Invalid type _2._5DHero.PokeBill for instance field _2._5DHero.LUAFunctions:CurrentPokebill
Invalid type _2._5DHero.Item for instance field _2._5DHero.Pokemon:Item
Invalid type _2._5DHero.OwnPlayer for instance field _2._5DHero.Level:OwnPlayer
Invalid type _2._5DHero.Screen for instance field _2._5DHero.BV2.BattleScreenV2+SaveOverworld:OverworldScreen
Invalid type _2._5DHero.Entity for instance field _2._5DHero.Player+Temp:ScriptEntity
Invalid type _2._5DHero.Screen for instance field _2._5DHero.BattleScreen+SaveOverworld:OverworldScreen
Invalid type _2._5DHero.Pokemon for instance field _2._5DHero.PokedexViewScreen+EvolutionLinePokemon:Pokemon
Could not get XIM

Unhandled Exception:
System.TypeLoadException: A type load exception has occurred.
  at _2._5DHero.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: A type load exception has occurred.
  at _2._5DHero.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
So probably it would be easier to find somehow the lag issue in the wine approach, but a mono solution would of course be nicer.
Porting the game without having the code is a hard process, and I am unsure whether I am going to do it.

Another note: Also the path seperator "\" seems to be inserted directly into the code rather than System.IO.Path.DirectorySeparatorChar

The launcher webbrowser control issue could be avoided if it would detect it's platform using System.Environment and only creating a new Webbrowsercontrol if the platform is Windows...

Regarding VMs:
wine would be a solution, a VM is not. First because you need a Windows license and more importantly the virtual machines lack good 3D acceleration support. I did not manage to get the 3D acceleration for the right DirectX-Version running on Vmware Workstation. It does run on VirtualBox, althrough the framerate sucks despite having a decent graphics card (Radeon 7900) and it does flicker as hell.
 
Last edited:

mma

Trainer
Some more information: I have hacked a bit around in the CIL code and started a Mono port. As said, it is quite hard to do without the code. The graphics are messed up yet.



I am not sure whether I dig through the CLI code in order to fix that.
In addition, the mouse is going crazy on movements. As said, Microsoft.XNA had to be replaced with MonoGame (another XNA-compatible port) and the LUA library. The path separators had to be fixed.
I am not quite sure yet what the cause is for the stripes...
 

mma

Trainer
Great news! The texture part is fixed! It was a bug in the MonoGame implementation of Texture2D-Copy ;)
After I have fixed the mouse issue (takes a moment to see how this is caused) a "native" hacked version could get ready ;)
 

mma

Trainer
So... An early alpha is ready to test. Please note: Do not try to set the graphics settings to Fancy. It won't work yet.
It will probably crash at some point. This is more like a proof of concept, which shows that Pokemon3D does not need to depend on Microsoft's XNA implementation.
The loading process itself can take a while, but the game itself should run smoothly. The camera can behave strangely due to a mouse movement bug I cannot determine at the moment.
Music does not work yet as well, althrough that shouldn't be much of a problem.

Actual pokemon battles do not work yet due to an exception, which might occur because of the dependency hacking I perform in order to make this work. I guess this requires a little more investigation.

Do not file any bug on it on the bug tracker, since it is totally unofficial and a fan made port of a fan made project. :D

https://www.dropbox.com/l/3tdUw0iTmPzDAQ8KqWBESb?
 

Tornado9797

Content Developer
P3D Developer
Global Moderator
Some more information: I have hacked a bit around in the CIL code and started a Mono port. As said, it is quite hard to do without the code. The graphics are messed up yet.



I am not sure whether I dig through the CLI code in order to fix that.
In addition, the mouse is going crazy on movements. As said, Microsoft.XNA had to be replaced with MonoGame (another XNA-compatible port) and the LUA library. The path separators had to be fixed.
I am not quite sure yet what the cause is for the stripes...
Someone needs to turn this into a Texture Pack... :p
 

mma

Trainer



Fighting does now work! The only thing which doesn't is sound, but who needs sound anyway? :D
Fancy graphics do work as well.
The exe is only for Linux (and maybe Mac OS X? But I guess not...)
It might be easy possible to create a multi-platform since the underlaying MonoGame is quite portable (even available for Android).
That's my suggestion: Replace XNA with MonoGame and LUA with the non-native LUA implementation.. And to replace the path seperators with System.IO.Path.DirectorySeparatorChar :D
It would be easier to integrate other controllers as well. My controller does work (not nicely since the bindings are bad etc), but it would work after a bit of work.

Download it under
https://www.dropbox.com/s/56zepuh2vz0uo9p/pokealpha0.2mono.tar.gz
and run it just via mono.

Have a nice day ;)
Marc Miltenberger
 
Last edited:

Thunder Bullet

Starting Trainer



Fighting does now work! The only thing which doesn't is sound, but who needs sound anyway? :D
Fancy graphics do work as well.
The exe is only for Linux (and maybe Mac OS X? But I guess not...)
It might be easy possible to create a multi-platform since the underlaying MonoGame is quite portable (even available for Android).
That's my suggestion: Replace XNA with MonoGame and LUA with the non-native LUA implementation.. And to replace the path seperators with System.IO.Path.DirectorySeparatorChar :D
It would be easier to integrate other controllers as well. My controller does work (not nicely since the bindings are bad etc), but it would work after a bit of work.

Download it under
https://www.dropbox.com/s/56zepuh2vz0uo9p/pokealpha0.2mono.tar.gz
and run it just via mono.

Have a nice day ;)
Marc Miltenberger
I tried to run it with mono, but..
Code:
Missing method SetProjectError in assembly /home/devin/Games/testMonoGame/Pokemon.exe, type Microsoft.VisualBasic.CompilerServices.ProjectData

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
File name: 'Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
File name: 'Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
Anything missing?
 

mma

Trainer
Yes, you will need libmono-microsoft-visualbasic-* packages as well as libsdl-mixer
(Ubuntu). There is still the mouse problem through.
 
Last edited:

Thunder Bullet

Starting Trainer
I can confirm a problem with the mouse. Also, this:

But at least the game doesn't need a launcher to work. Great!

Whenever someone released a game for windows only, they told me it was impossible to get it working on linux without having to rewrite the entire game. You are proof that this is a lie. Thanks!
 

mma

Trainer
Hmm, a font problem. Unsure, what causes this. I am not at the home computer anyway.
But at least the game doesn't need a launcher to work. Great!
Does not make sense for the hack anyway, since it has to be repeated on each new version.

Whenever someone released a game for windows only, they told me it was impossible to get it working on linux without having to rewrite the entire game. You are proof that this is a lie. Thanks!
Well, that really depends on the technical details. In this case, there is a almost fully compatible environment for the programming language and an existing alternative implementation of the Game Engine. Therefore it was not too hard.
But if you write platform specific C++ code by using the Direct X libraries directly, this may be different (although you could try to use some wine wrappers or similar).
To defend the developers: If you grow up with Windows and do have no experience in other operating systems, it's easy to believe that the game is hard to port since it uses heavily (VB .NET and XNA) Microsoft technology. However, the open source community has made large efforts recently in order to get such things to work. In addition, the linux gaming scene is changing drastically at the moment.
The game was not written with platform independence in mind, but nevertheless it wouldn't be hard to make it platform independent. I hope that I do not have to do this hack on every version manually using the CIL code; it's a bit painful ;).

Regarding the mouse problem: I will look after it probably after this weekend. The problem relies in monogame's mouse handling. The game is asking for the cursor position before resetting the mouse cursor back to the center of the window. This does not work very well yet.
http://gamedev.stackexchange.com/questions/55979/monogame-linux-mouse-setposition-doesnt-work
I have tried to use
System.Windows.Forms.Cursor.Position alternatively but there is some offset in between, which causes the problems.
 

Thunder Bullet

Starting Trainer
Well... There is a new version. The mouse problem should have been fixed and sound is working (which is the reason that the archive is so big; I did not remove the *.wma versions of the songs)

@Thunder Bullet: Do you get any console output regarding the font problem?

https://www.dropbox.com/s/lg17infgw0x9zrk/pokealpha0.3mono.tar.gz
Great! Sound is working now, sadly, the mouse problem is basically the same. But instead of getting stuck in the lower right corner of the screen, it is the upper left corner now. Fonts still missing, which ones do I need and how do I have to install them?
 

mma

Trainer
Well, sadly I think the game uses the fonts in the Content/Fonts folder, so it should have anything it needs. I am not sure why this happens at your computer. I cannot reproduce it on mine (Ubuntu Trusty Alpha, AMD graphics card, open source drivers, KDE) nor my girlfriends' (Ubuntu raring, NVIDIA card, closed source drivers, Cinnamon) nor a friend's computer (Linux Mint, AMD graphics card, closed source drivers, Cinnamon).
I guess it's not the graphics cards fault, but I used the exactly procedure as described in my earlier post (the missing packets). The same goes for the cursor problem (it is fixed at mine and my girlfriends computer) At the moment there is nothing I can do for you.
How good are you at programming (C#)? I could send you the patched version of MonoGame so that you can debug it. Or you could try to file a bug report on MonoGame; maybe they can help to narrow down the issue.
 
Top