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

1726
Function Peer Review / Instance Interface How-to
« on: September 09, 2010, 12:40:21 PM »
Some functions need to interface with the current instance or with all instances.
The new instance system I was singing praises about for so long offers a simple interface to do this.

To fetch the currently active instance, use
Code: [Select]
enigma::instance_event_iterator.
Example:
Code: [Select]
int instance_destroy()
{
  enigma::instance_event_iterator->inst->unlink();
  return 0;
}

Iterating instances is about as easy.
As I've said, ENIGMA uses a unified iterator class. The class contains two members of concern; a pointer to the instance (guaranteeing only id and object_index members) and a pointer to the next iterator. If at any point the pointer is NULL, iteration is over.

An iterator can be fetched by an integer just like in EDL by using enigma::fetch_inst_iter_by_int(obj).

Example:
Code: [Select]
int instance_find(int obj, int num)
{
  int nth=0;
  for (enigma::inst_iter *it = enigma::fetch_inst_iter_by_int(obj); it != NULL; it = it->next)
  {
    nth++;
    if (nth>num)
    return (int) it->inst->id;
  }
  return noone;
}

A system has not yet been added to manipulate locals that are not guaranteed (such as health).
Variables that are key parts of the system (such as x and y) are included in different tiers of ENIGMA's instance system. The lowest tier is collisions, implementing bbox_* variables, and solid. The graphics tier implements such variables as sprite_index and image_index (which may eventually be removed as its use seems to indicate that placing it in system tiers is unnecessary). x,y, speed, direction, hspeed, and vspeed are implemented in the tier below that. Variables id and object_index are implemented in the bottommost tier.


1727
Function Peer Review / Function Peer Review Board
« on: September 09, 2010, 12:24:09 PM »
Greetings, all.

This board was added with the completion (However temporary) of ENIGMA's C++ Definitions resource.

Using this resource, users can add their own C++ functions and types to ENIGMA, or include them from other headers.

This board is for users who wish to share their C++ function sets, and perhaps even include them in the specification. If you meet developer peer review, and your function is included in the Game Maker spec, it will almost certainly be added.

Basic board rules apply. No flaming; every contribution or attempt at a contribution, however poor or inefficient, is welcome.
A sad cry of a stab in the dark at implementing a function may even provoke a developer to implement it correctly and add it in.

Cheers.

1728
Issues Help Desk / Re: Common Incompatibilities
« on: September 09, 2010, 09:19:30 AM »
Haha! The problem is (yes, entirely my fault) that the code is in fact, too short. I'll fix it now, but I'm waiting for a fix from Ism before I commit to the Stable repo. Presently, LGM is breaking on update.

Polygone: I've fixed your other two bug reports as well, but you'll need to wait for the commit before LGM can update to them.

1729
Issues Help Desk / Re: Common Incompatibilities
« on: September 09, 2010, 08:42:26 AM »
The repeat statement doesn't really do anything but count... It's probably something inside it that's crashing.
Indeed, the repeat statement works fine here. I'll investigate the break; issue.

1730
Issues Help Desk / Re: Common Incompatibilities
« on: September 09, 2010, 08:26:36 AM »
Odd, the repeat statement should work. Are you sure it doesn't?
Anyway, I'll use this thread as somewhat of a priority list when the rest of the install issues clear.

1731
Announcements / Re: ENIGMA R4
« on: September 09, 2010, 08:21:53 AM »
kkg:
I have corrected my part of the problem, waiting for Ism to correct hers.

fede:
This is the fourth public release.

IsmAvatar:
This is the problem. It occurs only the first time ENIGMA is run, after checking out all the files:

Code: [Select]
Calling `make`
Exception in thread "Thread-6" java.lang.NoClassDefFoundError: org/enigma/Enigma
Thread
        at org.enigma.EnigmaRunner.make(EnigmaRunner.java:194)
        at org.enigma.EnigmaRunner$1.run(EnigmaRunner.java:121)
Caused by: java.lang.ClassNotFoundException: org.enigma.EnigmaThread
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 2 more
I can confirm the make path is valid, not that the above error implies in any way that it wouldn't be. After restarting LGM, the entire system works.

This, however, seems to occur randomly, whenever a code piece is opened:
Code: [Select]
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/enigm
a/EnigmaRunner$4
        at org.enigma.EnigmaRunner.subframeAppeared(EnigmaRunner.java:725)
        at org.lateralgm.subframes.SubframeInformer.fireSubframeAppear(SubframeI
nformer.java:37)
        at org.lateralgm.subframes.ActionFrame.<init>(ActionFrame.java:205)
        at org.lateralgm.subframes.ActionFrame.<init>(ActionFrame.java:89)
        at org.lateralgm.components.ActionList.openActionFrame(ActionList.java:1
32)
        at org.lateralgm.components.ActionList$ActionListMouseListener.mouseClic
ked(ActionList.java:168)
        at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
        at java.awt.Component.processMouseEvent(Unknown Source)
        at javax.swing.JComponent.processMouseEvent(Unknown Source)
        at java.awt.Component.processEvent(Unknown Source)
        at java.awt.Container.processEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Window.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

1732
Announcements / Re: ENIGMA R4
« on: September 08, 2010, 10:43:14 PM »
All right, talking with different people on the matter, I've discovered that most of the errors reported here resulted from drive letter mixups and difficulty finding program files, namely because createProcess doesn't support %variables% and some people here (namely Plague) do not have English as their computer's primary language. I thought I had that corrected, but then LateralGM started throwing exceptions in Ism's latest revision, so now I'm waiting for her to fix things.

tdub311:
I'm very glad to hear it works for you. Presently, I'm reluctant to make a compile feature because I don't have a number of measures in place to take care of aesthetics, namely (1) making sure there are no external dependencies (such as OpenAL) and (2) that the outputted executable is as small as possible (you might not be horrified by an EXE size if you were to look now, but they're over a megabyte).

1733
Announcements / Re: ENIGMA R4
« on: September 08, 2010, 07:00:11 PM »
Not enough, evidently. Cycling back...

1734
Announcements / Re: ENIGMA R4
« on: September 08, 2010, 04:50:02 PM »
How annoying. If any of you could join the IRC, that would help.
irc://irc.freenode.net/enigma-dev

1735
Issues Help Desk / Re: globals
« on: September 08, 2010, 03:16:48 PM »
global var name; for now.
I'll add global.x now, if that's what you're looking for.

1736
Announcements / Re: ENIGMA R4
« on: September 08, 2010, 03:08:07 PM »
I've updated ENIGMA.zip. Can someone confirm it fixes Java path issues?

1737
Announcements / Re: ENIGMA R4
« on: September 08, 2010, 07:06:45 AM »
Great, that's just what I need is the official MinGW installer failing me. What was the error?

1738
Announcements / Re: ENIGMA R4
« on: September 08, 2010, 06:20:08 AM »
Fair enough. Yeah, I think I'll head to bed now; let the community stir for a few hours. Wake up to five questions.

1739
Announcements / Re: ENIGMA R4
« on: September 08, 2010, 05:48:35 AM »
I see g++ compiler on that list...
Just install that, and you'll be fine.
If GDB isn't on there, so be it.

1740
Announcements / Re: ENIGMA R4
« on: September 08, 2010, 05:15:55 AM »
Polygone: Care to screenshot your list? They may be checked by default, or burried in the tree.