Pages: 1 2 »
  Print  
Author Topic: Progress  (Read 4622 times)
Offline (Male) Josh @ Dreamland
Posted on: April 25, 2009, 08:58:16 PM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2949

View Profile Email
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.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Unknown gender) Game_boy
Reply #1 Posted on: April 26, 2009, 05:12:17 AM
Member
Joined: Apr 2008
Posts: 228

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

Logged
Offline (Male) Josh @ Dreamland
Reply #2 Posted on: April 26, 2009, 06:55:31 AM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2949

View Profile Email
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.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Male) RetroX
Reply #3 Posted on: April 26, 2009, 06:58:30 AM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
Great job.  What else needs to be finished for R4?
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Male) notachair
Reply #4 Posted on: April 26, 2009, 06:24:10 PM

Definitely not a chair
Contributor
Joined: Feb 2008
Posts: 299

View Profile
[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.
Logged
Offline (Male) RetroX
Reply #5 Posted on: April 26, 2009, 09:01:08 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
Why is he IP banned?
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Male) notachair
Reply #6 Posted on: April 26, 2009, 10:47:26 PM

Definitely not a chair
Contributor
Joined: Feb 2008
Posts: 299

View Profile
(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
Logged
Offline (Male) RetroX
Reply #7 Posted on: April 27, 2009, 06:33:13 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
That is one of the most retarded things I've ever heard of.
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Male) Josh @ Dreamland
Reply #8 Posted on: April 28, 2009, 03:11:38 PM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2949

View Profile Email
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.)
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Unknown gender) skarik
Reply #9 Posted on: May 01, 2009, 06:32:34 PM

Member
Joined: Jul 2008
Posts: 46

View Profile WWW Email
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?!?!
Logged
~~
Offline (Male) RetroX
Reply #10 Posted on: May 01, 2009, 07:40:06 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
Update your Java.  You probably have an old version.
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Unknown gender) death-droid
Reply #11 Posted on: May 24, 2009, 05:19:03 AM
Member
Joined: Aug 2008
Posts: 19

View Profile
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)
Logged
Offline (Male) RetroX
Reply #12 Posted on: May 25, 2009, 09:54:02 AM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
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.
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Male) Rusky
Reply #13 Posted on: May 25, 2009, 04:44:51 PM

Resident Troll
Joined: Feb 2008
Posts: 955
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
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.
Logged
Offline (Male) RetroX
Reply #14 Posted on: May 25, 2009, 08:26:52 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
Yeah, pretty much.  Although once sound is implemented you can make a decent game with it.
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Pages: 1 2 »
  Print