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

1321
Function Peer Review / Re: "Choose" statement
« on: July 08, 2011, 03:16:40 PM »
Ah; you've stumbled on a way to make ENIGMA honor max() having unlimited parameters. :P
That's... typically kind of dangerous, but I guess it's as good a hack as any. For the time being, you can implement those functions like this:

Code: (C) [Select]
variant choose(...);
int choose(const enigma::varargs& args) {
   return args.get(rand() % args.argc);
}
#define choose(x...) choose((varargs(), x))

You must declare and implement choose before defining it. In the source, you may be wise to #undef choose, then implement it. DO NOT implement choose(...); it's too segfault-prone. This way, worst-case scenario is link error, not random abort().

1322
He was bitching at me about the fonts being misaligned last revision, so I think whatever is broken is unique to this one. I fixed font_add_sprite() for him a while back.

1323
Function Peer Review / Re: "Choose" statement
« on: July 08, 2011, 02:27:42 PM »
max(varargs(), (varargs(), 10, 25, 34.2)); is incorrect; the string should come out as
max((varargs(), 10, 25, 34.2));

But I don't parse that.
#define max(x...) max((varargs(),x))

and #define won't give me the number of arguments passed.

Again, double max(double numbers, ...){} won't work. It will kill the program as soon as the user calls max(somevar,someothervar). That wasn't a joke. It's possible that C++0x offers a functionality to overload an stdargs pass, but I don't know how well it is supported.

1324
Function Peer Review / Re: "Choose" statement
« on: July 08, 2011, 11:39:23 AM »
For starters, HaRRi, stdargs.h will kill the program if you pass it a var or a variant.
Also, good luck getting the argument count.

1325
General ENIGMA / Re: Enigma status
« on: July 08, 2011, 11:37:39 AM »
I've begun work on a varargs class that, when excepted as a parameter, allows functions to be called with unlimited arguments. Like in scripting languages. You could fetch the number of arguments, iterate through them, sort them... anything you need to implement functions like mean(), mode(), median(),  choose()... The drawback is that they require a macro.

At the moment I'm torn between allowing ENIGMA to deal with that macro (it has to have some knowledge of it to allow unlimited arguments in a function) or just adding a #pragma directive that will give them infinite parameters automatically. I'll probably do the former; the latter's kludgy.

1326
I made some move toward implementing that for you, but I forget where I left off. *shrug*
Sorry about that.
Case-closed then, yes? :P

1327
Issues Help Desk / Re: enigma can't find 'make'
« on: July 06, 2011, 11:43:29 AM »
I thought Ism fixed that... ;__;
My word.

Anyway, glad that's working now. We'll try to work some of the kinks that plagued you out of the system. Both of us have a big to-do, but this will probably end up queued up, seeing as it keeps causing major issue.

1328
Issues Help Desk / Re: enigma can't find 'make'
« on: July 05, 2011, 10:16:11 PM »
HaRRi: Make sure you rebuild the DLL. I corrected that dog shit problem in 798; the same revision that introduced it.
As for the exception, that's greek to me.

Dom: I'll have IsmAvatar print the SVN revision number; in the meantime, does a blank game work? A game with just one room? A game with a room and an object with/without a sprite? 799 had a problem with objects that don't have sprites.

1329
Issues Help Desk / Re: Install Enigma on Mac
« on: July 05, 2011, 12:28:05 AM »
That depends mostly on TGMG. Most of the developers and those active in the IRC go with trunk/. That folder, though we try to keep it working as best as we can, often ends up accidentally destroyed. We maintain stable mostly to work on Windows. It pretty much always works on Linux; Mac, however, is still foreign to most of us, and usually isn't considered in marking as stable.

That said, I don't know which to recommend on Apple. I'd probably try trunk/ first since we don't ensure consistency on tags/update-stable on Mac. If that fails, though, maybe TGMG maintains the stable tag of Mac...

If both fail, wait for TGMG to respond. He keeps what's basically a fork of the project for Mac on his own Git repository. It is the most likely to work, but it has some test-related quirks...

1330
Issues Help Desk / Re: enigma can't find 'make'
« on: July 04, 2011, 12:49:48 PM »
I'm not sure, then; my Windows testers all report that the new trunk revision fixed that issue. If a full reinstall from trunk didn't fix it, I'm mostly out of ideas... Are you able to confirm it's updated to r800?

1331
Issues Help Desk / Re: enigma can't find 'make'
« on: July 04, 2011, 10:39:01 AM »
Yeah; I committed a bunch of stuff a couple days ago
Revision 800 corrects that issue; just update (maybe LGM will update for you) and it'll be fixed.

1332
Function Peer Review / Re: "Choose" statement
« on: July 03, 2011, 05:13:10 PM »
ENIGMA will have one shortly. I need to make modifications to the syntax checker to allow functions to accept enigma::varargs.

1333
Issues Help Desk / Re: enigma can't find 'make'
« on: July 03, 2011, 01:01:20 PM »
Glad to hear you got that fixed!

That's an odd error. The file certainly exists. Are you checking out from the trunk? The trunk is undergoing some very large changes right now, and one of them moved the file from which the error is being thrown.

The trunk also has some issues with objects that don't have sprites, but that's unrelated.

Anyway, if you are using the trunk, give us another day or two to sort that out. If you chose "update-stable" (The tag that just reads "Stable" in LGM's selection box), then we have a new problem on our hands.

1334
Issues Help Desk / Re: just started
« on: July 03, 2011, 12:49:15 PM »
Quote
By the way, how do I declare the type of variable I want to use? I only know how to program in GM...
In GM you have var and globalvar to declare a variable of any type. In ENIGMA, you can replace var with numerous types for different purposes:
int declares an integer; these are bounded between -2147483648 and 2147483647.
float declares a floating point (decimal) number; these values can be extremely large or small.
double declares a double-precision float; a float with more digits. This is how GM stores numbers.
char declares a single byte; an integer between -128 and 127. These are often treated as letters.
string declares a C++ string; this behaves almost exactly like Game Maker's string types.
variant declares a scalar var in ENIGMA. It behaves like var, but cannot be used as an array.

Example Game Maker code:
var my_integer; my_integer = 12;

Example ENIGMA code:
int my_integer; my_integer = 12; // Or
int my_integer = 12;

The equivalent to GM's "globalvar" simply reuses the keyword global in ENIGMA.
globalvar my_global_integer;

Becomes
global int my_global_integer;

To allow declaring local variables as faster C++ types, the local keyword can be used the same.
local int my_local_integer;

Quote
I meant GM, but I still havent tested the compilation many times yet. I'll make a decent comparation soon.
ENIGMA's first compilation for a given platform takes between 30 seconds and a couple minutes. This is because ENIGMA is building and optimizing its entire engine for your machine. Subsequent runs can take under a second. On my machine, running takes almost exactly one second from the time I press Run.

Quote
Every function I know regarding GM's surfaces - includding surface_create - are listed on IsmAvatar's link. As I said, since I thought Enigma was slow, my plan was to develop games using GM and compile using Enigma, but I feared using a wide list of functions while developing just to find out, at the end of the project, that they should not have been used.
Ideally, we will come to support all of Game Maker's functions. Even the really dumb ones. One of our goals for the EGM format we are working on is to make development of large games quick and easy--Our format is laid out such that very little information needs changed at save time, and only small pieces of info from each resource need read at load time. We also intend to bring back a feature from our previous release soon that will put development in ENIGMA far ahead of that in Game Maker--It's a surprise.

Quote
And how do I play my games on a plataform other than my own computer? I heard it is already able to compile to other plataforms, like Android. I do not own an Adroid, so I can't tell. It runs .exe files? What about Macs?
At the moment, only Mac users can compile for Android, and only Linux users can compile for other platforms (namely, Windows). TGMG is working on making the Android and iPhone ports work from other platforms. At the moment, you need to be using Windows to compile for Windows, Linux to compile for Linux, etc. We're working on it.

1335
Besides, it doesn't matter if C++ offers a useless keyword here and there; we all know C++ is indisputably the best language known the man, if not the best language of all time.