|
|
Mikelle02
|
|
Reply #2 Posted on: February 20, 2016, 07:35:23 am |
|
|
Joined: Feb 2016
Posts: 16
|
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.
|
|
|
Logged
|
|
|
|
|
Mikelle02
|
|
Reply #4 Posted on: February 23, 2016, 06:32:12 am |
|
|
Joined: Feb 2016
Posts: 16
|
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.
|
|
|
Logged
|
|
|
|
time-killer-games
|
|
Reply #5 Posted on: March 12, 2016, 03:35:51 pm |
|
|
"Guest"
|
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
|
|
|
|
TheExDeus
|
|
Reply #6 Posted on: March 13, 2016, 10:51:27 am |
|
|
Joined: Apr 2008
Posts: 1860
|
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. 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. 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
|
|
|
|
Mikelle02
|
|
Reply #7 Posted on: March 25, 2016, 05:04:53 am |
|
|
Joined: Feb 2016
Posts: 16
|
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
|
|
|
|
|
TheExDeus
|
|
Reply #9 Posted on: March 26, 2016, 07:15:24 am |
|
|
Joined: Apr 2008
Posts: 1860
|
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
|
|
|
|
Hoohee
|
|
Reply #10 Posted on: September 03, 2017, 03:07:45 pm |
|
|
Joined: Aug 2017
Posts: 40
|
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.
|
|
|
Logged
|
|
|
|
hpg678
|
|
Reply #11 Posted on: September 03, 2017, 03:40:24 pm |
|
|
Location: Barbados Joined: Mar 2017
Posts: 283
|
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].
|
|
« Last Edit: September 03, 2017, 09:23:01 pm by hpg678 »
|
Logged
|
[compromised account]
|
|
|
faissaloo
|
|
Reply #12 Posted on: September 04, 2017, 08:26:47 am |
|
|
Location: Britbongistan Joined: Jan 2013
Posts: 87
|
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.
|
|
|
Logged
|
|
|
|
hpg678
|
|
Reply #13 Posted on: September 04, 2017, 10:12:31 am |
|
|
Location: Barbados Joined: Mar 2017
Posts: 283
|
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
|
[compromised account]
|
|
|
Hoohee
|
|
Reply #14 Posted on: September 04, 2017, 10:23:02 pm |
|
|
Joined: Aug 2017
Posts: 40
|
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) 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
|
|
|
|
|