ENIGMA Forums

General fluff => Announcements => Topic started by: Josh @ Dreamland on April 25, 2009, 08:58:16 pm

Title: Progress
Post by: Josh @ Dreamland on April 25, 2009, 08:58:16 pm
Since people are beginning to freak out, I decided I'd best be more liberal with my updates.
...No, I will not get a Twitter. Ever. That would kill me on the inside.

Continuing.

DLL's are working. That doesn't mean they're finished, though; I have some stdcall testing to do now that I have cdecl working.

The endeavor looked something like this:
7:58 - Code is riddled with inline asm. Output is gobbly gook in the form of a message box.
8:?? - Clam mentions the name of LibFFI, which I'd heard of previously but then no one knew its name, so I stopped looking.
8:43 - Clam fixed me up with windows-ready LibFFI junk and a demo.
9:16 - Code is riddled with FFI garbage. Output is somewhat different gobbly gook in the form of a message box.
9:19 - Found the problem, fixed it. Working.

So now DLLs are working, at least with cdecl. Actually, cdecl was the one I wasn't sure how to do,  but since it's working, stdcall should be a snap.

As for days previous, I now have a working expression evaluator. There are a couple things left to do so it can support all the types. (Right now it only does int, double, and char*). I was designing it for parsing #define, but it has so many other uses that I intend to make it full-featured. (#define is a C++ macro which I will need to parse in the CFile parser I mentioned earlier. It doesn't support floating points or type casts, but I've implemented those anyway.)

If this works well, I can eventually add a couple things to that evaluator and have an interpreter for debugging purposes. It'd probably help to be able to execute new code in debug mode. And don't worry; since enigma's compiled, it'd be next to impossible to access the debug window unless the game is in debug mode. The only way it would be possible is if a very skilled programmer converted the whole game back to assembly and hand coded the new debug interface, which would be such a massive task, there isn't a person on the planet with that sort of motivation. (They'd sooner just hack your game with a disassembler while it ran.)

And don't give my post that look; there's nothing you can do to make any game totally unhackable. I'm pretty sure everyone knows that and has come to terms with it. ENIGMA just isn't particularly easy to hack, unlike *some*.

The expression evaluator is a suprisingly small 900 lines so far. The CFile parser 630; It's about half done. Still have some keywords and er.... As a general "back to the drawing board" sort of thing, I'm adding support for basically every feature C++ offers. So you won't have to use the awful ds_ functions, you'll have something easily 30x more powerful at your disposal. Not to mention structs, so you have a convenient way of storing things. Oh, and I can't live without ++, so I'm adding that as an option (default to ON). I've also added the ternary operator (a?b():c()) into the expression parser.

All these changes and additions I'm making will mean some recoding in the syntax checker as well as the parser. Shouldn't be difficult; I'm not worried.

Or at least I wasn't, then I found out C++0x supports lambda, and I didn't know what to think. Either way, I'm sure it'll be fine.

Ism has been making things compile on Linux, which was met without much incident. So things are looking bright, overall.

Anyway, I'ma get back to work.
Title: Re: Progress
Post by: Game_boy on April 26, 2009, 05:12:17 am
Could you explain to someone only familiar with GML EDL and not C what all of that stuff means? I get that the first part means we can import C DLLs for use in EDL code, but what exactly does libffi do and what is an expression evaluator in this context?

Title: Re: Progress
Post by: Josh @ Dreamland on April 26, 2009, 06:55:31 am
LibFFI handles DLLs, and lets you call them knowing pretty much nothing about what will be called at compile time. Means we didn't have to keep screwing around with asm.
Expression evaluator is the equivalent to that thing in GM's debug window that lets you watch variables and other small things. I made it so I can parse header files accurately: this way, users can include things from C++ and use them in their GM games. CFile parser just reads C headers and sources to get more functions for the syntax check.

For more C++ oriented people, this means you can have structures in your code along with the GML. If I do this well enough, it'll be able to parse all the standard template library headers, too.

That means you can do this:
map<string,int> a;
a["text string"] = 0;

...and the rest has a small learning curve I won't be posting here.
Title: Re: Progress
Post by: RetroX on April 26, 2009, 06:58:30 am
Great job.  What else needs to be finished for R4?
Title: Re: Progress
Post by: notachair on April 26, 2009, 06:24:10 pm
[Josh is IP banned from everything owned by this host including its support site. This post is done on his behalf]
Actually hooking up all the wonderful things I've coded, for starters.
Expression parser, when finished, plugs into CFile parser. That plugs into syntax checker and parser. Those plug into compiler. That plugs into LGM with new syntax functionality. Then there's that new instance system that's waiting for ENIGMA to be ready to compile again to be added. And text file function that have been done for months now that I haven't added in. It's come down to tying up loose ends. And there's a lot of them.
Title: Re: Progress
Post by: RetroX on April 26, 2009, 09:01:08 pm
Why is he IP banned?
Title: Re: Progress
Post by: notachair on April 26, 2009, 10:47:26 pm
(10:06 PM) Josh @ Dreamland:   I tried to log in like five times
(10:06 PM) Josh @ Dreamland:   so I'm IP banned for the next week or so
-------------------------
(9:10 AM) a2h_:   have you asked anyone for support regarding your ip ban?
(9:10 AM) Josh @ Dreamland:   can't
(9:10 AM) Josh @ Dreamland:   IP banned from support site
(9:10 AM) a2h_:   wtf
Title: Re: Progress
Post by: RetroX on April 27, 2009, 06:33:13 pm
That is one of the most retarded things I've ever heard of.
Title: Re: Progress
Post by: Josh @ Dreamland on April 28, 2009, 03:11:38 pm
Bleh, happens. Not sure why FireFox didn't form complete the password for me, and really not sure how I took five times to enter it correctly. (The last two tries I copied and pasted in the correct password... Even confirmed it with a2h to make sure.)
Title: Re: Progress
Post by: skarik on May 01, 2009, 06:32:34 pm
Nice to hear (not the IP ban shiz, before that). I'll be probably learning how to use Enigma when "stdcall" DLL's are working.

Oh, could someone please tell me if a better version of Lateral GM will come with the next release? For some reason, I can't use the version that Enigma ships with, and I'm not a brain enough to update stuff. Or maybe I am and I'm just lazy, but when will R4 come?!?!
Title: Re: Progress
Post by: RetroX on May 01, 2009, 07:40:06 pm
Update your Java.  You probably have an old version.
Title: Re: Progress
Post by: death-droid on May 24, 2009, 05:19:03 am
You should really probably write an ide that doesn't rely on Lateral GM using something like wxWidgets(Works for windows and linux i think)
Title: Re: Progress
Post by: RetroX on May 25, 2009, 09:54:02 am
LGM is Java, which is platform-independent.  I think it makes a lot of sense right now, considering it was already made before ENIGMA came out and it doesn't require making a different IDE for each OS.

Although I do agree that an executable IDE should be created as a long-term solution, not right now.
Title: Re: Progress
Post by: Rusky on May 25, 2009, 04:44:51 pm
wxWidgets is cross-platform, but it's compiled, so different OS's would require different binaries. It should be fine eventually when Enigma actually has a point, but for now when it's not even beta, it's probably better with LGM so that people can just see what functionality there is without worrying about getting it to work.
Title: Re: Progress
Post by: RetroX on May 25, 2009, 08:26:52 pm
Yeah, pretty much.  Although once sound is implemented you can make a decent game with it.
Title: Re: Progress
Post by: juggernaut on July 24, 2009, 06:27:07 pm
Can I please have a rough release time for R4? Even if it's just the year.
Title: Re: Progress
Post by: notachair on July 24, 2009, 07:44:17 pm
Sometime... in the... near... future...
Title: Re: Progress
Post by: Josh @ Dreamland on July 25, 2009, 12:28:40 am
It won't take until next year. I would like it to be before October, but I hate giving dates.
Also, can we not bring old news posts to the top? :P