ENIGMA Forums

Contributing to ENIGMA => Proposals => Topic started by: edsquare on May 25, 2014, 09:33:37 AM

Title: Easy Cross-compiling?
Post by: edsquare on May 25, 2014, 09:33:37 AM
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.
Title: Re: Easy Cross-compiling?
Post by: Darkstar2 on May 25, 2014, 11:23:16 AM
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.
Title: Re: Easy Cross-compiling?
Post by: edsquare on May 25, 2014, 11:42:07 AM
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).  ;)
Title: Re: Easy Cross-compiling?
Post by: Goombert on May 25, 2014, 06: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.
Title: Re: Easy Cross-compiling?
Post by: edsquare on May 25, 2014, 10:21:04 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?
Title: Re: Easy Cross-compiling?
Post by: Rusky on May 25, 2014, 10:57:54 PM
Don't hold your breath for ENIGMA to be polished or usable ever.
Title: Re: Easy Cross-compiling?
Post by: Goombert on May 25, 2014, 11:54:57 PM
It worked before edsquare, I'm just postulating that it may have broken.
Title: Re: Easy Cross-compiling?
Post by: edsquare on May 26, 2014, 12:18:03 AM
It worked before edsquare, I'm just postulating that it may have broken.

Okey will try it some day soon  :D
Title: Re: Easy Cross-compiling?
Post by: edsquare on May 26, 2014, 12:20:48 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"?
Title: Re: Easy Cross-compiling?
Post by: Goombert on May 26, 2014, 01:29:39 AM
Because he is a resident troll  (Y)
Title: Re: Easy Cross-compiling?
Post by: Rusky on May 26, 2014, 12:12:59 PM
I'm (in the time that I have) working on other things that are less fundamentally sad.
Title: Re: Easy Cross-compiling?
Post by: Darkstar2 on May 26, 2014, 12:23:22 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


Title: Re: Easy Cross-compiling?
Post by: edsquare on May 27, 2014, 11:40:20 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.  :(
Title: Re: Easy Cross-compiling?
Post by: Darkstar2 on May 27, 2014, 12:10:51 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!