Menu

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.

Show posts Menu

Topics - Josh @ Dreamland

#1
Announcements / Back online, new hardware
August 16, 2021, 12:28:04 AM
Everything's upgraded to PHP 7 and we're on a new Debian instance. I think everything's working now.

I should probably advise everyone to reset their password here and anywhere else you've used the same one.  Please don't re-use passwords, ever.  Sorry again for the inconvenience.

I'm hoping to migrate the forums and Wiki to use GitHub auth soon.
#2
Announcements / Regression Testers Wanted
February 22, 2020, 07:43:20 PM
Hi folks,

We're looking to merge #1875 (New Events) into master. We've tested it pretty thoroughly, but there's still a chance it will break something; this recodes a huge chunk of the event system. We will be merging it into the EGM feature branch today, and expect it to hit master on or before the completion of EGM.

If you have time, and would not mind testing this change out, please issue git checkout NewEvents and give the system a go.

Please report any issues either in this thread or on the pull request page on GitHub. If no one says anything before EGM is complete, these changes will be merged and we'll deal with the fallout, then.

Cheers
#3
Announcements / Taking on Xinerama dependency on Linux
February 16, 2020, 01:57:53 AM
Hello again, I've returned to regale you with another enchanting tale of how you need to install another dependency.

In order to properly support multiple monitors on X11, we need input from Xinerama. Please install libxinerama-dev on Debian systems and libxinerama on everything else.

For Windows users, no action is required.
#4
Hi folks,

This is a quick heads-up that we're in the process of switching our YAML parsing over to yaml-cpp instead of doing the reader in-house. This has been coming for a while, so you probably already have yaml-cpp installed. If not, please run install the yaml-cpp package using your favorite package manager.

Windows users: pacboy -S yaml-cpp
Ubuntu/Debian users: sudo apt-get install libyaml-cpp-dev
Arch Linux users: sudo pacman -Sy yaml-cpp
RPM users: yum install yaml-cpp

This change is to help push along a new event system (#1875) that will ease the transition to EGM format as we begin to switch to RadialGM.

Cheers
#5
Announcements / Infrastructual Changes
January 14, 2018, 04:50:21 PM
Hi all,

I have some happy news to share regarding some changes to the ENIGMA codebase. Cheeseboy, Robert, and I have been making some relatively big changes to the infrastructure of this project, lately. You (I hope) haven't noticed so far, because these changes are mostly internal cleanup, code health, and productivity changes. Since we fixed the Travis-CI build a few months ago, Robert has added an AppVeyor build. With the new assurance that a change will not break other platforms, we have been cleaning up the codebase and moving things around. We have had minor regressions, which is why I'm in the process of writing a regression test suite on top of our build tests. But for the first time in this project's history, all contributors are submitting code to branches instead of directly to Master. Our build has been green since we fixed it a few months ago. This is huge news for us, but doesn't directly affect users.

The downside is, of course, the minor regressions. And we're about to have much bigger changes.

What you need to know:
Some dependencies will be added to the project. We are going to stop baking GLEW into our source, for example. LateralGM will also be updated. We will provide instructions on how to obtain the latest dependencies when that time comes. I expect us to just ship a new portable zip that everyone will need to update to.

A more comprehensive list of changes:

  • In the coming weeks, we plan to completely change the way LateralGM (and other IDEs) communicate your game data to ENIGMA. We will use a flatbuf-based system instead of EnigmaStruct, which will be removed.
  • As I mentioned, Cheeseboy has removed the GLEW source from our source tree. You will soon need to obtain it yourself (probably by downloading a new portable zip). Advanced users can install it through MSys on their own.
  • ENIGMA now writes a .desktop file on Linux alongside built games. This serves as a launcher for the game, and enables users to more easily set their own game icon.
#6
Announcements / I'll be upgrading CentOS today.
October 15, 2017, 06:26:49 PM
Expect the forum to enter maintenance mode. You will be unable to post for some window of time during this migration.

Do not be surprised when this happens. I will only activate maintenance mode during the database migration. This should last something like half an hour—The export will take fifteen minutes, but migrating the ENIGMA DNS to point to our new IP will take longer. I'm going to see if I can change the assigned IP over instead of updating DNS records. I will keep this thread up to date.
#7
Announcements / We SSL now
February 12, 2015, 02:09:40 AM
I recommend using our shiny new SSL connection for signing into the forums from here on out. I will look for a way to enable this by default.

We don't want the default forum browsing to be secured, though, as you will just receive warnings that the content users post (images, avatars, etc) will be from third-party sites.

However, I made some arrangements, and these domains and the certificate are now paid through 2020. The website, however, is not. Right now I have launched an IRC bot, which the host said was okay despite the terms of our VPS lease. I will continue to renew this VPS as long as they allow both of these to run. I will also be, at some point in the next century, setting up a build bot here. If at any point this becomes "too much load" for our VPS, we will be moving to a dedicated server.

Cheers
#8
Announcements / Google Summer of Code
February 07, 2015, 04:56:23 PM
Hello, everyone; long time, no see.

Google Summer of Code signups are around the corner. Are we, as a group, interested in participating? I am considering sponsoring either ENIGMA or NaturalGM, or even both, depending on which project is able to generate an workable list of tasks for contributors.

The problem with ENIGMA's participation is that its contributor base is already mostly college-level help, so the majority of tasks that would be easy to delegate to new help are already completed, while the remaining work requires more skill and background info on what ENIGMA is and what it is supposed to be.

That said, looking over the wiki page from last year, some of the workpoints seem nearly feasible. The problem is that no one has started any of them. If we want help, we have to be serious about having room for participants to actually contribute code. We can't be allocated a new contributor and expect them to figure out what ENIGMA is and just start tacking entire new systems on. Work points such as "Implementation of an Asynchronous Networking System" are entirely too much work for someone who is unfamiliar with the project. Does the Network_Systems folder even work like the other systems folders? How will a new contributor even know they are on the right track?

If we are to participate, we need tasks that begin with ten lines of code and end with implementing an entire system. There needs to be room for a contributor to start small and grow in the project. I can't endorse ENIGMA with such course-grain tasks. This is the reason I stayed out of the GSoC planning last year, and if we can't generate a better task list this year, we'll hit the same fate.

We can improve the "Implementation of an Asynchronous Networking System" task by creating a reference list of what we actually expect this system to look like, and offering an example game which, given these functions, should be able to be played over a network. We can't expect a new contributor to write the game that tests his or her new functions. That's way too much work for someone who has never heard of the project.

Related: Do we even have a simple dev wishlist, anymore? I occasionally hear about X huge thing that is completely broken and everyone has been working around, but I have essentially no idea what people want to see out of this project right now, aside from a new compiler. It seems to me that we have no little tasks; the project is waiting on someone to "just go through and fix everything." Does anyone care to prove me wrong?

To be brief, if we want to participate in GSoC, we have to make sure we have tasks that are actually suited to someone who has never heard of the project. Otherwise, I guess we can sit this one out.
#9
Developing ENIGMA / EGM Migration
September 21, 2014, 09:18:25 PM
I'm going to spend the rest of today getting the plugin building on my current dev machine. Ism gave the green light last week for a backwards-incompatible change to the EGM format, and then volunteered to handle backporting in the form of converters. Maybe that's okay for now, but I want to avoid another incarnation of the problem to avoid wearing Ism out, at very least. It's sad; even GMX is writing plain-text for its rooms and objects; we have some catchup to do.
#10
Developing ENIGMA / Change
September 20, 2014, 08:22:29 PM
While it seems that the massive changes that were flooding in over the summer have wound down (to a degree), I am still skeptical of this, and so I am changing my compiler-related plans to accommodate all the contributions that rolled in over the summer, as well as any new ones.

There are a couple changes I started rolling out in the other compiler branch that are becoming harder and harder to merge in as changes continue to be made upstream.

I was in the process of gutting the extension system and the relevant compiler chunks to try to splice in a hook system (see my notes on the Wiki from years ago) when I realized that the warnings I corrected in the compiler were starting to trickle back in, and that (on a very related note) Robert made an absolute war zone of write_object_data.cpp trying to add support for inheritance. I stepped back to address that, and realized that the best move is for me to make all of my non-parser compiler changes in master and naively hope that they propagate painlessly, which has been the development policy for a while, now.

In other words, gentlemen, it's Josh's turn to break things carelessly. I know it isn't ideal, but I've been too reserved about these changes in the past. I have merged enigma-dev/#819 after its (minor) review, as it seems not to seriously break anything important. If I can get you guys to stay on top of my future pull requests, we can probably make it through this next week without anything serious failing. I will exercise the maximum amount of diligence possible given our lack of a regression test suite, which I will probably begin to set up while I'm at it (see my current implementation here).

You will see my first commit sometime tonight or tomorrow. It will do three things, listed here in order of increasing impact:

  • Fix the warnings in module_write_fonts.cpp and small warnings elsewhere
  • Separate write_object_data.cpp into multiple helper functions and recode as needed to make non-hideous
  • Move ALL C++ codegen and module export logic into a new class, compile_context. This has already been done in the compiler branch.

The purpose of the move is so we don't have contention on globals in the event that we need to run two compiles or two parses. This is less important than the smaller, more-intricate move which will be made in the commit after that one, which will move all logic involving interaction with the parse system into helper functions. This includes the following:

  • All logic which directly requests the parsing of code.
  • All logic which requests information about user-defined variables.
  • All logic which attempts to reflect or coerce type information or code metrics.

The connecting factor, of course, is that the parser is somehow involved in all of those operations. The connecting symptom is that ENIGMA sucks at all of those operations. The reason for this move, therefore, is to make it so that once this is all said and done, the new parser will be a drop-in replacement for the old. My original approach was to do the replacement in a branch where I would not have to touch the old logic, but that's just not going to cut it for the reasons I've already hinted at.

I am going to finish mincing write_object_data.cpp, now.

TL;DR: Keep an eye out for my future pull requests. Please check them for breaking changes as they roll out.
#11
Developing ENIGMA / EnigmaFileFunctions repo
July 05, 2014, 07:07:37 PM
I realize that Robert has been trying to implement a CLI, but this has been on my plate for a while. In fact, when I heard of his intentions, I published a repository I'd started to GitHub for reading files and general file processing groundwork. This includes a UTF8 implementation of std::string (still in progress) and a class for iterating files. Right now, the file iteration class supports zip iteration and filesystem iteration, but it has only been implemented on Linux. The zip iteration should work directly on Windows, provided someone can install libzip in MinGW. Today I coded what should resemble the Windows implementation. I have left it commented since it is not tested.

I meant this procedure to be for Robert, but he seemed generally uninterested in the prospect. I would appreciate it if a Windows developer would do the following:

  • Check out the EnigmaFileFunctions repository
  • Open gdir.cpp and seek to the unimplemented functions.
  • Uncomment my implementation and fix any issues, or write your own implementation. Just get it to build.
  • Run the tests I wrote.

    • In Code::Blocks, this is as simple as switching to the "Test" target and running
    • If you have GNU make, you can run [snip]make test[/snip] to test
  • If the tests don't pass, tweak the code and rerun them.
  • Once all tests pass, drop me a pull request.
That's the contribution model ENIGMA should arguably be on, and it's the contribution model I'll be sticking to. If no one can deal with that, I suppose I'll continue development at my own pace.

All tests currently pass on Linux. If any tests other than the directory test you're working on/looking at fail on Windows, please let me know.
#12
Announcements / Licensing, the ultimatum
May 31, 2014, 04:45:32 PM
I'm going to attempt once more to contact a third party for help with this licensing fiasco. I'm going to give everyone an opportunity to weigh in on what I'm sending before I send it; this is our official request for help.

I have sent a very similar letter to this one in the past, but I fear it did not adequately convey our issue, based on the response I received. Here is the text that will be sent this time:

QuoteGreetings,

I am writing on behalf of all contributing members of the ENIGMA Development Environment (http://enigma-dev.org/ , https://github.com/enigma-dev/). We maintain a free-software game development platform designed to simplify creation of various games while offering sufficient features to create games of any size.

Heretofore, all of the code in our project, including that in the game engine, has been GPL-licensed. Now, while our developer base is still relatively small, we are discussing a means by which our users could have more license freedom in the games they create. As our tools not only link against the GPL game engine code we provide, but in fact integrate segments of GPL code into their game code directly, all of our users are presently bound by the terms of the GPL, and so cannot release a closed-source version of their games.

What our team is looking for is a means of allowing our users to close-source their games in a way that no contributors biding by our license can take legal action against them, but to ensure that in all other cases, linking against our code causes the resulting module to use our license.

What we do not want is to become the next WINE vs CrossOver Office; that is, we do not want someone to exploit our license to maintain a closed-source version of our engine with exceptional improvements. If someone improves our engine, we want to be able to pull in those improvements, or at very least see how they did it and mimic.

The mantra of this operation is "Prohibit ENIGMA forks which prohibit ENIGMA forks." This "prohibiting" is supposed to be done by enforcing the full terms of the GNU General Public License. In short, we want the terms of the GPL to apply, but to allow users to choose their own license for their own games created in the engine.

The immediately obvious answer to our problem is to select a license such as the Mozilla Public License, which seems to allow just that. The issue is, this license would allow a third party to extend ENIGMA using their own proprietary code, which could then draw users away from ENIGMA, and get them hooked on these closed-source additions. We therefore want extensions to ENIGMA itself to be covered by this license/exception or by plain GPL, to ensure it remains free for everyone.

The crux of the problem is that the only time we do not want the GPL to apply is when a user actually releases a game made in this engine.

That said, which license/exceptions could we use? Would there be merit in a custom exception?

Thanks much,
Josh Ventura

If this request fails, I will embrace the MPL or a similar license for the sake of forward progress.
#13
Announcements / Heartbleed
April 11, 2014, 11:23:25 PM
tl;dr: we run CentOS 5; our software is so out-of-date, we are not affected by Heartbleed. Of course, you probably don't connect to us via SSL, anyway.

Heartbleed is an OpenSSL exploit that enables hackers to listen in on what should be secured connections. It's a terrible vulnerability that can lead to the leak of all sorts of sensitive information; in our case, passwords. Since most users connect over HTTP and are probably therefore not using a very secure password, this isn't an issue for most of our users. For those who do connect to us over HTTPS, you're safe, anyway, because the vulnerability is with a newer OpenSSL than we'll ever have. This has a number of downsides, but the upside is, we didn't even have to patch for this exploit. So your HTTPS passwords have been safe, and our SSH connections have been safe.

And to clarify, yes, I am still alive; I haven't lived for ten consecutive days in the same state for almost the last month, now, but I am finishing getting moved into my current apartment where I am now holding a job at Google. That said, afternoons and weekends are mine unless I break something.
#14
Developing ENIGMA / Stateful Functions
March 28, 2014, 02:49:23 PM
ENIGMA (Specifically EDL) is full of stateful functions: functions which operate based on a global state. Obvious examples include file_find_first/file_find_next. It also contains functions which operate on resources not owned by ENIGMA. Examples of these include file_bin_open, surface_create, and the list goes on. Still more functions change the overall game state in ways that are conducive to leaks, such as ds_list_create, ds_map_create, ds_grid_create, sprite_add, sound_add, background_add...

You might have figured it out by now, but these functions all have one thing in common: they don't agree with game_save. In Game Maker, game_save and game_load can dump all state information and re-load it in a matter of milliseconds. But this excludes work done by the functions above (or at least the majority of them). I can have ENIGMA generate state dumps for objects, but I can't have it generate them for all functions. Least of all surface_create.

This is problematic because game_save is a fantastic placeholder for custom save mechanisms, and its emulator-like dumping is great for debugging. In fact, that's the major reason I am interested in it right now. Rusky and I were discussing a crackpot lunatic's great idea for game debugging, and for some reason, I'm dumb enough to want to give integrating it into ENIGMA a try. But I can't do that (despite Rusky's insistence otherwise) without a working game_save/game_load.

The easiest way I can devise to handle the situation is to create a namespace for state restoration functions. So in the header that declares file_find_first, you'd see something like this:
Code (cpp) Select
string file_find_first(string pattern, int attr);
namespace enigma {
  namespace dump_state { vector<char> file_find(); }
  namespace load_state { size_t file_find(char*); }
}


The compiler would then include a call to everything in enigma::dump_state in game_save, and a call to everything in enigma::load_state in game_load.
The call to dump_state::*() returns a vector of bytes to write to the save file. The call to load_state::*() accepts a pointer to file content (ideally memory-mapped), reads in the state information in its own dump format, and then returns the number of bytes read. Thus, it's critical that each function write only what it will read and reads everything it might have written. Otherwise, it will ruin all the other state loads.


Now, in the case of file_find_*, it's pretty easy to dump the current filename and just iterate back to it. But in the case of surface_create, dumping all the surfaces to a file might be a large, cumbersome task that a user would want to disable. And in the case of sprite_add, keeping track of all added sprites is more code than some users will want in their game. That said, I think it would be frugal to make sure this logging code can also be toggled off, with a preprocessor. Later on, I'm not opposed to a Game Load event.


With a little luck, game_save will be powerful enough to do what I am planning. If not, we may need to use some more preprocessors and include code to keep track of state changes in a more minimal fashion. I'll worry about that later. For now, game_save is something isolated enough to be concerned with.
#15
Developing ENIGMA / Changes in the new compiler
February 25, 2014, 01:36:47 AM
I never make changelogs; this is a personal mistake I'll attempt to work on. I am using this thread to document notes for developers and changes to the new compiler framework. I will place these changes in the Wiki after the fact. Excuse the Wiki list notation in the meantime; there's no sense in my formatting it with SMF's syntax if it's just going to be * in the end.

Notes:
* Files in the CompilerSource/JDI folder are meant to be read-only. This is a verbatim copy of the JDI repository; please make any changes there. We might end up renaming this to JDI-read-only to comply with the precedent set by other projects.

Changes:
* EnigmaStruct is no longer the main argument to compiler functions; it has been wrapped in a new class, compile_context.
** This class also contains the global object parsed_object *EGMglobal; the other parameter to most compile routines.
** This class also contains FILE *gameModule, the other parameter passed to most resource writing routines.
* There is now a separate resource_writer class to handle—you guessed it—writing resources. This is not only so we can support multiple languages, but also so we can support multiple resource export schemes (eg, internal, external). This is generated by the compile() method of the corresponding language adapter.
* Compile functions are now all snake_case, not some_SnakeCamel_Bastardization

Changing:
* The way JDI interfaces lexers and contexts needs changed—these are independent concepts.
#16
Developing ENIGMA / JDI NewTemplates branch
February 19, 2014, 03:51:53 PM
Hi people,

I'm going to stop playing with blocks today and try to get this last JDI error fixed, at which point ENIGMA's engine will parse without error on Linux. I was going to boot up Windows and test it, but then I realized I don't feel like doing that at all. Plus, if I have people do this, I can test on multiple systems.

I'm going to assume that the preprocessor works without error, and so for the purpose of cross-platform testing, supplement GCC's. What I need from you is to do the following:

1. Open a terminal.
2. cd to your ENIGMA folder.
3. [snip]cd ENIGMAsystem/SHELL[/snip]
3. [snip]g++ -E SHELLmain.cpp <YOUR COMMAND LINE BUILD PARAMETERS, AS PRINTED IN LGM> -o preprocessed.cpp[/snip]
4. Upload preprocessed.cpp here as an attachment, or to dropbox, or if it's small enough (which is unlikely considering you people won't stop including STL headers from main), pastebin it.
5. Link me if necessary.

This will allow me to test JDI on arbitrary machines without booting or having access to any of them. The only thing that won't be tested this way is the preprocessor, which, as I said, should be working fine.

When this is done I'm going to go ahead and merge NewTemplates into master, at which point I will recommend integration into ENIGMA, but I will not advocate it or otherwise facilitate it, as it means writing the new compiler around it can finally happen.

I am particularly looking for a Windows dump, but any platform is welcome—the more, the merrier.

Cheers
#17
General ENIGMA / HTML5 based IDE
January 20, 2014, 05:26:29 PM
I've never interfaced node.js with anything, personally (though I have linked V8 with things). It would be ideal to interface ENIGMA with it as a shared library, as it makes syntax checking faster and allows the compiler to keep relevant information in memory. A JavaScript IDE does exhibit a lot of promise—as I mentioned, there are already great code editing and image editing tools available in HTML5. I suppose the ENIGMA/node interface could be put off until the IDE actually worked, but I wouldn't run with this idea without involving some C++ code.

That said, your new biggest concern is speed. That code editor can get laggy on single big files. People will want to have multiple code files open at any given time... it can get messy. It's too bad there's no <html:use> similar to <svg:use>; another big emerging topic is the ability to have the same file open in multiple windows/tabs, and edit it concurrently. That tag is perfect for such occasions.

At this juncture, it might be best to split this topic. The requirements and ideals of this IDE project are larger than the entire rest of the contest; it should probably get its own thread.
#18
General ENIGMA / Linking Exception Draft
January 19, 2014, 11:29:05 PM
A recent troll brought up that we still haven't taken care of this, so it's about time we do so. This is the first draft of the linking exception I expect us to start incorporating into the engine.

DO NOT include this in anything right now. It is not only a bad idea for you to do so, it is probably illegal for you to do so.

The purpose of this topic is to discuss the terms of the license before I ask third parties who know more about this than I do to review the exception and provide more professional feedback.

Quote
The ENIGMA Linking Exception

Preamble

The purpose of this exception is to allow the ENIGMA project to maintain the
freedoms ensured by the GNU General Public License while granting users the
additional freedom of choosing a separate license for their own code.

This exception does not grant the ability to relicense the code in this
engine, except by optionally removing this exception, leaving the standard
GNU General Public License enforced.

This exception is wordy, but is meant to remove the threat of tactics such
as Embrace, Extend, Extinguish. The point of this exception is to encourage
Embracement and Extension, but in a way that keeps the extensions free and
so eliminates the threat of extinguishment.

This exception, in essence, grants users the ability to use the engine, but
not to modify it or extend it in a nontrivial manner without remaining free.


Terms

"GPL" refers to the GNU General Public License, as published by the Free
      Software Foundation, version 3, or any later version.

"GPL Code" refers to code covered by the GPL.

"Non-GPL Code" refers to code not covered by the GPL.


Exception Text

Linking this library statically or dynamically with other modules is making
a combined work based on this library. Thus, the terms and conditions of the
GNU General Public License cover the whole combination.

As a special exception, the copyright holders of this library give You the
additional right to link the unmodified code of this Program with code not
covered under the GNU General Public License ("Non-GPL Code") and to
distribute linked combinations including the two, subject to the following
limitations:

   1. Non-GPL Code permitted under this exception must only link to the
      UNMODIFIED code of this Program through those well-defined interfaces
      identified as "Approved Interfaces".
     
   2. You are not required to advertise publicly your use of the UNMODIFIED
      ENIGMA engine. However, if source code is requested, you must provide
      some means of obtaining the original ENIGMA source code covered by this
      exception. You may not deny the use of ENIGMA nor withold the version
      number used. Note, again, that this license does not and cannot grant
      your ability to withold your use of other GPL Code.
     
   3. Non-GPL Code permitted under this exception may link to MODIFIED code
      from this program through those well-defined interfaces identified as
      "Approved Interfaces", provided that the modified code retain both the
      original license AND this exception, without modification, and that at
      least one of the following criteria are met:
     
      i.   Every copy of the combined work is accompanied by a written
           statement that details to the recipient the version of ENIGMA
           used and an offer by yourself to provide the ENIGMA source code
           should the recipient request it.
           
      ii.  Details of your modifications and all code are made available
           for integration with the code released by the copyright holders,
           publicly or otherwise.
     
   4. The combined work is not itself a general purpose game framework, game
      engine, or related product. In such a case, this exception does not
      apply and may not be preserved: all code is to be considered GPL.
     
   5. The combined work is not itself a binary library intended for linking
      into other software applications. In such a case, this exception does
      not apply and may not be preserved: all code is to be considered GPL.


Approved Interfaces

Subject to the limitations from the previous section,

1. The files of Non-GPL Code may include the ENIGMA distribution header files
   which explicitly grant this exception in their license.

2. The files of Non-GPL Code may link to the ENIGMA distribution source files
   which explicitly grant this exception, provided the following criteria are
   ALL met:
   
   i. Code not included with the UNMODIFIED ENIGMA distribution must access
      only data included within the unmodified ENIGMA distribution which are
      contained in the namespace "enigma_user" in order to be covered by
      this exception.
 
  ii. Code not included with the UNMODIFIED ENIGMA distribution may not
      include fixes for bugs or misbehaviors in the engine, except where
      these changes are considered as modifications to the original source
      and are subject accordingly to all terms of this exception (ie, where
      this license and exception are upheld in the new code, and the new code
      complies fully with this exception).

iii. The files of GPL Code covered by this exception, modified or otherwise,
      MAY NOT link to Non-GPL Code. That is, even if code not covered by the
      GPL may otherwise link to code that is covered by the GPL according to
      this exception, for this to be allowed, the GPL Code may not depend on
      any Non-GPL Code. It may, however, depend on GPL Code which is not
      covered by this exception.


Redistribution with this exception

Only the copyright holders of each concerned file the ENIGMA engine may make
changes or additions to this exception, including the limitations and list of
Approved Interfaces. This exception may not be modified without the consent
of all of the covered file(s)' copyright holders.

When redistributing code covered by this exception, you may opt to exclude
the exception in your release. You are FORBIDDEN to include the exception in
the event that you have modified the contents of the "enigma_user" namespace
in such a way that allows additional access to variables outside of namespace
"enigma_user" by Non-GPL Code. To be explicit, all code manipulating data
internal to ENIGMA must be GPL-licensed, with or without this exception.


You must obey the GNU General Public License in all respects for all of the
Program code and other code used in conjunction with the Program except the
Non-GPL Code covered by this exception.
#19
Developing ENIGMA / Style guidelines
January 19, 2014, 11:00:06 PM
New developers and old developers alike: I've noticed some bullshit happening in the engine. Specifically, one of the region_ functions is returning a variant. Don't do that.

I've started a page of basic guidelines on the wiki. Read it there, discuss here.
#21
Off-Topic / I'm out
December 18, 2013, 10:06:09 AM
I just graduated college. This means that for the first time in ages, I'm about to have some free time. However, I have decided I won't be doing that. Since my return, all I have gotten out of this community, primarily over IRC, is constant nagging about all the shit everyone needs from me. This includes updates to a bot that was broken eight months ago, the remaining EDC renovations Ism and I started months ago, which no one has touched since, the build system Fuckwit decided to obliterate, and the graphics system Robert started blenderizing. And after endless little tasks, I told them to back off—specifically, to shut up and leave me the fuck alone. What happened instead was a continuation of the relentless onslaught of me being called worthless, and frankly, I'm fed up.

So rather than devote my newly discovered free time to this project, I'm going to invest it in my more interesting ideas. I sort of miss the feeling of freedom I had when I was younger, to work on what I please. Knowing exactly what needs done to a system of this size deprives you of that.

TL;DR: A lack of motivation on all fronts coupled with the endless nagging of people I'm frankly sick of hearing from, topped off with Ism's informal resignation, has led me to present my own informal resignation.

I'll come back when either Ism and forthevin are back around, or I receive a formal letter of "eating shit" from Fuckwit. This will be after he realizes that a compiler isn't just a parser.

Seeing as I've left for a few solid months in the past without too much repercussion, you probably won't miss me very quickly. Just don't expect a sudden hike in bug fixes.

Ciao for now.
#22
General ENIGMA / Delusions of Grandeur
August 02, 2013, 01:40:05 AM
I spent the day migrating important chunks of the website's code to GitHub. This was largely for my own reasons (now I don't have to be afraid to edit files), but it's also for other members and potential web contributors to examine. This sparked as a result of my updating SMF to 2.0.4; we're on new software. The old version was becoming a liability due to exploits, etc.

So. You can find the source for the two bots here. You'll find the source to the SMF themes we use here. The source to the EDC (the least finished of all of these) is here.

I have not yet uploaded the source to the remainder of the site. I might get around to that tomorrow.

The biggest issue seems to be integrating the new SMF themes. In addition to being incomplete (I can't find the QuickEdit button), they break the EDC.
#23
Proposals / Compile Scripts
July 16, 2013, 12:42:59 PM
A lot of what other toolkits have going for them is the capability of reflection. RTTI is useful; ENIGMA already has it to some extent by virtue of having object_index. While further reflection is, to some extent, planned, I do not want it to be a heavy emphasis in the engine.

I notice that a lot of what people try to do with reflection should have been done by their environment at compile time. Like listing classes that have <x>, or do <y>. The compiler does shitloads of this while compiling games; without proper compile-time reflection, there would be no way to translate EDL to C++. The issue is, the compiler's behavior is really static, and the compiler is the only entity with this capability.

Thus, I'm considering a mechanism I'm calling compile scripts. In this context, they are scripts of EDL run by the compiler which offer full reflection of all game entities. Scripts, objects, rooms, paths, timelines... If it's in the game, you can iterate it with the compiler. Having this mechanism would allow users to define functions which would otherwise require runtime reflection, but generally should not. Game Maker, for the part, provides a lot of functions to offer reflection in a somewhat efficient manner. For example, sprite_get_name(). What it lacks is a sprite_get_first() and sprite_get_next(). I am not proposing we add those directly. While they might be convenient for some games, they just waste space in others. I'm proposing a system that would allow users to define them.

Code (EDL) Select

global map item_sprites = [];
foreach (sprites as sprite) {
  if (sprite.name.starts_with("spr_item_")) {
    item_sprites.define(sprite.name, sprite.id);
  }
}


Coupled with JDI, EDL's AST incorporates everything that is required to interpret that code, except the string and map object representations, which should be easy. Meanwhile, behind the scenes,

Code (CPP) Select

  jdi::value cs_map_define(cs_map* cs_this, jdi::AST_Node_Parameters *anp, jdi::error_handler *herr) {
    if (anp.params.length() != 2)
      return (herr->error("Expected two parameters to map::define"), value());
    cs_this->definitions.push_back(value_pair(anp->params[0].eval(), anp->params[1].eval()));
  }
  compile_scripts::objects["map"].functions["define"] = cs_map_define;


The above code is approximate, as it doesn't bail on the first error, and assumes that cs_this can be cs_map rather than a generic cs_object.

In other words, the define() operation only adds a key to be defined to some vector in the map object; the actual work is done elsewhere.

  • At syntax check time, it is up to ENIGMA to define that item_sprites is a global variable, if it is intended to be used in user code. If it is only intended to be used in library code, eg, in our definitions resource, we leave it out of our syntax checking definitions. I think this would be the preferable behavior.
  • At compile time, the cs_map object is asked to generate code to ensure that the item_sprites object is what the library implementer thinks it is.

So, in the C++ module, the map object does this:

Code (CPP) Select

  string obj_map_cpp::get_code() {
    string res;
    for (value_pair_vector::iterator it = definitions.begin(); it != definitions.end(); ++it)
      res += "    item_sprites[" + it->second->first.toString() + "] = " + it->second->second.toString() + ";\n";
    return res;
  }


In the javascript model, it does this:
Code (CPP) Select

  string obj_map_cpp::get_code() {
    string res = "    item_sprites = {\n";
    for (value_pair_vector::iterator it = definitions.begin(); it != definitions.end(); ++it)
      res += "      \"" + it->second->first.toString() + "\" : " + it->second->second.toString() + ",\n";
    return res + "    }\n";
  }


Optimizations will be made in the C++ version to ensure that all keys have the same type (all VT_INTEGER or VT_DOUBLE, or all VT_STRING), and the correct jdi::value cast will be used. This is because all keys are string in JavaScript, and the benefit of ensured compatibility outweighs the benefit of letting users mix types in a map. Use two maps.

That said, to implement such a compiler extension, the user will give something similar to the pseudo-EDL above, coupled with a regular Definitions resource which can use its results. The pseudo-EDL is the compile script, and is interpreted by the compiler. The Definitions resource is a script which defines functions run during the game.

Speaking of the Definitions resource: I want Definitions to allow scripting in each native language, as well as in EDL. It is looking as though EDL could easily be made to compile to any of the even vaguely planned backend languages, some of which might lead to it being a popular prototyping language outside the game design space. EDL could be a "write-once, compile in any of the languages that claim to be write-once, compile anywhere" language, which would make it even more useful to the sort of people who use GML for quick prototyping.

So, an example Definitions resource to go with the above psuedo-code would be this:

Code (CPP) Select

int item_get_sprite(string itemname) {
  return item_sprite[itemname];
}


This allows the other EDL code in the game to be oblivious to the existence of that map. Equivalently, this should be able to be accomplished using the new EDL spec, still in progress, simply by adding the word "function" to the beginning.

The purpose of this topic is not for more stargazing, but rather for everyone else to present capabilities they think will be needed by these scripts. If you have an idea, shoot.
#24
General ENIGMA / License Exemptions
June 21, 2013, 10:47:38 AM
Developers with tendencies to law are probably aware that ENIGMA is GPL. Whether ENIGMA is GPL or LGPL, we will run into shitloads of legal issues with people distributing our games. In principle, this is okay; we're not assholes, so we won't sue them for using our toolkit how it was intended to be used. However, as the number of contributors continues to expand out of check, the problem turns into a big chain of people to trust. Chains, weakest link, etc.

I haven't addressed this issue because I trust the current development team to not be giant dicks. However, the general (and correct) inclination of the userbase is to not trust us. The GPL gives us all the tools to be as proprietary as Yoyo, but in a way that is pleasing to Stallman instead of to Ballmer. Currently, any developer—that means any one of forthevin, HaRRiKiRi, IsmAvatar, myself,  polyfuck, or RobertBColton—any are capable of forcing someone to release the source to their game. This isn't the end of the world, obviously, but it's the end of the world to some of our userbase.

New developers are starting to show up at increasing rates. Now is the time to sort this shit. In case any of you were genuinely unaware of this issue, I apologize for leaving you in the dark about it.

The basic idea is that we need a custom Linking Exception similar to the one used in GCC. Basically, our linking exception would grant users the right to hard-link their game code to the engine when compiled using an "official" IDE. Here's the trick: How do we legally define an official IDE?

Call it selfish, but my personal inclination is to keep the code within the ENIGMA project, when closed-source. Basically, I want to allow a third party to make off with all engine code, provided that they do so in full free-and-open-source spirit; that is, with the intention of all derivative works being free and open-source, including user games. Why? It's not because I'm evil, or on a power trip.

Consider WINE. WINE is a great piece of software, in concept. In practice, it's too shitty to run Microsoft office. It's also X11-licensed. So one day, the now "Crossover Office" team decided to take WINE, fix it up professionally to be able to run MSO, and then close-source it and charge money. Puts a pit in my stomach.

Assuming we have a method for legal endorsement, this method should be conducive to our main goal, here: We need to provide incentive for any third-party distributors to contribute back to the project. That means we do not want people to fix up a critical piece of the engine that we're having trouble with, then close-source that part and charge money for it. We also, of course, don't want Yoyo making off with a chunk of ENIGMA of any size, but I don't think they'd reduce themselves to that level. They're too proud, and it's too risky for them.


Contributors:

If you hold any code in the project, I need your express and explicit permission to re-license your code according to an ENIGMA Linking Exception. The ENIGMA Linking Exception is not yet written; if you are versed in Legalese, or are an aspiring Richard Stallman, I would appreciate your help writing the exception.

If you have any aversion to the exception, I need to know about it. We have to agree. In face of disagreement, parts of ENIGMA could be GPL forever. We can only offer users as much freedom as is granted by the most-stingy developer. GPL is most stingy, X11 is least stingy. My code will be covered by this linking exception.
#25
I was going to get started on a couple of the issues in the tracker (actually, I've done so), but the engine was so full of warnings, I had a hay day. I've created a new issue for the warnings that were my fault. The majority of the warnings were for variable-length arrays and floating point comparisons. I've corrected the floating point comparisons using a new header called <floatcomp.h>. From now on, instead of f1 == f2, include that header and use fequal(f1, f2). There is also an fnequal, fzero, and fnzero, which I trust are self-explanatory.

The only source that makes an exception is var.h in its division-by-zero checking. For that, it assumes only division by exactly zero is useful to report. If you think it's useful to strictly compare against zero elsewhere, let me know. The point of the header is mostly to make it easy to change out comparison behaviors, depending on need.

Other warnings that remain:

Universal_System/spriteinit.cpp: In function 'void enigma::exe_loadsprs(FILE*)':
Universal_System/spriteinit.cpp:105: warning: variable 'collision_data' set but not used [-Wunused-but-set-variable]
Forthevin: How are you accessing mask data in your precise collision system? It isn't being passed in from the sprite load mechanism.

Graphics_Systems/OpenGL1/glew.c:11678: warning: no previous declaration for 'glxewContextInit' [-Wmissing-declarations]|
Graphics_Systems/OpenGL1/glew.c:11960: warning: redundant redeclaration of 'glxewContextInit' [-Wredundant-decls]|
Our copy of glew is fucked up. Not touching it.

Universal_System/resource_data.cpp: In function 'bool enigma_user::script_exists(int)'
Universal_System/resource_data.cpp:82: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Signed-unsigned comparison in script_exists (#228)

I'll commit this shortly.


Warnings to other developers:
Forthevin: I had to make a couple of your particle methods static.
Polygone: I tore the shit out of your grid functions.