Pages: 1 2 3
Author Topic: Help! Make a Game Maker project compatible with Enigma.  (209,895 Views)
Offline (Unknown gender) Mikelle02

Member
Joined: Feb 2016
Posts: 16
View profile
Posted on: February 17, 2016, 03:22:53 PM
Hi everyone ,
I'm a Noob here.
I started to use Enigma right after Game Maker 8.1 .
I noticed I can't exeute none of my projects I made with Game Maker 8.1 so I want to know how to format my all of my projects to be executed on Enigma ?

However for what platform can I compile to ?
Offline (Unknown gender) TheExDeus

Developer
Joined: Apr 2008
Posts: 1,860
View profile
Reply #1 Posted on: February 17, 2016, 07:58:32 PM
LGM (the IDE for ENIGMA) can load GMK, GMX and some older formats too. For 8.1 I think it's best to use GMK. ENIGMA probably won't run your projects out-of-the-box, as GM and ENIGMA is not 100% compatible. But converting is usually trivial.

ENIGMA runs on Windows (100% sure as I use it), Linux and Mac (I'm 80% sure). No other platforms, sorry. You can try posting a game here and I will see if I can help running it.
Offline (Unknown gender) Mikelle02

Member
Joined: Feb 2016
Posts: 16
View profile
Reply #2 Posted on: February 20, 2016, 12:35:23 PM
I managed to convert an old Game maker 8.1 project.
It's an Asteroids game I'm making to learn and practise gml programming language.
I succeffuly ported the game to Enigma and now I can run the game with both Game maker 8.1 and Enigma.

Now the problem is that Enigma feels to slow to perform a simple instance_create function.

Let me explain better.

This is a cut of a part of the STEP event of my obj_button object:

   if (keyboard_check(vk_enter))
  {
    obj_button.visible =false;
    obj_menu_init.visible=false;
  };

That code will hide Play,Continue,Settings and the button from the screen during the Settings windows is opened.

This is the full code of the STEP event of my obj_system object:

if room == rm_menu
{
with (other)
{
if obj_button.visible =false && obj_menu_init.visible=false
  {
  if !instance_exists (obj_settings_menu_a)
   {
    instance_create (0,0,obj_settings_menu_a);
    if keyboard_check (vk_backspace)
    {
     obj_button.visible =true;
     obj_menu_init.visible =true;             
    }; 
   };
   if keyboard_check (vk_backspace)
   {
     with (obj_settings_menu_a)
    {
     instance_destroy ();
    };
   }; 
  };
};
};

That code will check if there is a settings menu state to create or destroy the object object_settings_menu_a.

This is the full code of the DRAW event of object_settings_menu_a for now:

   draw_set_alpha(0.5);
   draw_set_color(c_black);
   draw_rectangle(0,0,room_width,room_height,0);

It explains itself.

All the project runs perfectly in Game Maker 8.1 but for no kid of reason for me not as well in Enigma which takes times to perform all the code I wrote here.
Offline (Unknown gender) Mikelle02

Member
Joined: Feb 2016
Posts: 16
View profile
Reply #3 Posted on: February 20, 2016, 12:47:34 PM
I found that the project will perform the DRAW event only if i press vk_space right after vk_enter to enter in the settings menu.
Do I miswrote something ?
Offline (Unknown gender) Mikelle02

Member
Joined: Feb 2016
Posts: 16
View profile
Reply #4 Posted on: February 23, 2016, 11:32:12 AM
Quote from: TheExDeus on February 17, 2016, 07:58:32 PM
LGM (the IDE for ENIGMA) can load GMK, GMX and some older formats too. For 8.1 I think it's best to use GMK. ENIGMA probably won't run your projects out-of-the-box, as GM and ENIGMA is not 100% compatible. But converting is usually trivial.

ENIGMA runs on Windows (100% sure as I use it), Linux and Mac (I'm 80% sure). No other platforms, sorry. You can try posting a game here and I will see if I can help running it.

Okay , forgot the code I wrote before.
I even change the code of the STEP event of my obj_system object into :

with (other)
{
if obj_button.visible==false && obj_menu_init.visible==false
  {
  if !instance_exists (obj_settings_menu_a)
   {
    instance_create (0,0,obj_settings_menu_a); 
   };
   if instance_exists (obj_settings_menu_a)
   {
    if keyboard_check (vk_backspace)
    {
      with (other)
     {
      obj_button.visible =true;
      obj_menu_init.visible =true;
     };
      with (obj_settings_menu_a)
     {
      instance_destroy ();
     };
    };
   }; 
  };
};


Again Game Maker 8.1 works Enigma NOT.
But I found something very interesting.
Every time I execute my project in Enigma I got this.
Offline (Unknown gender) time-killer-games
Guest


Email
Reply #5 Posted on: March 12, 2016, 08:35:51 PM
try removing the spaces before function parentheses. May or may not be of any use to you.
Offline (Unknown gender) TheExDeus

Developer
Joined: Apr 2008
Posts: 1,860
View profile
Reply #6 Posted on: March 13, 2016, 03:51:27 PM
I haven't managed to get your error trough the code you gave, as we lack info about obj_menu_init, obj_button and so on. I don't think the bug is in the code you gave and it might be elsewhere. So either give a simple example or try debugging.
To debug:
Compile in debug mode. Then run command line "cmd", go to the directory you have your exe ("cd c:/path/to/my/dir") and run trough debugger ("gdb my_game.exe"). Then type "run". After it crashes type "bt" to get the backtrace. Then post it here, it will show where the error happened.

QuoteI even change the code of the STEP event of my obj_system object into :
This doesn't crash either, even though it is not valid. "other" in step event outside of a "with(){}" statement doesn't make sense. So while it doesn't crash, I don't know what would actually execute there.

Quotetry removing the spaces before function parentheses. May or may not be of any use to you.
I don't see how it could matter. Maybe a parser bug could have a problem with that, but I doubt it's the issue here.
Offline (Unknown gender) Mikelle02

Member
Joined: Feb 2016
Posts: 16
View profile
Reply #7 Posted on: March 25, 2016, 10:04:53 AM
I managed to get it working.
I'll attach the files to let see the changes.
As I said I'm totally Noob , but I want to learn  :) so if someone has a suggestion for me let me know it.
Offline (Unknown gender) Mikelle02

Member
Joined: Feb 2016
Posts: 16
View profile
Reply #8 Posted on: March 25, 2016, 10:11:22 AM
I tested both using GM8.1 and Enigma
However .-. do you know if it is possible to export to export to an Arm Linux platform ?
To be precise I would like to export the executable to an ARM Cortex A8 platform which has PowerVR SGX Gpu with OpenGL Es 2.0 Support and 512 MB DDR SDRam.
Is it possible ?
Offline (Unknown gender) TheExDeus

Developer
Joined: Apr 2008
Posts: 1,860
View profile
Reply #9 Posted on: March 26, 2016, 12:15:24 PM
QuoteOpenGL Es 2.0
This would be the main problem. We don't have GLES support yet, but technically it shouldn't be that hard to adapt the GL3.3 system to it. ARM itself is not an issue, as the ENIGMA engine itself is pure C++ with few real 3rd party dependencies, and so it should be possible to be compiled to ARM. I have actually ran LGM on Nvidia Jetson TK1, which is ARM, and was able to compile an empty game, as it supports GL3 for rendering. Sadly I'm the only one who works on ENIGMA engine right now and I don't have GLES as a priority now. Maybe another contributor can try.

I will check the changes you did.
Offline (Unknown gender) Hoohee

Member
Joined: Aug 2017
Posts: 40
View profile
Reply #10 Posted on: September 03, 2017, 08:07:45 PM
I got mine to load, but the character doesn't appear, and maybe it's the draw event that doesn't work with Enigma.  Take a look at this, and see if it looks bad to you.
draw_sprite_ext(sprite_index,-1,x,y,image_xscale,image_yscale,image_angle,image_blend,image_alpha)
It works in GM8, but not in Enigma.
Offline (Unknown gender) hpg678

Member
Joined: Mar 2017
Posts: 283
View profile
Reply #11 Posted on: September 03, 2017, 08:40:24 PM
Quote from: Hoohee on September 03, 2017, 08:07:45 PM
I got mine to load, but the character doesn't appear, and maybe it's the draw event that doesn't work with Enigma.  Take a look at this, and see if it looks bad to you.
draw_sprite_ext(sprite_index,-1,x,y,image_xscale,image_yscale,image_angle,image_blend,image_alpha)
It works in GM8, but not in Enigma.

the problem seems to be [-1] which is to represent the sub-image of the sprite. A value of -1 indicates an invisible or non-existent sprite. Sprites sub-image starts from 0.

If you have an animated sprite, then the sub-images would start from 0 to the number of images-1. E.g if you have an animated sprite with a total of 5 images, then the sub-images with be numbered from 0 to[4].
Offline (Unknown gender) faissaloo

Contributor
Joined: Jan 2013
Posts: 87
View profile WWW
Reply #12 Posted on: September 04, 2017, 01:26:47 PM
Quote from: hpg678 on September 03, 2017, 08:40:24 PM
Quote from: Hoohee on September 03, 2017, 08:07:45 PM
I got mine to load, but the character doesn't appear, and maybe it's the draw event that doesn't work with Enigma.  Take a look at this, and see if it looks bad to you.
draw_sprite_ext(sprite_index,-1,x,y,image_xscale,image_yscale,image_angle,image_blend,image_alpha)
It works in GM8, but not in Enigma.

the problem seems to be [-1] which is to represent the sub-image of the sprite. A value of -1 indicates an invisible or non-existent sprite. Sprites sub-image starts from 0.

If you have an animated sprite, then the sub-images would start from 0 to the number of images-1. E.g if you have an animated sprite with a total of 5 images, then the sub-images with be numbered from 0 to[4].
This is incorrect, -1 will animate the sprite.
Offline (Unknown gender) hpg678

Member
Joined: Mar 2017
Posts: 283
View profile
Reply #13 Posted on: September 04, 2017, 03:12:31 PM
so sorry about that. I was indeed wrong. i was thinking in terms of the sprite being visible or not and got mixed up.

try adding the statement (draw_self) in the DRAW event and see what happens.

also maybe in that case you may need to define the (sprite_index);
Offline (Unknown gender) Hoohee

Member
Joined: Aug 2017
Posts: 40
View profile
Reply #14 Posted on: September 05, 2017, 03:23:02 AM
Quote from: hpg678 on September 04, 2017, 03:12:31 PM
so sorry about that. I was indeed wrong. i was thinking in terms of the sprite being visible or not and got mixed up.

try adding the statement (draw_self) in the DRAW event and see what happens.

Where, exactly?  It didn't work to write this:
draw_self draw_sprite_ext(sprite_index,-1,x,y,image_xscale,image_yscale,image_angle,image_blend,image_alpha)

Quote from: hpg678 on September 04, 2017, 03:12:31 PMalso maybe in that case you may need to define the (sprite_index);

I can try some stuff out for that.

Also, if this helps, the object that isn't appearing is the player character.  All others render right, so far as I can tell.
Pages: 1 2 3