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 - IsmAvatar

Ideas and Design / Replacing Plugin Workdir (and possibly LGM's)
« on: June 16, 2011, 08:09:02 pm »
This topic is mostly for RetroX, but other people are always welcome to contribute.

Currently Enigma's plugin to LateralGM, affectionally named The Plugin (written in Java by yours truly) has a WORKDIR variable which resolves to LGM's WORKDIR, which resolves to LGM's jar directory. The question is, why do we need the jar directory?

LGM uses WORKDIR for the following:
  • Finding Plugins
  • Finding DND Libraries (lib/lgl files)
  • For some reason, to populate from a file outside the jar, if one exists (probably for external override)

ENIGMA uses LGM's workdir for the following:
  • To populate Enigma's WORKDIR (EnigmaRunner.WORKDIR = LGM.WORKDIR, more or less).
  • To ensure that EnigmaUpdater knows that the program needs a restart when LGM is updated. (this could be replaced with a direct jar lookup)
  • For some reason, it calls `make` to build enigma, and then locates enigma dll, in this directory. Not sure why. Will try to replace with ENIGMA's workdir now.

ENIGMA uses its workdir for the following:
  • Not yet, but it should be used to call `make` to build enigma, and then locate the enigma dll, in this directory (see a couple lines up).
  • Finding the "Compilers" directory
  • Finding available API systems in "ENIGMAsystem/SHELL/"
  • Provide a directory for ENIGMA's dll to run system commands in (via callback), e.g. Exec()
  • Provide a directory for Subversion's Working Copy
  • Finding "settings.ey" - a temporary thing that Josh and I set up for the EnigmaSettings pane.
  • A directory to quicksave/quickload "definitions.h" (Can pretty much be scrapped, especially once the new file format is available)

Point is, the plugin does need to know ENIGMA's directory somehow, and in a cross-platform fashion. The simplest thing I could think up and implement at the time was "hmm, everything can just go in one program directory, so I'll just look at LGM.jar's directory". For some other directories that I can work with, consult Java.
Here is a listing of directories and other things that I can get using Java's "System.getProperty()" method, if it helps any, but please only use these directories in a cross-platform manner. For instance, do not assume that settings can be stored in `$user.home$/.lgm/` because that's a unix-only manner, and does not reflect for Windows (and probably doesn't for Mac either). Also, avoid trying to get the current Operating System as much as inhumanly possible - there will be a system that you did not account for.

java.class.path    Java class path
java.library.path    List of paths to search when loading libraries    Default temp file path
java.compiler    Name of JIT compiler to use
java.ext.dirs    Path of extension directory or directories
file.separator    File separator ("/" on UNIX) (not necessary, because new File(directory, child) handles this for us)
path.separator    Path separator (":" on UNIX)    User's account name
user.home    User's home directory
user.dir    User's current working directory

General ENIGMA / Re: Enigma Turkish Lang Pack %100
« on: June 11, 2011, 02:20:25 pm »

Off-Topic / MOVED: Enigma Turkish Lang Pack %100
« on: June 10, 2011, 03:51:24 pm »

General ENIGMA / Re: Enigma Turkish Lang Pack %100
« on: June 09, 2011, 12:10:49 pm »
Fede-lasse and Orkun:

Please see: section "Tagging/Comments".

You must do this before your translations can be included in the official LGM repository.

General ENIGMA / Re: Enigma Turkish Lang Pack %100
« on: June 08, 2011, 11:36:19 am »
How would an XML file be easier than a simple text file? A properties file is just a bunch of key= value pairs, a super-dumbed-down version of XML. It's the equivalent of ini if you remove all the domains and replace the keys with domain.key

We now have a wiki page documenting the process:

General ENIGMA / Re: Enigma Turkish Lang Pack %20
« on: June 07, 2011, 04:02:18 pm »
Translation (before user removed everything he wrote):

I have been working on a translation for LateralGM to Turkish (ISO 639: tr), and am now pretty much 100% done.
Replace lgm16b4.jar with this jar (see link in original post)

or copy this file:
into lgm16b4.jar location org/lateralgm/messages/

As of LateralGM r504 and ENIGMA r778, this translation file and a Danish translation file (courtesy of Fede-lasse) are included in LateralGM by default.

Note from IsmAvatar: When this translation file is complete, I will include it in the official lgm repository, and will distribute it with LGM builds (and enigma).
Note from IsmAvatar: LateralGM and Java have automatic locale support. If your locale is Turkey, it will search for a file named "" first, where "tr" is your ISO 639 language code, and "TR" is your ISO 3166 country code. For us US folks, it would first search for "". Failing to find that, it will omit the country code ("" or ""). Failing that, it omits the locale altogether, and reverts to "" (this is an oversimplification of the method, but it helps get the idea). The desired way to provide a locale/translation for LateralGM, then, is to copy "" into "" and then translate "". More on this at

(note, 5FYAVOXDXA)

Issues Help Desk / Re: MySQL - constant connection
« on: June 01, 2011, 03:18:22 pm »
It's not unusual for a language that interfaces with MySQL to reuse existing connections when you attempt to connect.
In php, calling mysql_connect() with the same information twice will return the same handle.

It is worth noting, however, that keeping a connection open for too long without querying will cause the connection to timeout. This is usually default of about 8 hours.

Generally, you should open a connection whenever an instance starts needing to access the database. I say instance, because you could have two instances running and they'd need to access the server simultaneously. It's inadvisable to try this multi-instance approach with only 1 super-global connection.

Beyond that, I'm not sure of the overhead of opening and closing a connection. You might want to ask on a mysql forum or forum of the language of your choice.

Off-Topic / Re: G-creator forum?
« on: May 30, 2011, 11:33:39 pm »
I believe the G-Creator project pretty much died, so I'm not sure what kind of interest you have in it. The two main functions of G-Creator at this point are:
1) Historical. It's nice to know the history of projects that tried and died. Plus, there's some features G-Creator tried to do that we might try out for other projects that are still alive.
2) Possible small-time extensions into LateralGM. I think TGMG was carrying out some sort of small project that would hook up with LateralGM, although I forget what its primary function was. He became too busy to continue for a while, so he may pick it up again some day or he may quit again.

Off-Topic / Re: Introductions
« on: May 26, 2011, 08:41:12 pm »
Death2DBZ: I'm not buying it :รพ

Issues Help Desk / Re: Loading Error: Cannot Open My Game!
« on: May 24, 2011, 01:00:31 am »
Next time make backups.

Announcements / Re: Judgement Day Update
« on: May 23, 2011, 12:30:06 pm »
Catch the clown worked fine for me, and it includes 2 sprites. If it doesn't work for you, open a thread at the help desk or ask on the IRC.

Announcements / Re: Judgement Day Update
« on: May 22, 2011, 03:07:48 pm »
Harri, stick to your own topic.

Fede: Sounds like a Stephen Hawking sound-byte.

Announcements / Re: Judgement Day Update
« on: May 21, 2011, 11:10:59 pm »
Wouldn't you believe it, apparently there was a mixup and I wasn't supposed to ascend with everyone else for some reason. Fornication or some such like that, I didn't really understand what he was saying because I didn't have EnigmaBot and the !define function there with me, but anyways, he sent me back down, so I guess I can resume work on enigma after all.

At any rate, after testing on windows, I got:
Code: [Select]
+++++Make completed successfully.++++++++++++++++++++++++++++++++++++
Compiled game is clearly not a working module; cannot continue
Built to C:/Users/IsmAvatar/enigma-dev/[Temp files]
mingw32-make[1]: Leaving directory `c:/Users/IsmAvatar/enigma-dev/ENIGMAsystem/SHELL'

I deleted Windows/gcc.ey and let it regenerate, since it's doing it wrong. Let's see how that goes. If that doesn't work, I'll find out what's wrong.

Update: Regeneration corrected the [Temp files] reference. Testing catch-the-clown.

Code: [Select]
+++++Make completed successfully.++++++++++++++++++++++++++++++++++++
Compiled game is clearly not a working module; cannot continue

Contents of gcc.ey are not up to spec1, indicating "$tempfiles" where spec1 specifies that you must use "$tempfile". Fixing now and retrying.

Fixed. Catch-the-clown works on Windows with r756.

Announcements / Judgement Day Update
« on: May 21, 2011, 01:34:19 pm »
The time is currently 14:30 EST, GMT -5 for myself and Josh, giving us another 3.5 hours to finish up enigma before fire and brimstone hits. Unfortunately we've lost TGMG, as it's currently 19:30 over there, presumably he ascended, which means that we'll have to make due without the Android port, since he was never able to get OpenGLES to work.
Josh is currently working on something about macros while he waits for the religious folks to fly into the sky giving him a much needed chance to loot and orgy until he gets struck by some act of god or October 21st, when God pulls the plug completely. I'm of course atoning for my sins and spending my last couple of hours with my family. I'm happy with the state of LGM right now, and think ENIGMA should be able to continue over the next several months without continuing improvements to it.

Off-Topic / Re: Hey, IsmAvatar
« on: May 21, 2011, 11:38:31 am »
Shh, we've made the channel rapture-exclusive.