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 / Re: Changes
« on: December 08, 2009, 09:17:00 pm »
No, they're not. A used element is used. Permanently. I can allow for the array to be manually resized by the user. It'll look something like this:

var a;
a[0] = 1; a[1] = 2; a[2] = 3;
//Method 1:
//Method 2:

Announcements / Re: Changes
« on: December 08, 2009, 04:31:13 pm »

It isn't how GM works. a would have two elements in GM, (0,hugearray[0]) and (4,4).

Tips, Tutorials, Examples / Re: draw_healthbar() function
« on: December 08, 2009, 04:29:12 pm »
Supposedly. I don't know the particulars.

Tips, Tutorials, Examples / Re: draw_healthbar() function
« on: December 08, 2009, 05:28:30 am »
I think on account of my own forgetfulness, ENIGMA doesn't have any form of working switch(). It replaces them with some functions that I *believe* were never implemented. But if I did implement those three functions, it'd work. I believe GM switch() statements share complexity with a string of if()s, so that's what ENIGMA does. Ideally, I want to optimize the code, only replacing switch with if()s when I can't tell that all case labels and the input are integers.

I'd love that. I made some kind of text file implementation that I never documented (in any form, I mean), but I never did do INI. Is your code GPL?

Announcements / Re: Changes
« on: December 08, 2009, 05:14:58 am »

Either way, that's seven. I don't have a personal vendetta against it. Yet.

Oh, and Luis. Casts are magic. var::var(var) and var::operator= (const var&) can "copy" the entire array in C++. I place copy in quotes because it'll be copy-on-write. If your sole purpose is to read an array passed as a parameter, it'll be done in constant time. Only if you start editing the array will it copy. That means that var can be passed as an array as well as copied. The cost of such an action is efficiency if no intelligence is used. For example:

a = hugearray;
a += 4;

Will function the same in GM and ENIGMA, as far as users can tell. In actuality, the ENIGMA one will be slower unless users say

a = hugearray[0];
a += 4;

Which any respectable GM user would do.
Copying on write makes only the most blatant (and I do mean stupid) instances of GM syntax slow. Even just implicitly passing the first element in an array as an argument won't be any slower, unless they set the argument somewhere in the code (which I believe is regarded as bad practice, anyway). Nothing that can't be fixed with a [ 0], anyway.

Announcements / Re: Changes
« on: December 07, 2009, 08:27:32 pm »
Gimme back my HLP and stop asking for administrative confirmation for each mouse movement. It gripes every time I open Code::Blocks.

I do like the home button, though, which behaves differently on OS X.

Announcements / Re: Changes
« on: December 07, 2009, 08:13:32 pm »
I think Chrome just wants a width-height parameter.

And yeah, in actuality, I can name far worse operating systems. Namely, Vista. But I figured stylistically it'd just be better to call it that and take he heat later.

Tips, Tutorials, Examples / Re: draw_healthbar() function
« on: December 07, 2009, 02:42:36 pm »
Glad you liked ENIGMA. ^_^

Anyway, the function looks sound, aside from a few things I'd const.
Code: [Select]
        int Rl,Gl,Bl,Rh,Gh,Bh;
        Rh = __GETR(maxcol);
        Gh = __GETG(maxcol);
        Bh = __GETB(maxcol);
        Rl = __GETR(mincol);
        Gl = __GETG(mincol);
        Bl = __GETB(mincol);
        Rl = (int)(Rl + ((Rh-Rl)*(amount/100)));
        Gl = (int)(Gl + ((Gh-Gl)*(amount/100)));
        Bl = (int)(Bl + ((Bh-Bl)*(amount/100)));

I would make that snippet
Code: [Select]
        const int
        Rh = __GETR(maxcol),
        Gh = __GETG(maxcol),
        Bh = __GETB(maxcol),
        RL = __GETR(mincol),
        GL = __GETG(mincol),
        BL = __GETB(mincol);
        const int
        Rl = (int)(RL + ((Rh-RL)*(amount/100))),
        Gl = (int)(GL + ((Gh-GL)*(amount/100))),
        Bl = (int)(BL + ((Bh-BL)*(amount/100)));

The compiler would probably take care of all that anyway, even if left inline, so it doesn't really matter.
Come to think of it, that's probably the most efficient code I've had submitted. (Sorry, Retro. I won't hold frac() against you)/

Oh, one more thing. Your switch statement. Find out which direction GM defaults.

I'm personally tickled to see another someone's taken interest in the program, especially one that knows some C++. (Or, perhaps is brave enough to use GML knowledge to make a C++ function).

Out of curiosity, are you working with the code that comes with R3 or the code from the SVN repo? Judging by the __, I'd say it's the R3 version. In either case... When I get home, I'll take a closer look at your function and see about incorporating it into R4. I'll credit your current username for it; if you want it under a different name, let me know.

(And yes, those of you who are elitist and don't consider one function a significant contribution, I know it's not much relative to the entire project. However, it's nothing to sneeze at, and if we had 900 more people like Revel, the project would be done already.)

Tips, Tutorials, Examples / Re: A Few Alternate Functions
« on: December 06, 2009, 09:42:14 pm »
Ah, you inputted the zero along with it. Try without the zero.

Announcements / Re: Changes
« on: December 06, 2009, 12:43:55 pm »
And being liberal as hell with '!'. What could be more fun?

Some call it political suicide. I call it "Shut the hell up, my software is free."

Announcements / Changes
« on: December 06, 2009, 12:22:43 pm »
Good news, everybody!!!

I've decided that after a year of development with nothing whatsoever to show, we're getting a new logo!!

Here it is! !! !

Preposterously big and annoying to the very core of your EXISTENCE. !!
Feel free to riot so I have a topic to delete! ! !!

With that, I'm increasing the price of ENIGMA roughly 150%. I don't have the figures at the moment as the math is beyond me, but it will cost more to make up for all the spending without return I've been doing!

!!1!1  !! !

Futhermore, I'm firing my Mac developer. Turns out he can't get the world's shittiest code to function on the world's shittiest operating system. A shame, I know

...what else does Sandy do that's deplorable?

You know what, screw it. That was my fun for the day.
And yes, I'm serious about the price increase. ENIGMA's new price is 0 * 1.50, which is... *crunches numbers*... $0.00.

Oh, and I think maybe I'll stick to the old logo.

Also, miky reminded me of an additional disclaimer. Mac isn't really the shittiest OS; I think Vista earned that title when it did away with HLP. "The Help for this program was created in Windows Help format, which was used in previous versions of Windows and it is not supported in Windows Vista." Though, I'm actually on Vista now... At least it boots. World's shittiest OS... Bah, I'll think on it. Really, I'm just mad because it's been a pain trying to get XLib things to compile on it.

Good day. ^_^

I figure I'll insert the point of this message. Yes, it's 90% troublemaking, but more importantly, there's a lesson in the other 10%.
I know development has taken a while, but progress has been made. It's also a bit more visible than Yoyo's, as you can follow it in the SVN if you really like.

Remember that this project started not long after the release of GM7. In the meantime, I've released three times, they have released nothing. This latest release has been done to refurbish, rethink, and recode everything. Yoyo's just porting GM with help from free software. Think about it. They have $2 million to form a team. A team of "professionals." They claim they're not struggling... Heh, I even tell people what's going on at the moment.

Speaking of. Presently, I need to logically relocate a large block of code that handles identifiers in order to tolerate ::, an integral part of C++. No one said parsing C++ would be without incident. Once the libs parse right, there's really nothing standing in the way.


Tips, Tutorials, Examples / Re: A Few Alternate Functions
« on: December 06, 2009, 10:31:22 am »
If I may, I believe 167 is what you meant, not 176. Also, it's not a degree sign. Render it large, you'll see an underline. Degree sign is 248.

Tips, Tutorials, Examples / Re: move_contact_solid();
« on: December 06, 2009, 10:25:30 am »
It ends the script in C++ AND GML.

Exit was incorporated into GML because there was no way to return void; "return;" is valid in a C function returning void but invalid in all cases in GML. exit; is the equivalent to return 0;.

Issues Help Desk / Re: current svn trunk build is NOT SAFE TO USE.
« on: December 05, 2009, 07:05:36 pm »
You load LGM and see the splash screen, then drag-and-drop doesn't freeze? Not just right click, dragging tiles.

General ENIGMA / Re: Pixel-Perfect Collision by default ? Box2D
« on: December 05, 2009, 04:24:16 pm »
I had plans for incorporated physics, yes. I was thinking of using Newton, however, rather than Box2D. That can always be an option, however.

As for generating a polygon from a sprite, that's feasible for the most part. There's a bit of turmoil between Ludamad and me that would have to be resolved before I would be able to continue using Colligma. I haven't spoken to him in months. I mention this because originally, he was going to allow for polygon based collision detection as a replacement for bitmask based collisions.

As for disabling the collision system entirely: I intend to allow users to disable practically everything about ENIGMA at their option, including selected local variables (any can be disabled, not necessarily all or none), and of course high-octane systems like collisions, networking, and 3D. Not every game uses those; it'd be stupid to constantly include them all. Although originally I wanted the process to be automatic, I may end up making it manual, at least at first.

The current collision system is pixel perfect, but not many functions were implemented using it. We'll see how this turns out.