Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Josh @ Dreamland

Announcements / Compatibility Issues
« on: May 02, 2009, 12:09:17 PM »
Questions that have been haunting me since day one, and I'm sick of dealing with them, so I'll present them to my user base.

  • Var can't return int, string, double, and char*. It just can't; it leads to ambiguity out the back end to where your game won't compile.

Knowing this, do I have all the functions take double and string as parameters (a 100% waste of memory and at least 800% waste of speed), or do I alienate std::string as a return type?

Neither of those are very attractive choices. There is a middle option where I have the user decide whether or not they want to keep var as a type, and re-compile ENIGMA optionally to take scalar arguments. (Scalar meaning one type, in this case of the smallest needed size)

I will try again to get var to work with conflicting cast types, but std::string is the one that causes ambiguity. Even though I added an explicit cast function for it in var. (Meaning I told it exactly what to do to convert var to string, but it errored anyway.)

  • Game Maker does not have functions that don't return anything. Even functions in GM that return nothing will actually behave as zero, and can be used in assignment and arithmetic. This isn't the case in C++.

For the first three releases, I returned zero in all those functions, as int for max speed.

Why not do away with them? Some people like to add a function that needs called but returns nothing to a function that must be called after the first function, in order to call them in one statement. Like registry_set_root(3)+registry_read_real_ext("blah","blah")

That's an ugly, yet useful feature of the language. I was considering having function return ENIGMA_VOID, and the return statement at the end be return_void;. This would enable the user to choose whether or not to do this and recompile.

  • Game Maker does not return success or fail. Especially for functions like registry_write_string(). A lot of functions that are VERY prone to failure have unclear methods or no method at all of determining whether it worked.

Should ENIGMA return error codes as WinApi does? For registry functions, this would also eliminate combining things like registry_set_root(3)+registry_read_real_ext("blah","blah"), though since registry_set_root will never fail and the latter returns nonzero normally, that's not exactly the best example here.

Maybe a function to check if the last calls succeeded?

  • WinApi has developed some since its first release in 1912. As such, we have a set of 16 bit functions that are preserved for compatibility with 95 and 98, but then more recent functions that are meant for 2000+ and may not work on really old Windows systems.

The problem here is, do we stick with the old ones and risk being obsolete come Windows 7, or do we lose 95 and 98 compatibility and go with the new? Again, this can be fixed by compiling separate releases for each operating system, but that's not exactly attractive as an option.

There are plenty more conflicts, but these are just a few that are immediately bothering me.
If you haven't guessed, registry functions have been implemented.

College classes are nearly over; I have a huge take-home final exam to worry about this weekend, followed by 23 more days of high school. But then I'm done, and will actually have a decent amount of time to work. I hope.

Announcements / Re: Progress
« 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.)

Announcements / Re: Progress
« 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.

Announcements / Progress
« 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.


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.

Tips, Tutorials, Examples / Re: How to Play Sounds
« on: April 21, 2009, 05:23:07 PM »
Now do it with OpenAL.
Oh right, that's my job.

« on: April 20, 2009, 03:24:10 PM »
Serpy, I'mma choke you. This is why we work with bools.

If I really must, I could have ENIGMA parse in a logical xor, but it shouldn't be a problem.  Could always do !!x ^ !!y.

Proposals / Re: io_handle() and io_clear()
« on: April 20, 2009, 03:13:51 PM »
And that.

Proposals / Re: I have only one comment
« on: April 20, 2009, 02:43:59 PM »
That's one way of doing it. Yknow, I feel like a change of pace from all this expression and CFile garbage. I think I'ma try my hand at GM DLLs right now...

Announcements / Re: SVN
« on: April 03, 2009, 10:07:21 PM »
Yeah, but Microsoft made that. It's automatically terrible for real use.

...Come to think of it, Outlook Express is the only Microsoft program I use now. Aside from their entire operating system, of course, which I'm not going to complain about, because despite how awful some of its features are, have been, and are becoming, it's still the best. Kind of sad.

Proposals / Re: io_handle() and io_clear()
« on: April 02, 2009, 09:14:26 PM »
Mark threads all this stuff anyway. Create a code that draws thousands of lines towards the mouse, and move the mouse around. Half the lines will follow the mouse.

Proposals / Re: Difficult!!!
« on: April 02, 2009, 09:10:02 PM »
All those in favor of a new IDE can get started on its development while I work on bigger and better parsers and systems. ^_^

In other words, NOU.

Proposals / Re: Before any more of these topics are made
« on: April 02, 2009, 09:08:10 PM »

To be honest, I hate adding functions. For that, we'll get more slave labor. I like the mind-numbingly large tasks, like getting all the pieces of ENIGMA to work together to get the language working. More like a well oiled machine as the releases progress than, er... whatever R1 was. ^_^

Announcements / SVN
« on: April 02, 2009, 08:48:50 PM »
First and foremost for those who don't catch on as quickly, we weren't really bought out by Yoyo. Come on. We don't even mean anything to them yet; we're not even on the competition radar.

ANYWAY. Due to constant bother from someone who wanted to pilfer ENIGMA's resource attachment code and for some reason couldn't use the stuff from R3, I hosted the source code.

Which means the most recent ENIGMA is available in the SVN at the sourceforge page, etc.

However, this doesn't mean that the code is operational. It's not that individual pieces don't work, it's that they have not been fitted together.

Those of you with weak constitutions and those of you who do not know C++ can skip this next part.
For the rest of you, I'm not going to bother posting the link to the SVN because you're probably resourceful enough to find it, and I'm not exactly enthralled to have functionless code on the intarblagz. It's like coming in one day with a rusty robot then being asked to put its severed limbs on display while you're working on them. Kinda destroys the splendor of the situation.

Nonetheless, it is hosted. I won't be checking it for updates before overwriting it, so if you have any changes to make (which, considering my code is just C++ - formatted manifestation of my ramblings and is therefore illegible, I highly doubt) please let me know here instead. Shouldn't be a problem, because I don't think any C++ programmers have SVN privileges anyway.

There's another set of files that I'm working on, which are the workings of a CFile parser. They are not hosted yet.

Rest assured, I'm good at seeing the big picture. R2 and 3 both looked like this days before their releases.

Okay, now for those of all or no C++ skill level, here's what's changing:

  • Recoded the syntax checker to support structures. It will also support macros and namespaces. Much easier to code the second time, and I did a much better job. It's about to where it would have been originally (completion wise) at the moment, if I had not decided to support all these nice C++ things. (SVN people can feel free to test what I have, such as nested loops and statements)
  • Parser will undergo minor recoding also. The main concept, structure and code flow will stay, as those were all brilliant, imo, though I will be recoding small chunks of it for the sake of optimization-- it should read through the code less than 10% as many times as the first version. (The parser is primarily find-replace. To the point where almost all of it is such, call after call. I want to write something to replace those things in mass, so I don't have to keep iterating through it)
  • The macros thing is as simple as making a stack structure that behaves like a string, but has a push and pop function. Instead of just saying while (pos<len), I'll have a condition to be sure that at the end of the string I pop the stack to the next string down. It's probably what G++ does. Namespaces, I'll just keep a list of variables that exist in the global scope, and those that exist in a namespace invoked by or were themselves invoked by the using token.

  • Scripts are being rethought. Instead of each object having a script, this (Pointer to current instance) will be cast to WILDCLASS (so it has all the locals for a short time) and sent to the script. This way you can still call locals like in R3, but it's more efficient for multiple variables and works in with(){} statements.

  • Last, but not least, Luda has promised he'll finish recoding Colligma as soon as ENIGMA is operable. Meaning I'll hold a private release in the meantime while he's doing his thing, then give another few days of testing before the release. This is still in the future, though.

Some of you are mad now because I'm wasting time on a CFile parser, and you don't know why. It's because now you can #include <map> in a new resource in ENIGMA I've named "whitespace." The resource is simply a C++ script editor, which lets you define functions and classes for use in ENIGMA. (Like scripts, only still more efficient)

And finally, I am pleased to announce it is Spring Break. So I have ten days almost completely to myself to work on ENIGMA. I've tried not to complain much, but the workload is pretty big, and I'm actually enrolled in a college course at the same time as the high school ones. So things get hectic sometimes. I'm typing with my eyes closed at this moment, because I'm sorta too tired to keep them open. (Plus, this monitor is killing my eyes on its own. -.-)

That being said... I don't even know what I want from you people. Just hang in there, we're not dead yet.

Final note to SVN crawlers:
All the bugs from R3 are fixed. If you can pick out the fixed codes and patch R3 with them, feel free to hold a private release. May prove a challenge, considering... but feel free to give it a shot.
However, I don't wanna hear how poorly commented my code is, and how ill-structured it is, and how badly it abuses empty space, and how you don't find my choice of profane variable names funny. The code was released under the GPL solely to be in good spirit and ensure free-ness, not because I expect or even want your help and rude commentary.

Thank you.
Sorry if I don't sound myself, I'm pretty tired. Just figured I'd disclaim my SVN before I go to bed, and before it becomes a total train wreck.

Announcements / Re: Progress Report
« on: March 15, 2009, 11:07:09 AM »
Keen eye, and good guess. It is indeed Fedora. Or I suppose one of those could have been Ubuntu... I have both. But I finished it on Fedora, so I'm assuming that's what it is.

Announcements / Re: Progress Report
« on: March 14, 2009, 08:31:08 AM »
I will certainly consider it. If I can talk Ism into adding one before we finalize version 5 of the format, then you can expect to see it next release. As well as exe icons. Note that unlike GM, Icons will support the three layer format, or any format Windows can read.

Also, happy Pi day to all.