Pages: 1
Author Topic: Easy Cross-compiling?  (54,347 Views)
Offline (Unknown gender) edsquare

Member
Joined: Apr 2014
Posts: 402
View profile
Posted on: May 25, 2014, 02:33:37 PM
Since ENIGMA parses EDL to C++ and you can even use C++ to program your game...

I was thinking if it wouldn't be possible to pass that C++ code to GCC in order to compile it?

This way if you want to compile for a different platform you only choose it from a dropdown menu, ENIGMA takes the instructions atached to that option and your code and passes it to GCC who does the actual compiling.
Offline (Unknown gender) Darkstar2

Member
Joined: Jan 2014
Posts: 1,238
View profile
Reply #1 Posted on: May 25, 2014, 04:23:16 PM
I don't think it works that way, if only it were really that easy :D  There would probably need some changes hardcoded in ENIGMA itself (components), etc.  Your compiled game is linked to an engine.  There would have to be many changes in the engine to support other platforms.  For example, currently OGL1, OGL3, DX9 is supported but no OGLES yet, that would be required for Android, etc.
Offline (Unknown gender) edsquare

Member
Joined: Apr 2014
Posts: 402
View profile
Reply #2 Posted on: May 25, 2014, 04:42:07 PM
Quote from: Darkstar2 on May 25, 2014, 04:23:16 PM
I don't think it works that way, if only it were really that easy :D  There would probably need some changes hardcoded in ENIGMA itself (components), etc.  Your compiled game is linked to an engine.  There would have to be many changes in the engine to support other platforms.  For example, currently OGL1, OGL3, DX9 is supported but no OGLES yet, that would be required for Android, etc.

Of course you'll need to hardcode some changes both to enigma and lgm, mainly the export to C++, the dropdown menu, and the configuration of the acctions of the menu in order to take the C++ code and compile it for the chosen platform.

Regarding all the APIs...

Why not switch to SDL: http://www.libsdl.org/  It supports mac, ios, android, windows and of course linux; only disadvantage it doesnt have a java binding  :( but it does have C, C++, C#, Lua, Python and Pascal. (Which is why I'm using it to port ENIGMA-LGM to Lazarus-FPC)

Or SFML: http://www.sfml-dev.org/ It does have a Java binding among a host of others, only disadvantage it still doesn't support android nor ios  :(

I think SDL would be a best choice since part of the code is in C++ anyway, also you could write that specific part in C++ and call it from your java code, anyway you end up mantaining only one API which must be tons of time saving (After the conversion of the code of course).  ;)
Offline (Unknown gender) Goombert

Developer
Joined: Jan 2013
Posts: 2,991
View profile
Reply #3 Posted on: May 25, 2014, 11:35:09 PM
Actually, yes, cheeseboy built a cross-compiler patch so you could build for Win32 from Linux and it would launch the game in WINE.
http://enigma-dev.org/forums/index.php?topic=1254.0

It is however, unlikely to function at this point in time.
Offline (Unknown gender) edsquare

Member
Joined: Apr 2014
Posts: 402
View profile
Reply #4 Posted on: May 26, 2014, 03:21:04 AM
Quote from: Robert B Colton on May 25, 2014, 11:35:09 PM
Actually, yes, cheeseboy built a cross-compiler patch so you could build for Win32 from Linux and it would launch the game in WINE.
http://enigma-dev.org/forums/index.php?topic=1254.0

It is however, unlikely to function at this point in time.

When it finally works will it be included in Enigma? so we simple mortals don't have to hunt it down, download it and then finally install it?
Offline (Unknown gender) Rusky

Resident Troll
Joined: Feb 2008
Posts: 954
View profile WWW
Reply #5 Posted on: May 26, 2014, 03:57:54 AM
Don't hold your breath for ENIGMA to be polished or usable ever.
Offline (Unknown gender) Goombert

Developer
Joined: Jan 2013
Posts: 2,991
View profile
Reply #6 Posted on: May 26, 2014, 04:54:57 AM
It worked before edsquare, I'm just postulating that it may have broken.
Offline (Unknown gender) edsquare

Member
Joined: Apr 2014
Posts: 402
View profile
Reply #7 Posted on: May 26, 2014, 05:18:03 AM
Quote from: Robert B Colton on May 26, 2014, 04:54:57 AM
It worked before edsquare, I'm just postulating that it may have broken.

Okey will try it some day soon  :D
Offline (Unknown gender) edsquare

Member
Joined: Apr 2014
Posts: 402
View profile
Reply #8 Posted on: May 26, 2014, 05:20:48 AM
Quote from: Rusky on May 26, 2014, 03:57:54 AM
Don't hold your breath for ENIGMA to be polished or usable ever.

I don't hold my breath for anything, as far as I can see it is usable and from at least 2 perspectives 100% better than GM:

1.- It's Opensource!
2.- It's free as in beer and as in speach!
3.- Instead of holding your breath or trolling, why don't you help make it "usable and polished"?
Offline (Unknown gender) Goombert

Developer
Joined: Jan 2013
Posts: 2,991
View profile
Reply #9 Posted on: May 26, 2014, 06:29:39 AM
Because he is a resident troll  (Y)
Offline (Unknown gender) Rusky

Resident Troll
Joined: Feb 2008
Posts: 954
View profile WWW
Reply #10 Posted on: May 26, 2014, 05:12:59 PM
I'm (in the time that I have) working on other things that are less fundamentally sad.
Offline (Unknown gender) Darkstar2

Member
Joined: Jan 2014
Posts: 1,238
View profile
Reply #11 Posted on: May 26, 2014, 05:23:22 PM
Quote from: Rusky on May 26, 2014, 05:12:59 PM
I'm (in the time that I have) working on other things that are less fundamentally sad.

I'm sure YoYoGames is always hiring good talent.
Have you sent them your CV yet ? They pay a much better salary than ENIGMA. :P


Offline (Unknown gender) edsquare

Member
Joined: Apr 2014
Posts: 402
View profile
Reply #12 Posted on: May 27, 2014, 04:40:20 PM
Quote from: lonewolff on May 27, 2014, 11:18:11 AM
LOL - yoyogames is actually hiring at the moment. No way I am moving to Scotland for a pay cut though ;)

It's a shame then that I don't know enough to apply for the job, I'm sure it would be many times over what I'm currently making and besides...
Drinking single malt not blended scotch there must be way cheapper than here in México.  :(
Offline (Unknown gender) Darkstar2

Member
Joined: Jan 2014
Posts: 1,238
View profile
Reply #13 Posted on: May 27, 2014, 05:10:51 PM
Quote from: edsquare on May 27, 2014, 04:40:20 PM
It's a shame then that I don't know enough to apply for the job,

Who said you actually needed to know enough :D  No experience needed. :P

Quote
I'm sure it would be many times over what I'm currently making and besides...

Yes, thank wee customers !  ::)

Quote
Drinking single malt not blended scotch there must be way cheapper than here in México.  :(

lol!
Pages: 1