Pages: 1
Author Topic: GM8 usable with LGM...  (27,921 Views)
Offline (Unknown gender) Faithbuilders

Member
Joined: Jan 2015
Posts: 19
View profile
Posted on: January 29, 2015, 03:52:17 AM
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
Offline (Unknown gender) Rusky

Resident Troll
Joined: Feb 2008
Posts: 954
View profile WWW
Reply #1 Posted on: January 29, 2015, 06:38:24 AM
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.
Offline (Unknown gender) TheExDeus

Developer
Joined: Apr 2008
Posts: 1,860
View profile
Reply #2 Posted on: January 29, 2015, 01:01:41 PM
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.
Offline (Unknown gender) Faithbuilders

Member
Joined: Jan 2015
Posts: 19
View profile
Reply #3 Posted on: January 29, 2015, 04:57:18 PM
Sounds like I need to learn some C++  :-\ I hope there are some good tutorials for complete noobes like me.  :) Thanks
Pages: 1