Poll

Would you be likely to use a Linux version of NeoLemmix?

Yes, I'd love that
2 (25%)
No; I use Linux, but am happy to use WINE to run NeoLemmix
1 (12.5%)
No; I don't use Linux
5 (62.5%)

Total Members Voted: 8

Author Topic: 2.00 Aim for cross-platform?  (Read 12021 times)

0 Members and 1 Guest are viewing this topic.

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: 2.00 Aim for cross-platform?
« Reply #15 on: August 19, 2015, 08:24:33 AM »
After some more looking into it, it looks like the above option might not be too viable, on account of that while the behind-the-scenes processing should be no problem, transferring the image onto the screen is likely to be extremely problematic with such a setup; at least using the default components. I've found a graphics class that, although lacking support for hardware acceleration, should be able to provide the functionality needed, while being cross platform (at least as far as Linux and Windows are concerned; I've heard it has problems with Mac).

I'll try and do some testing when I get a chance to see if it looks like the speed is acceptable, especially when dealing with high-resolution.
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: 2.00 Aim for cross-platform?
« Reply #16 on: August 20, 2015, 10:07:46 AM »
Okay well; regardless of what I'm trying, I'm having no luck with compiling a Linux version, regardless of what libraries I use, and regardless of whether I try to cross-compile or compile it on Linux natively.

As such, I'm going to stick to Windows-only. Of course the option is there for me (or someone else) to port it later. I'll still use Lazarus for it, so it should (theoretically at least) be able to be compiled for Linux.

Sorry to anyone who had hoped for a Linux version. However, it should hopefully continue to work fine under WINE.
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline geoo

  • Administrator
  • Posts: 1473
    • View Profile
Re: 2.00 Aim for cross-platform?
« Reply #17 on: August 20, 2015, 08:53:17 PM »
What kind of errors are you getting? Is it using some weird Delphi specific stuff that's not natively part of the Pascal language?

btw, I hadn't used (Neo)Lemmix much in Wine before, but now the fullscreen is working a bit erraticly, sometimes when testing the level, it just shows a small 640x480 (or so) section of what should be displayed, meaning I can't see most of the playfield. The preview screen is sometimes also windowed (but completely visible) and sometimes fullscreen. But usually with a restart or two of wine it happens to work fine at some point.

EDIT: Sorry, I didn't realize this was actually locked for whatever reason until Simon made me aware of it when he wanted to reply.
<SimonN> geoo: you wizard of admin rights, I wanted to reply to that topic too (cross-platform NL) and he locked it
« Last Edit: August 20, 2015, 09:00:43 PM by geoo »

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: 2.00 Aim for cross-platform?
« Reply #18 on: August 21, 2015, 02:31:49 AM »
Basically; Lazarus is insisting that it can't find a certain file in the "uses" section, even though I've triple-checked that it's in the search path. The exact same setup compiles without any problems on Windows (this does mean that if I can get cross-compile to work, this could be an alternative option, but as I mentioned I've had no luck with that either). I might take another look and see if I can get it going at some point, but I'm kind of making it a low priority for now.

EDIT: At a quick glance, it seems the problem here *might* be caused by my unfamiliarity with Linux; in particular, not taking into account its case-sensitive nature with filenames. I'll check and see if this is really the issue...

EDIT: Indeed, adjusting for this got the code to compile! This does still leave a major issue in that the compiled code doesn't seem to actually work (it displays a blank window, and doesn't resize / go full screen as it should), but if I've at least got it to compile, then that's a start.

EDIT: Okay, I've got the resizing of the image display handled; the problem comes from that when an image is displayed on the window, the OnKeyDown event of the form applies under Windows, but of the image applies under Linux. Goes without saying that I have no idea why this happens; but simply making sure *both* handle the event properly solves this issue. For some reason though, it doesn't actually resize the window itself properly... and it still won't actually display the image under Linux. Through some other test code I inserted, I can confirm the problem comes from actually *loading* the image; not from displaying it.

EDIT: Tried modifying the code so that it uses a standard Lazarus class to load the image, before transferring it into the addon graphics package one. The result was the app (which I should mention - at this point, all it does is display a static image and resize it according to zoom / full screen) taking FOREVER to load. Once it loaded, the image display worked fine (still need to address the resize issue). I believe this is due to the standard class being known to perform very slow on Linux; but another weird thing happened here - the result was inverted colors when tested on Windows, yet correct color displays when testing on Linux.

All in all, it looks like indeed, cross-platform is going to be far too much of a hassle if I intend to use anything Delphi-like to do it. With this in mind, I go back to what I said before - NeoLemmix V2.00n is still going to be Windows-only. Given this, I'm considering just working with Delphi, as there's quite a few things that annoy me about Lazarus's interface... I would assume that should someone be willing to get around these issues, converting it to Lazarus would be the least difficult part, since Lazarus 99% automates that.
« Last Edit: August 21, 2015, 03:31:17 AM by namida »
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)