Irrlicht project to Linux

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
dart_theg
Posts: 55
Joined: Sun Dec 29, 2024 3:13 am

Irrlicht project to Linux

Post by dart_theg »

I want to make my Irrlicht project available to run on a Linux system, and it has currently been built for windows using LuaJIT and sol2. What are the steps I should take to make this compatible? I've heard to make sure the Software driver type works, or Linux likes OpenGL, or need to get Vulkan to run with arm64? I'm definitely lacking knowledge in this area so any help is appreciated.
CuteAlien
Admin
Posts: 9937
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrlicht project to Linux

Post by CuteAlien »

I have no experience using LUA with Irrlicht. But as for Irrlicht - as long as you use OpenGL it will usually be fine on Linux.
As a first step you can also try to get it running with gcc on Windows. That way you can get most compiler troubles out of the way first.
And the rest is - avoid libraries which are not available on both platforms. And if you use any os specific code in your game then that has to be written twice.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Brainsaw
Posts: 1242
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Re: Irrlicht project to Linux

Post by Brainsaw »

To prepare for migration I find it useful to put all platform specific methods (e.g. getting the download / user data path and such) to a separate module so that you only have one place to modify if necessary (of course it's best to avoid platform specific code, but it's not always possible). In my projects the header file is named "CPlatform.h" and there are several implementations, e.g. "CPlatformWindows.cpp" and "CPlatformAndroid.cpp" which implement the methods and are only included when compiling for the specific platform.

Apart from that getting an Irrlicht project to run on Linux should not be a big deal (at least from the graphics), it took me a day or two to run my game on the Raspberry Pi
Image
Dustbin::Games on the web: https://www.dustbin-online.de/
n00bc0de
Posts: 123
Joined: Tue Oct 04, 2022 1:21 am

Re: Irrlicht project to Linux

Post by n00bc0de »

Irrlicht comes in the official repos of almost every linux distro. If you install from there it usually just builds right out of the box.

That said, I would still recommend cloning the latest version of 1.9 from the sourceforge repo. There is a code blocks project in the source folder that can be used to build irrlicht without ever touching the terminal.
dart_theg
Posts: 55
Joined: Sun Dec 29, 2024 3:13 am

Re: Irrlicht project to Linux

Post by dart_theg »

Currently compiling on Ubuntu, combing through errors and library linking stuff. I’ll keep this thread posted but so far so good I suppose… The big issues at this time come from getting luajit, sol2, etc. to work more than irrlicht.
Post Reply