ENIGMA Development Environment
Website is in read-only mode due to a recent attack.

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

Off-Topic / Broken forums
« on: January 12, 2011, 10:50:13 AM »
We've recently upgraded to SMF RC3. This cost us all custom modifications to the SMF forum system. This is what's broken, that we are currently aware:

1) Registration. I implemented a regexp captcha to the SMF engine because its original system was too poor to handle multiple answers. My system allowed them to be set as (answer1|answer2), or however else is legal in the regexp standard. As such, any question with more than one answer is impossible to answer correctly.
2) Unix names. Gary just implemented a system that allows users to give themselves a unix name. It wasn't implemented in the Wiki completely yet, but it's gone now.
3) Code highlighting. The system had a problem with generating previews (the page had to be refreshed to see any modifications), and it didn't distinguish between GML and C++, but it's gone now.

Any other problems, report them here.

I have yet to implement switch(), but there are multiple problems with that code in any case, namely,
1) The point of a switch statement is to allow jumping to a piece of code marked by the correct value. So, "case varname==0" is pointless. Just "case 0" will suffice
2) The point of a switch statement is to quickly decode one value as a set of multiple values. So, "switch(boolean)" is, before optimization, less efficient than if (boolean) {} else {}.

Function Peer Review / Re: move_towards_point
« on: January 11, 2011, 07:16:55 PM »
Actually, I have no idea why the fuck Ism's implementation works. direction.rval.d is in degrees. Or at least it's supposed to be. There is the possibility that it is only in degrees when it is the last variable set.

I don't know why it's doing that if you're specifying the whole screen as the rectangle.

I don't think two branches are unreasonable.

HaRRi, note two things. First, tbx and tby are both 1 for Po2 textures. Second, I believe the most efficient way to code this function is by giving it this structure:

Code: (C) [Select]
if (tbx == 1)
  if (tby == 1)
  if (tby == 1)

Proposals / Re: switch and mp_step functions.
« on: January 10, 2011, 07:27:41 PM »
You can just copy-paste it into "Definitions" under ENIGMA settings in the mean time, MrGriggs.

You could just implement the 3D sound functions in ENIGMA's current OpenAL implementation; we'd appreciate it. (ENIGMAsystem/SHELL/Audio_Systems/OpenAL/)

Proposals / Re: Shader effects
« on: January 10, 2011, 07:20:04 PM »
Yes, they will. I asked Retep a while back to research the difference in shader languages for DirectX and OPenGL. He never got back to me with the results. I want to ensure that ENIGMA's shader language is standard, and so I want to know what I'm up against. ENIGMA may implement its own shader language.

General ENIGMA / Re: String Physics
« on: January 10, 2011, 06:39:32 AM »
I didn't mean to imply that including a GL extensions library was all you had to do. You actually have to declare the function yourself and fetch a pointer to it.

Code: (C) [Select]
void glGenFramebuffersEXT(GLsizei n, GLuint* ids) { show_error("Surfaces not supported by card."); }
void (*glGenFramebuffersEXT)(GLsizei n, GLuint* ids) = &error_function_glsize_gluint;



Or something like that.

Proposals / Re: Object member functons
« on: January 09, 2011, 01:12:24 PM »
The stack is pushed twice at the beginning of the expression in my example, then popped twice right after.

pop_with(K) was what I was considering. But it wasn't until you posted it again that I realized I was thinking about it incorrectly. My first instinct was that there'd be no way to instantiate a template because the return type of func() can't be gathered from &func. But now I see that a simple template function would have done it.

Code: (C) [Select]
inline template<typename any> any& pop_with(any &r) { return r; }
So thank you, Luis; the simplicity of the matter escaped me.

Proposals / Re: Object member functons
« on: January 09, 2011, 12:41:29 AM »
That's how with_iter works, luis. Issue is, you just passed func() the return value of enigma::pop_with().

Proposals / Re: Object member functons
« on: January 08, 2011, 11:22:38 AM »
Unfortunately, r9k, it's not that simple. It's not as simple as polygone's suggestion, either.
The only way to implement this cleanly is too flawed to implement:
Code: (GML) [Select]
Code: (C) [Select]
(enigma::with_iter(obj1), func())When the expression starts, it will be as though it was executed for obj1. When the expression ends, the with_iter will destruct, and the code will be back in its original scope. However, this will fail catastrophically:
Code: (GML) [Select]
obj1.func(obj2.func())Both will be executed for obj2. This is because at the beginning of the expression, obj1 is pushed as the current instance, then obj2 is as well.

I haven't yet found a way around this.

Proposals / Re: switch and mp_step functions.
« on: January 07, 2011, 02:38:48 PM »
Go for it. Feel free to do the A* shit, because I don't really want to. :P

Proposals / Re: switch and mp_step functions.
« on: January 06, 2011, 10:57:49 PM »
I hate implementing functions, anymore. I much prefer just working on parser candy.

The worst part about this is that I had a discussion about mp_linear_step with a buddy not long ago, and I showed how an implementation of the function that performed -better- than Game Maker's could be written without an A* implementation (if only because Mark's A* implementation is a world-class failure).

Someone made a path plotting example in GM that used four different implementations; I think it would be neat if ENIGMA offered each of them to choose from.

The example I'm thinking of colored in all the tiles to show how it calculated the optimal path with the selected algorithm. If anyone knows which one I'm talking about, I'd appreciate if they indicated it to me once more (having a GM-friendly implemetation of these for at least reference would be a good thing).

As for switch, I guess it's about time I implemented that. I might just check if all of the case labels are literals to choose between C switch and GML switch, and screw the hash implementation.

Announcements / Re: Happenings
« on: January 05, 2011, 11:44:22 AM »
yum install cook

cd /usr/ports/sysutils/cook && make && make install

Don't forget the sudo.