Pages: 1
  Print  
Author Topic: Easy Cross-compiling?  (Read 4617 times)
Offline (Male) edsquare
Posted on: May 25, 2014, 09:33:37 am

Member
Location: The throne of ringworld
Joined: Apr 2014
Posts: 402

View Profile
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.
Logged
A child of five would understand this. Send someone to fetch a child of five.
Groucho Marx
Offline (Unknown gender) Darkstar2
Reply #1 Posted on: May 25, 2014, 11:23:16 am
Member
Joined: Jan 2014
Posts: 1238

View Profile Email
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.
Logged
Offline (Male) edsquare
Reply #2 Posted on: May 25, 2014, 11:42:07 am

Member
Location: The throne of ringworld
Joined: Apr 2014
Posts: 402

View Profile
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).  ;)
Logged
A child of five would understand this. Send someone to fetch a child of five.
Groucho Marx
Offline (Male) Goombert
Reply #3 Posted on: May 25, 2014, 06:35:09 pm

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
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.
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Male) edsquare
Reply #4 Posted on: May 25, 2014, 10:21:04 pm

Member
Location: The throne of ringworld
Joined: Apr 2014
Posts: 402

View Profile
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?
Logged
A child of five would understand this. Send someone to fetch a child of five.
Groucho Marx
Offline (Male) Rusky
Reply #5 Posted on: May 25, 2014, 10:57:54 pm

Resident Troll
Joined: Feb 2008
Posts: 954
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
Don't hold your breath for ENIGMA to be polished or usable ever.
Logged
Offline (Male) Goombert
Reply #6 Posted on: May 25, 2014, 11:54:57 pm

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
It worked before edsquare, I'm just postulating that it may have broken.
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Male) edsquare
Reply #7 Posted on: May 26, 2014, 12:18:03 am

Member
Location: The throne of ringworld
Joined: Apr 2014
Posts: 402

View Profile
It worked before edsquare, I'm just postulating that it may have broken.

Okey will try it some day soon  :D
Logged
A child of five would understand this. Send someone to fetch a child of five.
Groucho Marx
Offline (Male) edsquare
Reply #8 Posted on: May 26, 2014, 12:20:48 am

Member
Location: The throne of ringworld
Joined: Apr 2014
Posts: 402

View Profile
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"?
Logged
A child of five would understand this. Send someone to fetch a child of five.
Groucho Marx
Offline (Male) Goombert
Reply #9 Posted on: May 26, 2014, 01:29:39 am

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
Because he is a resident troll  (Y)
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Male) Rusky
Reply #10 Posted on: May 26, 2014, 12:12:59 pm

Resident Troll
Joined: Feb 2008
Posts: 954
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
I'm (in the time that I have) working on other things that are less fundamentally sad.
Logged
Offline (Unknown gender) Darkstar2
Reply #11 Posted on: May 26, 2014, 12:23:22 pm
Member
Joined: Jan 2014
Posts: 1238

View Profile Email
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


Logged
Offline (Male) edsquare
Reply #12 Posted on: May 27, 2014, 11:40:20 am

Member
Location: The throne of ringworld
Joined: Apr 2014
Posts: 402

View Profile
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.  :(
Logged
A child of five would understand this. Send someone to fetch a child of five.
Groucho Marx
Offline (Unknown gender) Darkstar2
Reply #13 Posted on: May 27, 2014, 12:10:51 pm
Member
Joined: Jan 2014
Posts: 1238

View Profile Email
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!
Logged
Pages: 1
  Print