ENIGMA Forums

Outsourcing saves money => Issues Help Desk => Topic started by: BPzeBanshee on August 07, 2013, 03:55:17 am

Title: Warbird A13:02 in ENIGMA
Post by: BPzeBanshee on August 07, 2013, 03:55:17 am
Knowing that GMOSSE (https://shmups.system11.org/viewtopic.php?f=9&t=35075) will probably never work in ENIGMA I've decided to test it with my small-scale project, Warbird. Here's a screenshot of the title screen below, inspired by the Oriental Soft Japan/Triangle Service title G-Stream G2020/DeltaZeal.

(https://i.imgur.com/38eUHcm.png)

It started as a school project in Flash, where I wasted a year having half a dozen teachers try to teach us different "signature" flavours of ActionScript 3, and then have the assistant principal tell us Game Maker would've been allowed under the cirriculum requirements for passing the class anyway. Naturally I told him how much of a bludge the class was and that I could've run the entire class myself if he'd approved of it first, instead of filling half a dozen fill-in teachers' paychecks, by porting it to Game Maker 8.0 Pro within 30 minutes to make a point. As an added bonus, it serves as a nice starter for people scared of GMOSSE's large size but could do a little better on the "best coding practice" front.

Compatibility with ENIGMA isn't 100% at the moment but better than it's been in the past thanks to the efforts of Goombert and company. Listing the remaining problems below for documentation purposes:

- mp3 music is not supported but converting them to OGGs will yield playable music
- fonts are currently not working in RadialGM compiles as of 11-1-19 so no text display, LateralGM compiles will work but slight offset on text

The project's up on Bitbucket here (https://bitbucket.org/BPzeBanshee/warbird), the downloads section has an option to download the entire repository but my experience putting binary downloads up on pastebin has been a mixed bag so no standalones for now. Included is ports to GM 8.0 Lite, GM 8.0 Pro (the original port), GM 8.1 Lite, GM:Studio 1.1 Free and the original Flash project.

Note: music's obviously pinched from G-Stream G2020 as placeholders, if you're gonna make a project based off this replace them first. Sound effects are mine, I don't care what happens to them.

Original post: https://pastebin.com/cfmuFYw1
Title: Re: Warbird A13:02 in ENIGMA
Post by: Goombert on August 07, 2013, 04:07:08 am
Hello there! That is very good for us to hear that at least your game does run, we are starting to reach that stage in development, if you don't mind I am going to move your topic over to W.I.P. since you do have a playable demo.

I did not however meet up with you on the IRC today, I was there almost all day as well.

Quote
Sound effects however do.
Could you please tell us what audio system worked with the sound_effect functions? They have long since been deprecated by GameMaker: Studio but I just added a DirectSound audios system so that we could offer them for backwards compatibility.

Quote
parent event inheritance doesn't seem to work
Event inheritance and polymorphism will be added when our new compiler is finished, it is nearing completion, the current one in usage that compiles the engine and your game is like 5 years old.

Quote
for some reason the Warbird sprite appears after play in the center of the menu. Never seen it in GM before.
That could be related to a graphical inconsistency in screen_refresh or redraw, are you by chance using those functions?

Also, I would like to ask, where exactly did you download ENIGMA from? Did you use our Portable ZIP from the download page? I am going to download and test your game, will post back later.
Title: Re: Warbird A13:02 in ENIGMA
Post by: BPzeBanshee on August 07, 2013, 04:33:24 am
My apologies on thread placement. I'd thought that since the 3D Mario thing was in General Discussion this would fit next to it, guess not. Warbird's really only WIP in the sense that it's a single-stage demonstration - mainly intended for folks interested in my other project but getting lost in its complexity, the GM ports are essentially a "stripped down" version.

The sounds worked, or at least played, using OpenAL. My apologies on the terminology, I don't have any sound_effect functions used, just "SFX" like the player shot and enemy bullet shots play correctly. The one where the sounds played strangely I believe was actually the DirectSound system.

Being "stripped down" compared to my other project I'm also not using any extra trickery with the screen, so no screen_refresh() or screen_redraw() is being used.

As for version of ENIGMA, I did indeed use the Portable ZIP from the download page.

I don't suppose the older functions for GM8 will be supported eventually? I found legacy support of GM:Studio EXEs to be rather horrible, and not just in function support but in that running an old computer and trying to load a GM:Studio game just won't work at all.
Title: Re: Warbird A13:02 in ENIGMA
Post by: Goombert on August 07, 2013, 05:36:20 am
Quote
My apologies on thread placement. I'd thought that since the 3D Mario thing was in General Discussion this would fit next to it, guess not.
Don't worry about it, you don't have anything to apologize for, I posted mine there because I did not want to post it 2x in this section and I wanted to let the other developers know about the status of porting a rather big project.

Quote
The sounds worked, or at least played, using OpenAL. My apologies on the terminology, I don't have any sound_effect functions used, just "SFX" like the player shot and enemy bullet shots play correctly. The one where the sounds played strangely I believe was actually the DirectSound system.
Ok that makes a lot more sense, there may be a bug or two in our OpenAL audio system. But DirectSound I can tell you exactly what is wrong, the internal audio format works in WAV so I had to force all sounds to play in 16bit 14100KHz and 2 channels, so you can play multiple sounds but not the same sound averaged together, I need to write a mixer for it. DirectSound though is only for compatibility with people looking for sound_effect functions, I literally wrote it yesterday in just one day for that purpose, DirectSound is deprecated by Microsoft and has been for some time in favor of XAudio which works on Xbox 360 and which I am currently at the moment writing a system for.

Quote
I'm also not using any extra trickery with the screen, so no screen_refresh() or screen_redraw() is being used.
Ok, but just because you are not using them something like that could still be the issue when it goes to the next room the buffer might still be getting swapped but it is just not sorting the depths of objects.

Quote
I don't suppose the older functions for GM8 will be supported eventually? I found legacy support of GM:Studio EXEs to be rather horrible, and not just in function support but in that running an old computer and trying to load a GM:Studio game just won't work at all.
Well like I said about DX, we certainly do provide much more deprecated support than they do, especially for all the sound_* functions, we just don't offer execute_string as our engine actually compiles games so it can't do that or the variable_global_access, however we may possibly be able to add these in the future. I am also aware of Studio not working on older computers, it also does not run in a Virtual Machine, where as ENIGMA can run in emulators I have done it myself using VirtualBox. We also provide graphics systems like OpenGL1 for people with really old graphics hardware, in fact, a lot of people have come here because they have not been able to use Studio.
Title: Re: Warbird A13:02 in ENIGMA
Post by: Josh @ Dreamland on August 07, 2013, 11:56:22 am
I'm suspicious of your input diagnosis. Are the arrow key events never firing, or just not working properly? We've never had problems with input on Windows. It might be that something is disastrously wrong with collisions, and it just seems like it's not responding to input.

Parenting events is my job. I'm working on a whole list of things that need to happen before we have that in. You'll have to excuse the delay; I can't give a good ETA. According to Robert, this accounts for most of the issues in your game. If you like, I'll drop you a PM or email when we have that working. Since you linked us to the source, I'll add your game to my collection of games that need to work out of the box in the new version.

The last issue you mentioned may be related to the room system. Its persistence mechanism is really screwed up, as far as I know.

Title: Re: Warbird A13:02 in ENIGMA
Post by: BPzeBanshee on December 05, 2013, 10:07:05 pm
My apologies for not getting back to you guys sooner.

Clearly ENIGMA has taken several leaps forward since the last time I attempted to get Warbird working under it. I've recently redownloaded the ENIGMA portable installer and tested compiling with the GM8.0 Pro GMK (the original Game Maker port I did for it). The inputs problem was indeed a matter of inheritence: obj_warbird has its own shooting mechanism but movement was inherited from obj_player - no inheritence, no movement. Glad to see that not only has this been resolved but the matter of persistence between rooms appears to be working correctly as well.

With regard to core systems to use, using DirectSound for audio seems to always crash the program, but OpenAL worked fine with no modifications required on the project side. As for video choices, all rendering methods gave me this strange effect with backgrounds:
(http://i.imgur.com/m3Omn1e.png)

In addition to that something seems a bit funny with inherited collision events, or possibly a thing with image_x/yscale. Either way, obj_en1 and obj_en2 inherit from obj_enemytarget. obj_warbird's shot, obj_warbird_shot, does not seem to create an explosion on contact with enemies but does appear to destroy itself anyway UNLESS the obj_en1s are still moving from on top of the screen. Bit confused there.

Finally, attempting to update ENGIMA gave me this error:
Code: [Select]
g++ -Wall -g -I./JDI/src -I. -MMD -MP -c -o .eobjs/./workdir.o ./workdir.cpp
./workdir.cpp:5:31: error: 'TEMP' was not declared in this scope
  std::string workdir = getenv(TEMP) + "/";
                               ^
g++ -Wall -g -I./JDI/src -I. -MMD -MP -c -o .eobjs/./compiler/compile.o compiler
/compile.cpp
compiler/compile.cpp: In function 'void clear_ide_editables()':
compiler/compile.cpp:121:72: error: too many arguments to function 'int mkdir(co
nst char*)'
   if (mkdir((workdir +"Preprocessor_Environment_Editable").c_str(),0755) == -1)

                                                                        ^
In file included from c:\files\enigma\mingw32\i686-w64-mingw32\include\sys\stat.
h:14:0,
                 from compiler/compile.cpp:55:
c:\files\enigma\mingw32\i686-w64-mingw32\include\io.h:267:15: note: declared her
e
   int __cdecl mkdir (const char *) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
Title: Re: Warbird A13:02 in ENIGMA
Post by: Goombert on December 05, 2013, 11:00:22 pm
This is being fixed right now in the following pull request.

https://github.com/enigma-dev/enigma-dev/pull/545

Also, what function are you using to draw that background image?

Edit: I just went and fixed the background function everything should be good when you update again.  (Y)
https://github.com/enigma-dev/enigma-dev/pull/545
Title: Re: Warbird A13:02 in ENIGMA
Post by: BPzeBanshee on December 07, 2013, 03:33:04 am
Thanks for the support Robert. With that fix Warbird now appears to render correctly, or at least without that random black triangle.

Testing under the newest build (after successfully hitting update within git-bash.bat) I'm having some funny issues attempting to actually code anything. "Design" won't compile, anything using Direct3D won't compile, OpenGL3 hides anything with alpha < 1 and no matter what I edit within LateralGM the game acts like obj_ctrl_menu is present and taking me to rm_stage1 on keypress - even when I've deleted obj_ctrl_menu from within the IDE and saved the project as a separate file multiple times.
Title: Re: Warbird A13:02 in ENIGMA
Post by: BPzeBanshee on January 10, 2014, 09:42:52 am
Did some testing today, using the GM 8.0 Pro variant.

The game now appears to work with all graphics renderers mostly okay with some exceptions:
- Alpha behaviour is not quite that of GM when in OpenGL, Direct3D9 behaves as intended
- obj_en1's vspeed inverts but does not trigger next phase when first appearing when running Direct3D9
- Direct3D9 will not show anything in fullscreen
- Direct3D11 will not show anything at all, but appears to be running normally otherwise
- DirectSound crashes the game, OpenAL works fine
- Text seems to be offset by some amount, in GM text is aligned but under ENIGMA the debug text is slightly outside the window and stage clear score text is offset.

In addition, some oddities I've discovered that are partially not-great coding but only show themselves under ENIGMA:
- Bullet collision with enemies aesthetically was not as intended, bullets simply disappear unless obj_en1 is just entering the screen, in GM obj_warbird_shot's collision with obj_enemytarget event takes priority over obj_enemytarget's collision with obj_warbird_shot.
- image_angle doesn't seem to correctly display at the right angle, or possibly is offset. obj_en1 is supposed to turn to 270 (south) and fly down, but gets stuck. In GM it works as intended.
Title: Re: Warbird A13:02 in ENIGMA
Post by: Goombert on January 11, 2014, 03:26:49 am
Hai banshee, allow me to address some of the issues.
Quote
Alpha behaviour is not quite that of GM when in OpenGL, Direct3D9 behaves as intended
That should not be the case, it should in fact be the opposite...
Quote
Direct3D9 will not show anything in fullscreen
That is a known bug caused by display reset implementation, D3D is kind of a pain in the ass.
Quote
Direct3D11 will not show anything at all, but appears to be running normally otherwise
That is because D3D11 is extremely new and does not even have a shader in order to render, it is just the outline of the system so far.
Quote
DirectSound crashes the game, OpenAL works fine
DirectSound works only with the WAV format right now and can only do sound_* functions, it also works fine with Project Mario however.

The rest of your issues could be related to inheritance and things. They will most likely be fixed with the new compiler.
Title: Re: Warbird A13:02 in ENIGMA
Post by: BPzeBanshee on May 17, 2014, 07:56:20 am
I've recently updated ENIGMA after hearing about the last of the inheritance issues getting sorted. I'll list in order of testing as I do, going through the render options etc.

The first two issues I pointed out in my last post still occur. To elaborate more, on Direct3D9, for some reason the enemies that drop down from the screen fly back up again. They also do not fly down when they should rotate to angle *270 and leave, but this bit happens regardless of render choice. Regarding the alpha, the player ship when invulnerable has an alpha effect where it fades to 0 and then fades to 1 somewhat rapidly. In GM8.0 and when using DirectX9, this behaves fine. Under OpenGL however it is sporadic, suddenly becoming fully opaque after fading to 0.

Direct3D11 just crashes. DirectSound also still crashes though this is no surprise seeing as Warbird uses MP3s which last I checked ENIGMA doesn't support.

The text offset I spotted in my last post is still present, apart from this fullscreen in all renders seems to be broken. I get my game's 240x320 box in some corner of the screen and not scaled across at all whatsoever. Aside from this things seem to be rendering fine, no weird colours like I got some time ago.

I've also narrowed down the collision issue I noticed before. It seems if I use a "with other instance_destroy();" in example object A when colliding with example object B, it takes priority over the example object B's own collision event but ONLY when object A is not moving. In the case of Warbird, obj_warbird_shot is losing its aesthetic effect because it's being terminated by obj_enemytarget. Not exactly my brightest hour of programming here but in GM8.0 this wasn't an issue.
Title: Re: Warbird A13:02 in ENIGMA
Post by: Goombert on June 15, 2016, 06:29:46 pm
Your issue with the fading may have been related to the clamping of draw_set_alpha which faissaloo is attempting to fix in this PR:
https://github.com/enigma-dev/enigma-dev/pull/969
Title: Re: Warbird A13:02 in ENIGMA
Post by: BPzeBanshee on June 20, 2016, 01:22:30 am
Excellent news!

I attempted to get ENIGMA working again using a ZIP of faisaloo's master branch to see whether it did indeed fix the image_alpha behaviour on Warbird but it failed to compile the compileEGMF.dll-thing needed to work. Not sure what I did wrong there.
Title: Re: Warbird A13:02 in ENIGMA
Post by: faissaloo on June 20, 2016, 05:47:15 am
Excellent news!

I attempted to get ENIGMA working again using a ZIP of faisaloo's master branch to see whether it did indeed fix the image_alpha behaviour on Warbird but it failed to compile the compileEGMF.dll-thing needed to work. Not sure what I did wrong there.
When using Windows you have to add these dependencies, which I think is what you forgot:
Quote
Finally download the Windows dependencies from here: https://dl.dropboxusercontent.com/u/21117924/WinPatch_28_08_2013.zip (4.77mb's) and extract it. Then just copy all the files in this folder into the enigma-dev folder which was checked-out from the git repo. Now run "ENIGMA.exe", and you should be good to go, you may need to right click and run with administrative privileges the first time. If you want to make a desktop icon then right-click on ENIGMA.exe and send to desktop. It should compile and place a file "compileEGMf.dll" in the same folder as the .exe. If it fails then do manual compilation.
If that doesn't fix it post the full error.
Title: Re: Warbird A13:02 in ENIGMA
Post by: BPzeBanshee on June 21, 2016, 02:41:11 am
I got a bit further after looking at your instructions, it got the compiling to go but still wouldn't accept that it was even there. Putting the exact Java directory in settings.ini fixed that much but I can't open gmx project files with the LateralGM that came with the WinPatch folder, not even a blank room actually compiles and runs anymore, and I can't use the new LateralGM because when I do I get this on startup:

Quote
Operating System: Windows 7
Version: 6.1
Architecture: x86

Java Name: Java HotSpot(TM) Client VM
Java Vendor: Oracle Corporation
Version: 1.8.0_91

Available processors (cores): 8
Free memory (bytes): 230056064
Maximum memory (bytes): 1013645312
Total memory available to JVM (bytes): 259588096

File system root: C:\
Total space (bytes): 224945762304
Free space (bytes): 50593607680
Usable space (bytes): 50593607680

File system root: D:\
Total space (bytes): 0
Free space (bytes): 0
Usable space (bytes): 0

File system root: G:\
Total space (bytes): 1000169533440
Free space (bytes): 629001560064
Usable space (bytes): 629001560064

Stack trace:
java.lang.NoSuchFieldError: FUNCTIONS
   at org.enigma.EnigmaRunner.setupBaseKeywords(EnigmaRunner.java:505)
   at org.enigma.EnigmaRunner.access$0(EnigmaRunner.java:502)
   at org.enigma.EnigmaRunner$3.run(EnigmaRunner.java:187)
I don't know for sure whether it's specific where it's something on my end (my PATH is fine and adding the direct folder instead of Oracle's symlinks made no difference), something in your branch, something in the main branch or something with LGM itself or something with ENIGMA itself.

I'm going to have to just wait until this gets pulled into mainline and an out-of-the-box build gets made available because I no longer have the patience to piece things together. For the last three years running every time I try to get this going it explodes in my face - either just launching it or trying to run a simple 20-second game - when GM:Studio just works.
Title: Re: Warbird A13:02 in ENIGMA
Post by: faissaloo on June 21, 2016, 04:48:18 am
~snip~
Follow this to install it, except instead of the main enigma repo use my fork:
https://enigma-dev.org/docs/Wiki/Install:Windows
Title: Re: Warbird A13:02 in ENIGMA
Post by: BPzeBanshee on July 13, 2016, 05:49:37 am
Saw that the pull request had been merged so I started from scratch as per Install:Windows wiki page.

LateralGM wouldn't compile compileEGMf.dll until I put the specific directory for Java in the settings.ini. %PATH% inclusion is fine, it's literally what the Java installer put for it. Not sure why this still doesn't work for the launcher.

I use the included batch file and type update, it didn't update LateralGM, so I manually downloaded that and put it in. Some other error popped up on attempt to make a blank room run.

Put in enigma.jar from Install:Extra_Packages, got as far as making a blank room. I load up the GM:Pro version of Warbird and I get this very fucking descriptive error:

(http://i.imgur.com/twIqhbU.png)

The debug option didn't help, neither did changing sound or video systems.

Give me a buzz when the barrier for entry isn't so high I have to gdb backtrace anything that isn't a blank room.
Title: Re: Warbird A13:02 in ENIGMA
Post by: faissaloo on July 13, 2016, 07:28:22 am
I have no idea what's going on for you. The GM8.1 version is working fine for me:
(https://i.sli.mg/X6xvdw.png)
I've compiled a Linux version for you:
http://speedy.sh/wPS7P/Warbird
Title: Re: Warbird A13:02 in ENIGMA
Post by: BPzeBanshee on July 16, 2016, 06:19:51 am
Thank you for your patience faisaloo. After a few days to clear my head and a bit of research around the depths of this forum I was able to diagnose the problems with getting LateralGM/ENIGMA itself to work.

Since the information I gleaned to help get this result is scattered around several places apart from the Wiki itself I'll write it down here:
Quote
1) Use 32-bit Java. Apparently some component of ENIGMA won't accept compileEGMf.dll otherwise. In the "idecommand" tag in settings.ini of the portable build I had to specify the exact directory for java.exe.
2) Run git-bash.bat and type "update". This seems to update the bulk of the repo itself but does not account for LateralGM or the other java files.
3) In the ENIGMA folder run install.py. I had Python for Windows already set up so for me it was just a matter of double-clicking but git-bash.bat with "cd ENGIMA" then "install.py" might work too?
4) Run ENIGMA.exe with administrative privileges. This alone made the difference between the really fucking vague error and actually getting a running game.
5) Expect that LateralGM will probably crash spontaneously no matter what you do

From testing I can confirm that the alpha clamping issues previously noticed seem to be gone, however TheExDeus's fixes for direction issues don't seem to have been brought into the mainline branch so Issue #933 (https://github.com/enigma-dev/enigma-dev/issues/933) is still present. In addition to this there is still an order-of-events issue where compared to GM the collision event from obj_player_shot to obj_en_parent is happening after obj_en_parent to obj_player_shot instead of before, resulting in shot explosion animations not being called when hitting enemies (except when the smaller ones are still moving, which is weird).

Also, if someone could please make a note in LateralGM that the DirectX11 renderer currently causes a complete system lockdown and shouldn't be used at all, that'd be great.
Title: Re: Warbird A13:02 in ENIGMA
Post by: faissaloo on July 16, 2016, 11:01:14 am
From testing I can confirm that the alpha clamping issues previously noticed seem to be gone, however TheExDeus's fixes for direction issues don't seem to have been brought into the mainline branch so Issue #933 (https://github.com/enigma-dev/enigma-dev/issues/933) is still present.
TheExDeus is actively working on merging that branch: https://github.com/enigma-dev/enigma-dev/pull/929
Title: Re: Warbird A13:02 in ENIGMA
Post by: Goombert on September 08, 2016, 01:01:42 pm
That has to do with a mismatched plugin. I think the method was changed in the plugin or LateralGM and then the other was still calling it the old way. All you need to do is make sure you have the correct plugin and LGM jars, to do that download them individually from the Wiki on the Extra Packages page.
http://enigma-dev.org/docs/Wiki/Install:Extra_Packages

We are aware the WinPatch needs updated:
https://github.com/enigma-dev/enigma-dev/issues/1010

However, ENIGMA has changed as well since then, so you may want to pull and rebuild it. You could also just try using the portable ZIP for installation, which is what I do. You can still make changes to the source code using the portable ZIP.
Title: Re: Warbird A13:02 in ENIGMA
Post by: BPzeBanshee on January 10, 2019, 11:00:27 pm
Hello all,

There's been more than a few discussions on the project Discord since I last updated this thread so I fell out of making status updates here, but Warbird's a helluva lot closer to working in ENIGMA at last than it used to be (the sooner RadialGM gets finished the better).

I've updated the thread title with the current status of compiling Warbird in ENIGMA based off my test build I've been messing with in Studio 1.4.9999. I've also updated the original post description a bit with a link to the original post text on a Pastebin since the forum doesn't support spoiler tags, and updated the download link to point to the Bitbucket site for Warbird that I made a few years ago after having some trouble with Mediafire.