Pages: 1 2 3 »
  Print  
Author Topic: Help! Make a Game Maker project compatible with Enigma.  (Read 4089 times)
Offline (Unknown gender) Mikelle02
Posted on: February 17, 2016, 10:22:53 AM
Member
Joined: Feb 2016
Posts: 16

View Profile Email
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 ?
« Last Edit: February 17, 2016, 10:36:53 AM by Mikelle02 » Logged
Offline (Unknown gender) TheExDeus
Reply #1 Posted on: February 17, 2016, 02:58:32 PM

Developer
Joined: Apr 2008
Posts: 1886

View Profile
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.
Logged
Offline (Unknown gender) Mikelle02
Reply #2 Posted on: February 20, 2016, 07:35:23 AM
Member
Joined: Feb 2016
Posts: 16

View Profile Email
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:
Code: [Select]
   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:
Code: [Select]
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:
Code: [Select]
   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.
Logged
Offline (Unknown gender) Mikelle02
Reply #3 Posted on: February 20, 2016, 07:47:34 AM
Member
Joined: Feb 2016
Posts: 16

View Profile Email
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 ?
Logged
Offline (Unknown gender) Mikelle02
Reply #4 Posted on: February 23, 2016, 06:32:12 AM
Member
Joined: Feb 2016
Posts: 16

View Profile Email
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 :
Code: [Select]
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.
Logged
Offline (Male) time-killer-games
Reply #5 Posted on: March 12, 2016, 03:35:51 PM

Contributor
Location: Virginia Beach
Joined: Jan 2013
Posts: 1168

View Profile Email
try removing the spaces before function parentheses. May or may not be of any use to you.
« Last Edit: March 12, 2016, 03:38:45 PM by time-killer-games » Logged
Offline (Unknown gender) TheExDeus
Reply #6 Posted on: March 13, 2016, 10:51:27 AM

Developer
Joined: Apr 2008
Posts: 1886

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

Quote
I 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.

Quote
try 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.
Logged
Offline (Unknown gender) Mikelle02
Reply #7 Posted on: March 25, 2016, 05:04:53 AM
Member
Joined: Feb 2016
Posts: 16

View Profile Email
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.
Logged
Offline (Unknown gender) Mikelle02
Reply #8 Posted on: March 25, 2016, 05:11:22 AM
Member
Joined: Feb 2016
Posts: 16

View Profile Email
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 ?
Logged
Offline (Unknown gender) TheExDeus
Reply #9 Posted on: March 26, 2016, 07:15:24 AM

Developer
Joined: Apr 2008
Posts: 1886

View Profile
Quote
OpenGL 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.
Logged
Offline (Unknown gender) Hoohee
Reply #10 Posted on: September 03, 2017, 03:07:45 PM
Member
Joined: Aug 2017
Posts: 40

View Profile
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.
Code: [Select]
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.
Logged
Offline (Male) hpg678
Reply #11 Posted on: September 03, 2017, 03:40:24 PM

Member
Location: Barbados
Joined: Mar 2017
Posts: 259

View Profile Email
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.
Code: [Select]
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].
« Last Edit: September 03, 2017, 09:23:01 PM by hpg678 » Logged
Hugar
Offline (Male) faissaloo
Reply #12 Posted on: September 04, 2017, 08:26:47 AM

Contributor
Location: Britbongistan
Joined: Jan 2013
Posts: 88

View Profile WWW Email
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.
Code: [Select]
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.
Logged
Offline (Male) hpg678
Reply #13 Posted on: September 04, 2017, 10:12:31 AM

Member
Location: Barbados
Joined: Mar 2017
Posts: 259

View Profile Email
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);
« Last Edit: September 04, 2017, 10:28:50 AM by hpg678 » Logged
Hugar
Offline (Unknown gender) Hoohee
Reply #14 Posted on: September 04, 2017, 10:23:02 PM
Member
Joined: Aug 2017
Posts: 40

View Profile
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:
Code: [Select]
draw_self draw_sprite_ext(sprite_index,-1,x,y,image_xscale,image_yscale,image_angle,image_blend,image_alpha)
also 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.
« Last Edit: September 04, 2017, 10:24:58 PM by Hoohee » Logged
Pages: 1 2 3 »
  Print