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 / ENIGMA R4
« on: September 08, 2010, 04:38:46 am »
The contents/links of this page may be outdated. We have instead starting hosting our installation links and directions on the wiki:

It's been a long road. So much has come and gone, and even just changed slightly, since the release of R3 near the end of 2008. R3, as most of you know, was basically a proof-of-concept. It demonstrated that with a little effort, it is possible to take something like Game Maker and compile it for a number of advantages. Since then, ENIGMA's philosophy has changed by leaps and bounds. What started only as a spite-fueled attempt to compile GML has evolved into a nonstop effort to develop the better scripting language.

R3 brought most of GM's language functionality to the compiled world, and with some limitations, most of C++'s as well. R4, however, has shattered the boundary between the two.

With R4's new setup, the system is astoundingly extensible, and even faster and more efficient than ever before. The newly designed instance system functions like a dream, handling the more thought-consuming concepts such as heredity automatically, by nature of its design.

C++ functions and containers are available to anyone who wants to #include them in the new resource, so far called "Definitions." By that mechanism, anyone can create C++ structures and functions for use in ENIGMA games. Even with a (constantly shrinking) list of missing features from R3, ENIGMA has never been in a better condition.

That said, as has been hinted, there is much left to do. The main system is in place and has undergone basic testing. But this release marks the public beta of the final product. Please report any and all errors you encounter immediately.

The first challenge on our list of things to work out in the beta is actually getting ENIGMA to install on all operating systems. The most anticipated release package--a simple zip file for windows--I present now, without further adieu:
ENIGMA R4 install-ready zip, for Windows
ENIGMA R4 install-ready zip, for Mac (mac sdk has to be preinstalled)
For this phase of the testing period, please unpack the zip and run ENIGMA.exe. It should take care of the rest for you, provided you have Java installed.

When the MinGW installer gives installation choices, just make sure G++ is checked in addition to the default.
When LGM prompts you to fetch libraries, leave the default selection of Stable as your choice, and choose Yes. This will start the installation process. Depending on your internet connection (which will need to remain up for install), this may take upwards of two minutes. It is a one-time install. Your first compile will complete the installation, and depending on your processor, can take the same amount of time. Use only "Run" for now, if you would.

Let me know how the installer treats you. Post any problems with installation here, and any other bugs on the tracker.

The reason for the delay is the amount of effort that went into setting up an update system and the user-defined functions system. Everyone who likes those features owes IsmAvatar a huge "thank you." I personally believe she did an outstanding job on the matter.
For now, C++ Definitions are persistent throughout all games, but can be saved or loaded. We'll get around to fixing them to be game-local eventually.
Happy coding, and I sincerely hope you enjoy the release.

Issues Help Desk / Re: Needed ENIGMA functions
« on: September 07, 2010, 02:36:03 pm »
Just wait a bit; I'll get that implemented once I decide what I'm doing with sprite and object info.

General ENIGMA / Re: GML
« on: September 07, 2010, 01:58:58 pm »
I wish I could have finished that C parser a bit faster.
Anyway, watch what happens next, Game_boy. Don't blink.

Issues Help Desk / Re: Needed ENIGMA functions
« on: September 07, 2010, 11:59:16 am »
Luis: The beauty of the new instance system is that none of the engine functions require an object_get_parent().
Regarding your syntax error; if you open the file it mentions and press the syntax check button, it will highlight the place it occurs as well as print the line number and such in the status bar.

This is an implementation of instance_position, returning the first instance AT x,y.

Code: (C) [Select]
// Copyright Josh Ventura, etc.
int instance_place(int x,int y,int obj)
  for (enigma::inst_iter *it = enigma::fetch_inst_iter_by_int(obj); it != NULL; it = it->next)
    if (x == ((enigma::object_planar*)it->inst)->x
    and y == ((enigma::object_planar*)it->inst)->y)
      return it->inst->id;

  return noone;

I've already added it, of course. Look for it in the next revision.

Announcements / Re: Where do we stand?
« on: September 06, 2010, 10:05:54 pm »
polygone: I've been riding Ism for weeks about implementing saving one resource so we can release with a clean conscious, but she's still not done it. As soon as she's done with that, I'm releasing.

Tips, Tutorials, Examples / Re: Which should I use?
« on: September 05, 2010, 09:00:09 pm »
Yes, I suppose if you take all optimizations away, and are using a non-scalar object, then yes, a pre-increment is more efficient.

General ENIGMA / Re: GML
« on: September 05, 2010, 08:28:59 pm »
ENIGMA supports all of that, Luis.

Tips, Tutorials, Examples / Re: Which should I use?
« on: September 05, 2010, 09:55:16 am »
Moreover, some people suggest ++i instead of i++. Does the same thing, but is more efficient,
and is safer for recursive functions.

I'm getting a bit tired of that myth.

int i = 0;
cout << i++ << endl;
cout << ++i << endl;

The above prints 0 2. If we were to look at the micro operations, i++ would send to RAM, then increment; ++i would increment, then send to RAM. I.e., the same process, but with the order changed. Neither is more efficient. I've never heard that one is safer than the other for recursive functions. It's a matter of understanding which one will behave in the best manner for the current algorithm.

General ENIGMA / Re: GML
« on: September 05, 2010, 09:48:43 am »
Those two functions, game_save and game_load, have been giving me a headache. There doesn't seem to be a good way to implement them in an established C++ environment. I have no idea why Mark doesn't save ds_*'s. That was the -ONLY- reason I thought an ID based data structure system would have any place in ENIGMA. Knowing that he doesn't save them, though... Erg.

Anyway, my plan for game_save and game_load was basically to require that all variables that are to be saved be given a type with one of the following properties:
1) An overload for operator<<(ofstream::operator&, class&) and likewise for operator>>()
2) A member called _game_save(FILE*) and _game_load(FILE*)
3) An overload for enigma::game_save_putter(class&) and enigma::game_save_setter(class&)
4) A structure containing only types meeting the above
5) An overload for a pointer to a type meeting any of the above and a size_t length(void)
6) A standard iterator system (begin(), end(), operator++(int)) returning any of the above as a scalar or an std::pair.

If all types meet those specifications, the entire game can be saved. Is that great, or what?

Announcements / Re: Mini Progress Feed
« on: September 05, 2010, 07:00:25 am »
Well, I did fix var[,] as well as hexadecimal (which no one even missed yet). I also fixed a problem with abs(), string(), and possibly the Bessel functions. I've not tested the Bessel functions for some reason; they either work or error at compile time. Fixed some bugs with the new accessor system and the new type resolution system, but I know of a bug that has not yet been reported regarding a.b.c access potentially failing where b is not an integer (in cases such as I have a generic idea of how to solve that, but I need to get :: working in the syntax check and parser first.

I've also been working a lot with TGMG to try to work out the rest of the parse errors on Apple. It's astounding. I got macro unrolled-versions of all the headers from TGMG to debug here on Linux where my tools all work, and ran the parser on it... No error. This means one of two things:
1) The macros somehow interfere with the parsing
2) The parser is misbehaving in some other way on Apple
The former is unlikely due to the fact that there are no macros even near the code in question. The latter would be a horrific realization.

Looking at implementing build mode, it seems I'll be going with my original plan to incorporate cross-platforming: A window system similar to GM systems. Basically, the API will look like this:

Code: [Select]
int win = gui_window_create(0,0,640,480);
int pan = gui_panel_create(win,0,0,640,480);
int but = gui_button_create(pan,8,8,120,24,"Press Me");

if (gui_button_pressed(but))

General ENIGMA / Re: GML
« on: September 04, 2010, 12:42:57 pm »
Most of this has been said by now, but I'll reiterate and ad lib.
I'm not sure where Brett got the idea that tile IDs start at 1,000,000... I believe that may be where tile depth starts.

Anyway, resources (sprites, scripts, objects, etc) start at zero and never reset under normal GM situations. Ism added a function to LGM that can defragment them, but basically, the first resource you create is zero, and any resource after that will just keep counting.

Based on the idea that a game will never have gone through 100000 objects, instance IDs start at 100001. Each instance placed in a room has a "hard-coded" (tongue and cheek in a runner) ID. This means that no matter how many times you visit the room, the instances in there at load time will be given the same ID.

From there, created instances use the same methodology as normal resources; adding constantly to the current highest ID.

ds_stacks, lists, maps... files, surfaces, etc., are all given the same system.

As far as GM is concerned, object0 == sprite0 == instance0-100000 == surface0 == file0 == list0.

This was all just Mark's method of removing pointers.

Proposals / Re: GM Function Implementations
« on: August 31, 2010, 01:46:40 pm »
I try to avoid things that make threading a bad idea, because a method of moving instances between threads would be nice, eventually.

Anyway, I have to admit to liking your _ENIGMA_VARARGS idea. I think such an implementation would be quite useful, and I know how I'd do it.

typedef double *_ENIGMA_DOUBLEARGS
typedef varant *_ENIGMA_VARARGS

When the parser sees a function taking parameter typedef _ENIGMA_VARARGS, it does something like what you said, but inline:
min(1,2,3)      becomes       min((variant[]){3,1,2,3})

I was looking for an excuse to track parameter types more closely, and this has given it to me.

Announcements / Re: Mini Progress Feed
« on: August 31, 2010, 03:29:19 am »
Okay, as of now, OBJECT.variablename works for everything but global, which some part of me is still deciding what to do with. As I mentioned earlier that such would effect, with() now works again as well.  The list of things from R3 not yet implemented is quickly shrinking.

var[,] and build mode are the two remaining big ones.

Proposals / Re: GM Function Implementations
« on: August 30, 2010, 01:50:18 pm »
r9k: Indeed, I've been looking for the best way to provide unlimited arguments to the function. It seems my only choice is to parse it that way.

Announcements / Re: Mini Progress Feed
« on: August 30, 2010, 12:21:03 am »
Listen. To. Me.
I. Do. NOT. Call. ANYTHING. In. The. Program. Files.

I. Do. NOT. Call. ANYTHING. In. The. Program. Files.

I don't care if you know what happens when you type text into the black box Microsoft calls a terminal. I do not make calls to system(), because system() incorrectly parses quotes on Windows, ignoring them. Instead, I call CreateProcess, of which parameter0 is an unquoted path to the module to be loaded.

If you listened in the damn IRC, you would have heard that the error still persists when Make is called manually by the user. Meaning one of two things
1) The unescaped string is in the makefiles (unlikely)
2) The MinGW configuration being called is invalid (very likely in your case: using Code::Blocks' custom MinGW shipment)

I have no idea why Rusky is experiencing that problem, since his MinGW has no affiliation with the Program Files, either, but you two are the only Windows users experiencing this issue.