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

Proposals / Re: Sprite Editor / Sound Editor
« on: April 08, 2011, 11:46:18 am »
I can't speak for Ism on the matter (this is really her area), but I know a sprite editor has been a request and a to-do item for a long time. We're focusing on more technical aspects, especially with the high number of people that tell us they hate LGM and will use it only as an easy way of invoking ENIGMA.

The nice thing is that LGM gets along well with GIMP, and Ism has promised to allow setting your own external editor at some point in the near future.

Proposals / Re: LGM Find/Replace - Design Ideas
« on: April 08, 2011, 11:41:30 am »
It means you're searching the name. If anyone selects a single sprite or background, they are retarded.

General ENIGMA / Re: First questions
« on: April 08, 2011, 11:34:53 am »
Unfortunately, no. The new options panel has been on its feet for less than three cycles and TGMG hasn't surfaced in that time (or if he has, I wasn't there to greet him and help it through it).

But we're ready to make the three Apple platforms compile as soon as someone with access to them shows up to help.

Hey, and welcome to the ENIGMA board!

IsmAvatar said most of what needs said, but I should add a couple things, and, well, may as well go off on a huge tangent about where ENIGMA stands and how it works. ENIGMA can already compile on most platforms, and some consoles. The issue is getting it to work from one to another without massive modification. The way we have set up ENIGMA thus far, thanks in good part to its Java interface, is such that it can compile itself on any platform actually capable of running Java and a compiler (this is basically Windows, Linux, and MacOSX). On each of those platforms, you can of course compile and run your game. To compile for other platforms, you have to select them.

The issue is that the location of the compiler along with the libraries it uses varies impressively from platform to platform. That being the case, we have been developing a system that allows ENIGMA to keep track of where these compilers are and how it can interface with them on each platform the interface will run on (Windows, Linux, MacOSX). That being the case, you will need to set up compilers for those alternate systems, which we are working on automating.

So, say you set up ENIGMA on Windows. In its Windows compilers folder, it will make an entry, Compilers\Windows\gcc.ey (the default compiler). When you try to use ENIGMA, it will read that file to figure out how to interface with the GCC, which will tell ENIGMA exactly what it can do, and exactly what you can do as the user. If you want to compile for a different platform, you will, ideally, simply download an installer that sets up the compiler for your machine and places the configuration file in Compilers\Windows\ where ENIGMA can find it.

Using the same data files, the interface can determine what platforms are available to you to compile on. What this comes down to is the interface looking at all the files under .\Compilers\Windows\ and offering you choices based on what the files say they can compile for. So when you go to choose your compiler, the IDE roots through them, reading for the destination:
  • gcc.ey claims that it can compile for Windows and names itself the default, so LGM places it in the list and selects it.
  • devkitppc.ey claims that it can compile for Wii, so LGM lists "Wii" as well.
  • devkitarm.ey claims it can do NintendoDS, so LGM adds that.
  • xgccmac.ey claims it can compile for OS X, so LGM offers it.

At the moment, approximately half of the ENIGMA project actually acknowledges the existence of those files. So, even though TGMG has gotten ENIGMA to compile on MacOSX, iPhone, iPad, Android, the PSP, and even NintendoDS (I've not seen his NDS code, so don't quote me), he did so by making hard-coded modifications to the way ENIGMA's compiler processes things, because this system was not yet around. The changes he made aren't the kind that the IDE could just slap in, so what we have to do is re-implement them as vaguely as possible to allow the .ey files I mentioned above to be able to dictate them. For instance, to get it to work on iPhone, he had to write resources in a separate wad (NOT as part of the executable), which meant changing some four lines of code and recompiling. A simple if() based on what appears in iphone.ey could take its place. So, that's what we're working on next.

Anyway, sorry for the wall of text.

The short answer to your question is that, while ENIGMA is presently capable of compiling for all the platforms you mentioned and more, it will not be as easy as choosing them from a menu for another couple weeks.

As for JAR, like Ism said, ENIGMA compiles as C++. You'll find companies like Yahoo have other ways of embedding games in browsers (Yahoo games are largely C++), and ENIGMA can compile to the three major platforms anyway, so there isn't much advantage to running a fork that compiles to Java.

And as for HTML5... No, we'll let Yoyo fall off that cliff themselves, if they like. There's no advantage to using HTML5 over using Java, that I can see, other than it's "kinda neato," and as you can see, Sandy gets his knickers in a knot every time it's mentioned, probably due to the dilution of the project it would introduce and the impossibility of securing it.

Announcements / Re: Recent Events
« on: April 07, 2011, 09:38:31 am »
Essentially nothing, though Ism's planning a find function for LGM. I've been engulfed in schoolwork (I'm taking 24 credit hours of classes, soon to be 15), so I haven't had much time to work on ENIGMA. I've not forgotten about your switch(), though.

I've been hoping TGMG would notice that Ism finished that options panel (so she says). Perhaps I'll have to deal with that myself, but for now, I have school things to do and am barely keeping up with things here.

It'll be over by next weekend.

Proposals / Re: LGM Find/Replace - Design Ideas
« on: April 07, 2011, 09:35:11 am »
Or you could make a supermassive tree that shows all the resources in one place, along with the groups, and all the events under each object. So to search in the step events of obj_ground, you'd select Objects/Platforms/obj_ground/Step in the tree. Maybe you could put the tree in the main LGM pane, next to the MDI window.

...I'm proposing you just add events to the existing resource tree and allow selecting from that tree for the find function.

Issues Help Desk / Re: Function pointers
« on: March 28, 2011, 01:36:27 pm »
Currently, ENIGMA defines scripts as the actual functions inside each object scope. To correct this, the compiler must export the following:
Code: (C++) [Select]
enum {
  script0 = 0,
  script1 = 1,
  // ...
variant SCR_script0(/*...*/)
  return 0;
variant SCR_script1(/*...*/)
  return 0;

#define script0(x...) SCR_script0(x)
#define script1(x...) SCR_script1(x)

variant execute_script(int scr, variant arg0 = 0 /* ... (all of these will be defined and defaulted) */)
   switch (scr)
       case 0: return SCR_script0(/* ... (The same number of parameters as the script max will be used) */);
       case 1: return SCR_script1(/* ...  */);

Issues Help Desk / Re: Troubles with mingw32-make
« on: March 28, 2011, 01:17:19 pm »
If Griggs thinks the problem is from running the Jar instead of the EXE, make sure you're trying ENIGMA.exe. The Jar seems to be run from Java's path rather than its own working directory.

Where did you obtain the source? If you checked out from the SVN, running ENIGMA.exe once is necessary (it actually performs some installation routines now). It will automatically install the latest version of MinGW, and write a configuration file to let ENIGMA know that it has been installed.

If you want to use the version you've installed now, you'll have to create your own config file under Compilers/Windows. Model it after the ones in MacOSX/ and Linux/.

Perhaps it would be better if we included a workable config file in the SVN...

Off-Topic / Re: Test
« on: March 28, 2011, 01:12:38 pm »
The third one looks best, but for legibility...

Issues Help Desk / Re: Build mode doesn't and has never worked for me.
« on: March 23, 2011, 11:16:20 am »
There's no caps lock delay. It just stays on until you release the key, unlike in Windows.

Issues Help Desk / Re: Build mode doesn't and has never worked for me.
« on: March 22, 2011, 10:25:02 am »
It wasn't. That build mode used WinAPI to construct the window. I started a set of widget functions not long ago to allow it to be implemented cross-platform; you'll see mention of it in the latest newspost; "and then I'm going to finish ENIGMA's widget functions, and reactivate R3's super cow powers."

Build mode was a powerful asset, but I'm focusing on the actual engine for now. It'll work again before May.

Announcements / Re: Recent Events
« on: March 22, 2011, 12:52:34 am »
Nah, just take
Code: [Select]
    #include "Graphics_Systems/OpenGL/OPENGLStd.h"
    #include "Graphics_Systems/OpenGL/GSsprite.h"
    #include "Graphics_Systems/OpenGL/GSbackground.h"
    #include "Graphics_Systems/OpenGL/GSfont.h"
    #include "Graphics_Systems/OpenGL/GScurves.h"
and jam it all into "Graphics_Systems/OpenGL/include.h", then do the same for OpenGLES (Graphics_Systems/OpenGLES/include.h).

If you like, you can then place the
Code: [Select]
    #include "Graphics_Systems/OpenGL/include.h"
    #include "Graphics_Systems/OpenGLES/include.h"

Into its own header, "Preprocessor_Environment_Editable/apis.h". ENIGMA will eventually generate that file, sans the #ifs.

Announcements / Re: Recent Events
« on: March 21, 2011, 11:51:30 am »
Possibly with a Diff patch; maybe I'll just give you commit privileges for it.

Announcements / Recent Events
« on: March 21, 2011, 10:55:20 am »
Though I didn't intend to post any announcements on the matter, since some of our contributors don't tread on the IRC, I think it's better to say what's been going on, with all that is ENIGMA related.

- IsmAvatar is still working on the options panel. We think. The options panel will be what allows users to compile for different platform.
- I added a set of functions to ENIGMA's interface that allow LateralGM to retrieve function lists, so now even new functions will have some parameter list to fall back on, though it is apparent that we will need our own function manual to reference first (some of the parameter lists are ugly and unhelpful).
- IsmAvatar added those parameter lists to the function lists, but only one overload of them. She'll probably do something else with them later.
- Ism and I started LGM's own text editor, since we can't seem to find a competent Java editor that's self-contained. You can see more about that in other threads across the forum.
- A lot of bugs have been fixed from the tracker, and a lot more have been posted. Most of the new ones are trivial and make my head hurt.
- A List of Little Things that Need Done has been created on the Wiki. If you want to help, that's a good place to start.
- ENIGMA now exports font info to the game, but not glyph metrics, which will be appended later. Fonts should be completely done before this thread has five posts.
- I have begun work on a new coercer for the purposes of array bound (in the [] ) safety (they need casted to int for C++ arrays) and switch statements. The coercer is necessary for switch() because I need to spawn a temp variable for iterative comparison, and am not prepared to use C++0x for 'auto' in one place.
- Ism has made some 4200 bugfixes in LGM as Polygone continued to point them out.
- TGMG got ENIGMA a little closer to working on Mac out of the box. He and I are both waiting on Ism to finish the options panel.
- Ism removed the forced 'Metal' theme in LateralGM; now users can enjoy the native theme or customize it as has been done by Java-acquainted people here in the past. It hasn't been compiled and rolled into ENIGMA yet, but will in the near future.
- TGMG has been working diligently to make ENIGMA compile the GM6 examples. They're mostly done, but a couple of things are still missing, which I may start to fill in randomly.

Bugfixes include the following:
- Segfault when reading more than one path or timeline (LGM wrote structures of the wrong length, causing misalignment)
- Compile error for var mod var, var = long... some others. All operators should work now (except 2.5 % 2; use 2.5 mod 2)
- Collision event behaves more like GM (thanks, TGMG)
- DND problems are mostly resolved

Some modifications to the site have been made.
- 30 spam accounts have been deleted. If some of them actually weren't spam, I apologize.
- Members without posts can't do anything until they post. Meaning, no spam.
- I've reimplemented the Regex verification that was destroyed last SMF update. Also, "Remember me" works again, in case you didn't notice.
- ALL contributors can now post news.

In the bigger scope of things, ENIGMA now has the collision functions implemented with bbox checking. Since r9k disappeared, we don't have polygon-based collisions (or any of his code for them), but we may have a surprise in store on the matter, when testing week's over.
And as I mentioned, thanks to TGMG, ENIGMA can very nearly compile the GM6 standard examples.

As far as where I want to see this project go next, we need to corner something that GM still hasn't. I look at these magnificent games manufactured in GM, and I just think of one dedicated soul, waiting for minutes as Game Maker compresses all 46,000 sprites so he can test again. ...It's kind of frightening. As such, I want a format that allows saving only modified resources, as I've mentioned elsewhere in the forum. That format will likely be zip.

So. I'm going to finish fonts, then the coercer for [] and switch(), and then I'm going to finish ENIGMA's widget functions, and reactivate R3's super cow powers.
Ism's going to procrastinate the options panels some more.


Off-Topic / Introductions
« on: March 16, 2011, 09:34:35 am »
In an effort to end this forum's war on spam, I've made it so it's virtually impossible to spam until you've made a post. The side effects of that include the inability for new members who are here legitimately to edit their profile or do other personalizations one would typically do upon registration. So, this topic is for humans who would like to have somewhere legitimate to post so they can edit their profiles and use the messaging systems.

So yes, say hi, and say something to make the admins think you're here because you are genuinely interested in what goes on here.

In that case, you would have to edit the controller I described to draw those two HUDs. Add those images you drew atop the chickens as backgrounds, and use draw_background to display them. Use the following to populate it, in the draw event as well of course:
Code: (GML) [Select]
global.list = "";
  global.list += object_get_name(object_index) + "#";
draw_text(<x coordinate of objective HUD> + 16, 16, global.list);

This code requires that the students enter an English name for each child object.

The inventory HUD will make the game more complicated. Game Maker does not allow for multiple inheritance (nor does ENIGMA at the moment). That being the case, in the destroy event for each findable inventory item (i.e., your skeleton key), you will need to execute a code. You will also need a sprite for them as they will appear in the inventory, including any borders. Keep them all the same dimensions so it looks presentable. Give them each three subimages; the first subimage will be drawn in the HUD when it isn't selected, and the second will be drawn there when it is, and the third will be drawn at the cursor.

You will need a Game Start event in the controller:
Code: (GML) [Select]
global.inventory = "";
global.inventory_sprite = -1;
global.inventory_selected = -1

Then, just after you draw the other HUD,
Code: (GML) [Select]
var i, xx, yy; xx = 16; yy = <HUD Y COORDINATE> + 16;
for (i = 0; global.inventory[i] != ""; i += 1)
  draw_sprite(global.inventory_sprite[i], global.inventory_selected = i, xx, yy);
  xx += sprite_get_width(global.inventory_sprite[i]) + 4;
  if (xx + sprite_get_width(global.inventory_sprite[i]) > room_width-16) {
    xx = 16; yy += sprite_get_height(global.inventory_sprite[i]) > room_width-16) + 4;

Add a Global Left Pressed event to the controller.
Code: (GML) [Select]
if (mouse_y > <HUD Y COORDINATE>)
  for (i = 0; global.inventory[i] != ""; i += 1)
    if (mouse_x > xx and mouse_x < xx+sprite_get_width(global.inventory_sprite[i])
        and mouse_y > yy and mouse_y < yy + prite_get_height(global.inventory_sprite[i]) > room_width-16)) {
      global.inventory_selected = i;
    xx += sprite_get_width(global.inventory_sprite[i]) + 4;
    if (xx + sprite_get_width(global.inventory_sprite[i]) > room_width-16) {
      xx = 16; yy += sprite_get_height(global.inventory_sprite[i]) > room_width-16) + 4;

Again in the controller's draw event,
Code: (GML) [Select]
if (global.inventory_selected != -1)
  draw_sprite(global.inventory_sprite(global.inventory_selected), 2, mouse_x, mouse_y); // Draw the selected item at the mouse

Again in the controller, on Global Mouse Release:
Code: (GML) [Select]
global.inventory_selected = -1; // Clear the selected item
The inventory collectibles, as I mentioned, need to have something special in them to add them to the inventory. This is a script that you will call in the destroy event of EACH collectible inventory object; call it inventory_add(name,sprite):
Code: (GML) [Select]
var i;
for (i = 0; global.inventory[i] != ""; i += 1) {}
global.inventory[i] = argument0;
global.inventory_sprite[i] = argument1;
global.inventory[i+1] = "";
global.inventory_sprite[i+1] = -1;
A sample call is inventory_add(object_get_name(object_index),spr_inv_skeleton_key);.

This next script is inventory_remove(name or id).
Code: (GML) [Select]
var i;
if (is_string(argument0))
  var found; found = false;
  for (i = 0; gobal.inventory[i] != ""; i++)
  if (gobal.inventory[i] == argument0) {
    found = true; break;
  if (!found) exit;
else i = argument0;
if (i == gobal.inventory_selected)
    gobal.inventory_selected = -1;
while (gobal.inventory[i] != "")
    gobal.inventory[i] = gobal.inventory[i+1];
    gobal.inventory_sprite[i] = gobal.inventory_sprite[i+1];

As an example, your treasure chest would make this check in its Mouse Press event:
Code: (GML) [Select]
if (gobal.inventory_selected != -1)
  if (gobal.inventory[gobal.inventory_selected] == "Skeleton Key")

I recommend that you provide the students with the two scripts, if they are not very good with code.
I've not tested any of the above code, but I have some confidence it will work if you put a little time into it.
You can send this to her as well, again with my regards. I can't continue abstract work on this game if it grows any more complicated, but I'm happy to answer questions. Peace.