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

1441
Proposals / Re: ENIGMA Game Format
« on: January 29, 2011, 05:46:13 am »
Same as my plans for image formats. Each resource has a text file with the name and any other information that can be left text, and a reference to a binary file in the same directory. I don't have a problem with resources that would use only a binary file and a name simply having such info glued onto the beginning (we could standardize a format for that).

I won't defend YAML. Some of it is glued together. But it's much easier to parse than XML, and it's much easier to read and much harder to fuck up. Assuming INI is the format used in GNOME .desktop files, that is my secondary proposal.

Besides, I think that if the format is to earn the OGF extension, it should utilize a format that every language has a parser for, not just Python. So yeah, how's INI sound?

1442
Proposals / LateralGM extensions; official proposal
« on: January 28, 2011, 10:42:56 pm »
Once ENIGMA has its own format, it will finally be possible for it to include its own resources in outputted game files. That being the case, it is time, as Luis indicated earlier, that LGM offers a less painful method of defining custom resources.

Notice: I am in no way an expert on Java. I speak in this thread solely on authority of designing the C++ backend to potential extensions, which here is not much authority at all. My suggestions are to be taken not as a suggestion for the Java code behind the mechanism, but as the overall concept of the goals thereof.

That said, I think we should first define the goals simply in terms of what has been shown to be needed thus far (namely, by Luis's "Panes" extension proposal and my "Libraries" proposal which will conclude this message).

Before that, terms. For the purpose of this message (feel free to adopt them for your own), the following lexicons will be used:
"Loader" refers to the mechanism which will load extensions to the LateralGM interface.
"Extension" refers to a single unspecified object the Loader is loading.
"Component" refers to an interface element, such as a button or a graphic.
"Node" refers to a resource tree Component.
"MDI" refers to whatever the fuck that Java thing is that houses all the other editor windows.

  • The Loader must allow the addition of a Node or group of Nodes (represented by a folder) into the resource tree.
  • The Plugin must be informed when a tree Node under its control is double clicked. (original proposal said this job was the Loader's)
  • Each extension will be responsible for tracking its own data and creating its own UI elements in the passed MDI context.
  • Each Extension will be given the opportunity to save or load its data when the rest of the game is doing so.
  • Extensions will be given a method of identifying themselves as being instantiable in other resources
     
    • Take, for example, a 3D mesh resource. It would inherit from a class that can be assigned to a GM object as one assigns a sprite or mask.
    • An Extension that can be instantiated in room will be allowed to be placed multiple times, visually.
         
      • Such an Extension should provide a method to obtain bounding box information for placement and clipping, as well as a method to render itself in the room.
      • Extensions that can be instantiated in GM objects should provide a method of obtaining an iconic preview, as sprites do.
  • Extensions must be able to supply a unique ID and a C-structured or easily restructured dump of relevant data to the output executable. If the ID is not unique, backend plugins (Namely, ENIGMA) will be unable to determine what structure they are looking at, resulting in undefined behavior (like segfault). The data must obviously be easily structured per the C spec (like POD) so that ENIGMA can work with them.
  • A method must be provided of accessing any complicated UI Components to the Extensions (Namely, the JEdit class and the GML syntax highlighting context, which should be easily extended or swapped out in a specific JEdit instance). (original proposal said this job was the Loader's)

I have not decided how the C++ backend should be extended, aside from that it must share a list of extension IDs.

What I have decided on is a new resource that will be added, in addition to Panes. R4's introduction called for a resource dubbed "Whitespace" and renamed to "Definitions." Both names suck. I now propose that this be a tabbed, C-code resource, basically offering what simple C IDE's offer (tabs and a code editing pane with simple features).

This proposal is likely incomplete, but I have work tomorrow and should be sleeping. Comments welcome. Comments from Java programmers especially welcome.

1443
Proposals / ENIGMA Game Format
« on: January 28, 2011, 10:19:02 pm »
ENIGMA needs its own format for game storage. GM takes far too long to load and store some executables; I was thinking it would be best to use a format allowing for quick addition, subtraction, and modification of contained resources.

With that in mind, and with the interests of picking a format that works well with Java, I believe our best bet is to use ZIP.

Essentially, .ogf or .egm files would be a compressed directory containing a subdirectory for each resource, which would be in its own format. I was thinking that the format could be largely eYAML; for instance, a sprite would be given a file name reflecting its ID (sprite0000.ey), and would contain a name: and file: attribute indicating, of course, the actual name of the resource and the image file it contains. This way, the format would basically document itself.

Just as easily, however, individual resources could be kept in separate binary files with their own unique formats.

As an option, a manifest file could be kept, but I think it'd be nicer if users could open and manipulate the resources in any zip-capable file browser and text editor. ZIP also reduces the likelihood for total corruption, and there are many tools around which can repair damaged zip files. Plus, since ZIP is he medium of choice for Java, it is unlikely we will encounter such an issue if we are using Java's own ZIP functions for the same purpose.

Any other settings would be stored in the trunk of the Zip, along with the game information and other important metrics.

This concludes my proposal for the egm (ENIGMA) or ogf (Open Game-) format. If you believe you have a better idea, post it here, and I'll call you a trollwe'll have a reasonable debate.

1444
Proposals / Re: Static object variables
« on: January 28, 2011, 03:17:00 pm »
Frankly, I kind of like it better as ::, too. I'll see about supporting all three ( . -> and :: ) for their C++ purposes.

1445
Proposals / Re: do-until
« on: January 28, 2011, 02:10:12 pm »
...

1446
Function Peer Review / Re: move_towards_point
« on: January 28, 2011, 09:50:29 am »
Correct. Game Maker will complain, hence, ENIGMA is backwards-compatible.

1447
Proposals / Re: unable to parse (obj.variable) = value;
« on: January 28, 2011, 08:26:46 am »
Neither does C++. But C++ lets you do this:

Code: (C) [Select]
function() = script(); //GM doesn't have references
(double&)varname = 10; //GM doesnt have types
++varname = 12; //GM doesn't have ++
(expression1,expression2,varname) = 10; // GM doesn't allow coma separation in expressions
var + 1; // Error: Assignment operator expected
cout << 1; //Error: Assignment operator expected

So it became a question of how messed up I wanted to allow the syntax to be.

1448
Function Peer Review / Re: move_towards_point
« on: January 28, 2011, 08:21:07 am »
Indeed. I've managed to make variant work as fast as double, but double is still slower than int. Granted, they are hundreds (int thousands) of times faster than Game Maker, but best practice is to declare them. local int varname; will take care of all your woes.

You can stick a cast anywhere in an expression you like in ENIGMA. Just like ++, or !. Casts are just another unary operator.

1449
Announcements / Re: Happenings
« on: January 28, 2011, 08:15:02 am »
Yeah, I still need to run that, but I'm afraid it'll gripe that it's not privileged. I'll add that now.

1450
Proposals / Re: mask_index
« on: January 28, 2011, 12:54:53 am »
I only bothered to set it when Colligma was hooked up. It wouldn't have gone unnoticed for long if it was needed. And hell, Ism's capable of adding it, now. She's done so in the past.

1451
Function Peer Review / Re: move_towards_point
« on: January 28, 2011, 12:54:16 am »
with (obj) direction=dir, speed=spd; isn't worth porting, considering the corresponding C++ is completely different.

1452
Proposals / Re: Static object variables
« on: January 28, 2011, 12:52:43 am »
As it stands, ENIGMA uses . for all other access. A single dot will represent the correct choice of GM access (integer.variable), instance access (inst.member), or pointer access ((&inst)->member). I was considering having it resolve scopes as well, but it may require a special flag on results from the type resolver or before the call to it, depending on how I have it structured (An actual 'int' keyword should be distinguishable from an int variable).

1453
Proposals / Re: Multiple Theads, are they a possibillity?
« on: January 28, 2011, 12:48:07 am »
What I was thinking about doing is adding threading by the same mechanism that I can add instance deactivation. Basically, I would keep a new tree and shit for each thread (deactivated instances get placed in thread -1, which is never processed).

Threading an object would be as simple as saying instance_thread(inst,thread).
Users would be allowed to figure out for themselves that sometimes life isn't as easy as putting everything in its own thread and hoping depth and shit stay in order.

1454
Proposals / Re: unable to parse (obj.variable) = value;
« on: January 28, 2011, 12:44:45 am »
I was under the impression the syntax was strictly as follows:
Code: [Select]
(obj).variable = value;

If GM is suddenly allowing that sort of thing, I will remove all checks related to assignment operators. That will add compatibility with stream structures like cout, anyway.

1455
Function Peer Review / Re: move_contact functions optimised for bbox
« on: January 28, 2011, 12:41:44 am »
Someone verify that and then bug me or Ism about it.