ENIGMA Forums

Contributing to ENIGMA => Developing ENIGMA => Topic started by: sorlok_reaves on July 07, 2014, 03:55:01 pm

Title: Iji on ENIGMA
Post by: sorlok_reaves on July 07, 2014, 03:55:01 pm
Hey all,

Now that I've finally gotten past the intro cutscene, I figured it would be a good time to formally introduce my project: porting Iji to ENIGMA (and thus, a native Linux port).

Requisite gameplay video:
https://www.youtube.com/watch?v=iBErmgih7fU

The video describes some basics about what I'm trying to accomplish. In terms of commits to ENIGMA, I have been pushing relevant commits upstream for months, but there will always be some hacks that I feel should not be included in the engine. Thus, you'll have to use my Github fork of ENIGMA to run this.

NOTE: Game is super-crashy, and may hang your system.
Title: Re: Iji on ENIGMA
Post by: Josh @ Dreamland on July 07, 2014, 07:50:51 pm
Looking good; the tearing's a little disturbing, but you've made some great progress, it seems.

Could you enumerate the changes you don't want to push to ENIGMA? I'm aware of the "backslashes in paths" hack, but I believe proper macros will nip that issue in the bud down the road. I'm interested in knowing what else you changed, because I want to get macros, metaprogramming, and plugin scripting to be powerful enough for you to be able to enact those changes as part of the game file. I can't make any promises without knowing them, obviously, but having some time to think about them will certainly help.
Title: Re: Iji on ENIGMA
Post by: sorlok_reaves on July 08, 2014, 12:50:36 am
Sure, here's a list of the changes I don't want to merge at the moment:
In short, all of these have sub-par solutions that I wouldn't feel right pushing on ENIGMA for the sake of a six year old game. If I come up with a stronger, more efficient solution for any of them, I'll gladly push a patch upstream. (Some of these "better solutions" require the new script compiler.) And, of course, you'll still get pull requests from me for fixes that I feel are correct (e.g., #771).

Oh, and the extensions idea you mentioned sounds marvelous. :)
Title: Re: Iji on ENIGMA
Post by: Goombert on July 08, 2014, 09:57:22 pm
This is very nice sorlok, you are actually inspiring me, keep up the good work!

Sorry If I generally appear ignorant on compiler related issues, but it's because I usually am, I will speak up if I feel the need to however, but for the most part that stuff is best directed at Josh.
Title: Re: Iji on ENIGMA
Post by: Josh @ Dreamland on July 08, 2014, 11:20:43 pm
Ah, so band-aid stuff. Though, as far as I know, image_single was implemented; I'm not sure when that changed. Probably when polygone decided to redo my subimage handling when he moved it. It's not difficult to support image_single; you just check if it isn't -1 before you add image_speed to the current subimage.

I am hoping that a new instance system will fix your second and third points. That's way down the road.

No comment on your fourth point.

Your final point, TGMG addressed in a regex replacer a while back. Good luck tracking it down, though. In the future, I intend to allow special handling of that in the EDL lexer. It's extremely easy, in fact; all you'll do is duplicate the default lexer and set [snip=cpp]keywords["try"] = TT_INVALID[/snip], then in the handler below, [snip=cpp]return token_t(TT_IDENTIFIER, "$try", filename, line, pos - lpos);[/snip]. A quicker (uglier) quick fix is just to use an ENIGMA-side #define. I.e, in definitions, put something like this:

Code: (cpp) [Select]
#ifdef JUST_DEFINE_IT_RUN // To be interpreted only by ENIGMA
#define try try_
#define catch catch_
#define time time_
#endif
Title: Re: Iji on ENIGMA
Post by: sorlok_reaves on July 09, 2014, 04:31:21 pm
This is very nice sorlok, you are actually inspiring me, keep up the good work!

That's great to hear! The inspiration works both ways in fact, so thanks to you as well!

Sorry If I generally appear ignorant on compiler related issues, but it's because I usually am, I will speak up if I feel the need to however, but for the most part that stuff is best directed at Josh.

As strange as it may sound, the compiler source is actually not a problem for me. Generally the issue for me is not getting something done, but getting it done in a non-polynomial amount of time. :D

Ah, so band-aid stuff. Though, as far as I know, image_single was implemented; I'm not sure when that changed. Probably when polygone decided to redo my subimage handling when he moved it. It's not difficult to support image_single; you just check if it isn't -1 before you add image_speed to the current subimage.

The image_single stuff was revoked in a later commit, since you actually have to do a bit more than just check -1. In particular, when image_single is set back to -1, you have to revert to the previous frame (before the original call to set image_single). Or something like that; I haven't checked in a while.


Your final point, TGMG addressed in a regex replacer a while back. Good luck tracking it down, though. In the future, I intend to allow special handling of that in the EDL lexer. It's extremely easy, in fact; all you'll do is duplicate the default lexer and set [snip=cpp]keywords["try"] = TT_INVALID[/snip], then in the handler below, [snip=cpp]return token_t(TT_IDENTIFIER, "$try", filename, line, pos - lpos);[/snip]. A quicker (uglier) quick fix is just to use an ENIGMA-side #define. I.e, in definitions, put something like this:

I'll have a look. Basically, my current strategy is "keep nasty hacks in my fork until upstream has better systems in place for handling this kind of thing". So I'll wait for the EDL lexer extensions, rather than hacking in some macros now.

I've still got tons of legitimate work to do on Iji, so the hacks can stay in stasis for a while.
Title: Re: Iji on ENIGMA
Post by: Josh @ Dreamland on July 10, 2014, 09:20:00 pm
Sounds good. Please keep us apprised of any more of these hacks that arise; it's good to have them in mind when designing backend components.
Title: Re: Iji on ENIGMA
Post by: sorlok_reaves on July 13, 2014, 01:44:01 pm
Sounds good. Please keep us apprised of any more of these hacks that arise; it's good to have them in mind when designing backend components.

Absolutely.
Title: Re: Iji on ENIGMA
Post by: sorlok_reaves on July 18, 2014, 12:34:59 am
Update: message boxes outside of cutscenes are actually different objects from those inside cutscense. So now chatting via triggers works:
https://www.youtube.com/watch?v=UNecqkDnufA

There'll be a few pull requests rolling in later related to this.
Title: Re: Iji on ENIGMA
Post by: sorlok_reaves on July 25, 2014, 12:01:01 am
New alpha release, with.... actual gameplay??? That's right.
https://www.youtube.com/watch?v=ZPZpTdGFGqY&feature=youtu.be
Title: Re: Iji on ENIGMA
Post by: egofree on July 25, 2014, 04:23:14 am
It looks very nice, thanks for sharing and for improving enigma also !  (Y)
Title: Re: Iji on ENIGMA
Post by: sorlok_reaves on July 26, 2014, 01:21:59 pm
It looks very nice, thanks for sharing and for improving enigma also !  (Y)

You're welcome! Can't wait for the day when I can get a nice, playable beta version out to all you guys. :)
Title: Re: Iji on ENIGMA
Post by: edsquare on July 26, 2014, 01:52:55 pm
It looks very nice, thanks for sharing and for improving enigma also !  (Y)

Ditto  (Y)
Title: Re: Iji on ENIGMA
Post by: sorlok_reaves on August 05, 2014, 06:19:30 pm
New bugfixes. These will both get pull requests soon:
https://www.youtube.com/watch?v=-7VXuxchRCE&feature=youtu.be
Title: Re: Iji on ENIGMA
Post by: sorlok_reaves on August 10, 2014, 12:51:35 am
Got really lucky with a bug fix that actually fixed about 10 bugs. The result? Much more playable!
https://www.youtube.com/watch?v=ukV_1_Mr18g
Title: Re: Iji on ENIGMA
Post by: Josh @ Dreamland on August 10, 2014, 09:14:48 am
No words, sorlok. That's just awesome.
Title: Re: Iji on ENIGMA
Post by: Goombert on August 10, 2014, 11:51:48 pm
Yes I am very impressed with his progress as well, I am glad to have sorlok around. I am thinking about actually taking the time to try out Iji on my break coming up soon.
Title: Re: Iji on ENIGMA
Post by: sorlok_reaves on August 11, 2014, 07:51:12 pm
You should definitely play it; it's a model of great game design. You should probably play the original EXE for now, as the ENIGMA version has a penchant for dropping Iji through the floor.
Title: Re: Iji on ENIGMA
Post by: sorlok_reaves on August 16, 2014, 10:36:18 pm
Also, in-game cutscenes now work:
https://www.youtube.com/watch?v=F4bT4tA6ENs

300 reference FTW.
Title: Re: Iji on ENIGMA
Post by: sorlok_reaves on August 24, 2014, 05:11:09 pm
Boss battles work, but I feel like the balance is a bit... off:
https://www.youtube.com/watch?v=fbVJ4r_0SJs
Title: Re: Iji on ENIGMA
Post by: Josh @ Dreamland on August 24, 2014, 10:06:07 pm
Doesn't the original Iji executable work in WINE? I mean, the thing isn't lost to the world; it just doesn't build for Linux. Isn't it relatively easy to compare the ENIGMA feel to the original? Or do I misunderstand you?

(I've never played Iji through, so forgive me if there was an obvious joke there)
Title: Re: Iji on ENIGMA
Post by: sorlok_reaves on August 24, 2014, 10:32:29 pm
Oh, I mean that the particular boss battle in that video is impossible due to a glitch --he keeps spamming tons and tons of attacks without rest. I only beat him using a well-known secret.

The original Iji executable works fine in WINE, but the fact that it only can be compiled in GM5 is limiting. For example, if you wanted to mod the game, you would be forced to use GM5 (like the MSPA mod of Iji did). So my policy on Iji is sort of similar to the free software concerns of Debian (https://wiki.debian.org/DFSGLicenses): if you have the source, but the tools to compile it aren't open, then you're no better off than if it were closed.

Otherwise, the look and feel of Iji is now exactly the same in ENIGMA, barring the occasional bug. This is a testament to the ENIGMA engine as a whole. :)