Pages: 1
  Print  
Author Topic: GM8 usable with LGM...  (Read 4376 times)
Offline (Unknown gender) Faithbuilders
Posted on: January 28, 2015, 10:52:17 pm
Member
Joined: Jan 2015
Posts: 19

View Profile Email
It is said that GM files can be used with LGM (Enigma) Just wondering how far is that true? In other words, are there commands from GM that don't work in LGM, and what would the alternative command be?

I dabbled around with GM8 for some time, but I still consider myself a noobe. And wish to do all my programing in LGM, but GM seems to have much more tutorials, and examples. So I am hoping to use those in LGM.

BTW thank you to all who made that FREE Game Maker possible.  ;D
Logged
Offline (Male) Rusky
Reply #1 Posted on: January 29, 2015, 01:38:24 am

Resident Troll
Joined: Feb 2008
Posts: 954
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
ENIGMA is designed to be compatible that way, although there are lots of small differences in behavior that mostly come up when you're trying to port something from GM. If you start a project in ENIGMA you probably won't have as many problems, you'll just end up tweaking things differently than you would in GM.
Logged
Offline (Unknown gender) TheExDeus
Reply #2 Posted on: January 29, 2015, 08:01:41 am

Developer
Joined: Apr 2008
Posts: 1860

View Profile
Some things like execute_string() will probably not happen in ENIGMA ever (although I really want a runtime scripting language in ENIGMA). Other things mostly work. Even shaders from GM:S are in 95% cases (from my tests) compatible with ENIGMA. The changes most people have to make for their GM projects to work in ENIGMA is changing code like this:
Code: (edl) [Select]
if (collision_point(....)){
//Code here if collision
}
to this:
Code: (edl) [Select]
if (collision_point(....) != noone){
//Code here if collision
}
The reason for this is that in GM every negative number if false, and any positive is true. In ENIGMA, because we use C++, any non-zero number is true (including negative) and only zero is false. Collision functions return noone (which is actually the number -4) if no collision was detected and in GM -4 = false. In ENIGMA -4 = true, so the code inside the collision would run even if no collision was detected. So you have to explicitly test for noone. There can be other small differences, like ENIGMA not rounding numbers, so instead of 0 you sometimes get 0.00000000000000000000000000001 or something. That also comes from C++ and how floating point numbers are handled in it.
« Last Edit: January 29, 2015, 08:05:08 am by TheExDeus » Logged
Offline (Unknown gender) Faithbuilders
Reply #3 Posted on: January 29, 2015, 11:57:18 am
Member
Joined: Jan 2015
Posts: 19

View Profile Email
Sounds like I need to learn some C++  :-\ I hope there are some good tutorials for complete noobes like me.  :) Thanks
Logged
Pages: 1
  Print