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

#1
General ENIGMA / Ludum Dare 32 Entry
April 20, 2015, 02:33:44 AM
I entered the Ludum Dare game jam again this year. Enjoy!
http://ludumdare.com/compo/ludum-dare-32/?action=preview&uid=28370
#2
General ENIGMA / Animated GIFs
December 14, 2014, 03:00:25 AM


So I've written a GIF parser from scratch. It loads each GIF image into its own sub-image, just like GM does. This can be used with image_load(), which would otherwise assume it was a PNG and crash.

I need to do a bit of cleanup before submitting a pull request (it's super slow right now), but I wanted some feedback first. Is this something you guys want? It's only 500 lines of code, so it shouldn't clutter much.

Thoughts?
#3
General ENIGMA / Busy busy, like a bee
December 06, 2014, 02:58:34 PM
Hey all,

Just a quick check-in: this weekend I'm (currently in the middle of) doing the Ludum Dare! Thought I'd try it out with ENIGMA as the engine. Don't expect too much, but I thought some of you might be interested:

http://ludumdare.com/compo/2014/12/06/tiny-pockets/
#4
General ENIGMA / Quick question on fonts
November 30, 2014, 08:37:08 PM
Hey all,

Just a quick question on fonts. I compiled An Untitled Story using a bunch of custom fonts, and when I copied the executable over to another machine, the fonts "just worked". This is by design, right? What I mean is, I don't have to worry about distributing the fonts with the game, right?
#5
Greetings all,

I'm very happy to announce that "An Untitled Story" can now be completed through the end, and I am bumping it up to alpha as a result. Behold:
http://youtu.be/--KJapCLrBE

Also:


Compared to Iji, this game had a lot more edge-case behavior that just "happened" to work (for example: mixing obj_1.value with self.value). On the other hand, its mechanics were a lot simpler, so I was able to get it up and running in far less time. Some bosses are still glitched, but all the essentials are there.

Thanks again for all your help, and good luck on your own games or ports!
#6
Voila:
https://www.youtube.com/watch?v=rt48LZNv45c

Still needs a ton of work; in particular backgrounds and constants are not working. But it's getting there.
#7
Programming Help / Constants?
November 10, 2014, 02:06:26 AM
Do constants currently work in ENIGMA? I am having some trouble importing constants from GM8.
#8
Programming Help / Why do we use placement new?
October 08, 2014, 01:16:59 AM
Why do vars initialize with placement new in ENIGMA?
#9
General ENIGMA / OS-X Cross-Compilation is now in master
September 24, 2014, 12:42:27 AM
As of the latest master, you can now cross-compile from Linux to OS-X using ENIGMA. Wiki guide here:
http://enigma-dev.org/docs/Wiki/CrossCompileLinuxOSX

This should go without saying, but make sure you are aware of Apple's draconian policies before submitting a cross-compiled app to the App Store (it will likely be rejected). You can certainly distribute the app unofficially, of course (like on the "Games" page).

As always, I am happy to answer questions/fix bugs as people run into them.
#10
General ENIGMA / Need some advice on fullscreen + views
September 11, 2014, 03:20:50 AM
Hello all,

I've got a pretty simple question: what's the "correct" (from a GM point of view) way of saying "make the game fullscreen, and stretch all views to fit"?

Basically, I know that window_set_fullscreen(true) works fine when views are off, but if views are in use then the game screen will never expand to fill the entire window. Is there some magic number for views/ports that causes the views to behave this way, or do I have to resize every view's port to fit the new window size when I trigger fullscreen?

Would appreciate any advice on this.
#11
When I try to load my iji.egm file, I get the following error:
java.io.IOException: Unexpected end of file reached at filepos: 971
at org.lateralgm.file.GmStreamDecoder.read(GmStreamDecoder.java:80)
at org.lateralgm.file.GmStreamDecoder.read(GmStreamDecoder.java:59)
at org.lateralgm.file.GmStreamDecoder.readStr(GmStreamDecoder.java:132)
at org.enigma.file.EFileReader$RoomGmDataReader.readData(EFileReader.java:1194)
...


It is clear that this is caused by the Room decoder looking for the "pre-creation" event that was just added recently.

Edit: Actually, it might be from translation/rotation/scale? Either way, the engine is expecting something in the room binary blob that is not there, so it is over-reading.

Unfortunately, I have no idea how to recover from this error. Consider:


  • I am storing Iji unzipped in a directory (which I then zip up into an EGM file).
  • The room_x.rmg file is a binary file
  • Apparently the room editor now looks for the missing properties  in the .rmg file?

So do I have to manually edit every .rmg file in a hex editor? Or is there some way for the plugin to auto-detect if it is loading an old rmg file and then add the the missing properties? I don't mind doing this once or twice, but if the .rmg format is going to change frequently, then I would recommend adding versioning.

Edit: Or perhaps someone could provide a script to update .rmg files when the format changes?
#12
Hey all,

Somewhat by chance, I was able to get Iji working on OS-X by cross-compiling on Linux. This only requires minimal changes (plus the compiler's .ey file and some setup)  --it is much easier than cross-compiling to Windows. My question is: are you guys interested in this? If so, I can make a pull request and a wiki page; if not, I'll just keep this in my own fork.

#13
Works in Progress / Iji is now in Beta! Please test~
September 01, 2014, 06:35:57 AM
I'm pleased to announce that Iji is now officially in beta. The game is playable through to the end, and the remaining bugs, while numerous, are all relatively minor. Check out the promo video here; these videos were all captured from the ENIGMA version of the game:
https://www.youtube.com/watch?v=6KBIEgOduZk&feature=youtu.be

This also means that I'm providing binaries, so you don't have to go through the arduous task of compiling Iji yourself. Check the wiki for more info. And please help to test the game and file bug reports if you are interested.
https://bitbucket.org/sethhetu/iji_enigma/wiki/Home

The video is currently not public, as I am unsure if I used the correct logos for Lateral GM and ENIGMA (or if I forgot to credit anything). Please let me know if there's any press guidelines on using the ENIGMA/Lateral GM logos. (I'd like to give credit where credit is due, but I'm not sure if there are any restrictions regarding this.) I'll upload a finalized video once everyone's happy.

I was hoping to have OS-X binaries available, but I can't stall development any longer (the other two OS's have been ready for a week). My goal is to get OS-X (and eventually Android) included into the beta, so that everyone can enjoy this wonderful game.

Thanks again to everyone who helped make this possible!
#14
General ENIGMA / OSX Trials and Tribulations
August 26, 2014, 07:06:54 AM
Hello all,

So, I've been trying to get ENIGMA running on OSX Mavericks, but it seems that it's been some time since anyone used it. (If there are any OSX ENIGMA users out there, please chime in.) Problems are listed in order of appearance.

The compiler still hardcodes the include "/opt/X11/include", when it should be "/opt/local/include" (assuming MacPorts).

The application links "./ENIGMA" as the project path, when it should link "../ENIGMA" (or possibly ../../ENIGMA) due to how the working directory functions.

The built application is missing an Info.plist, so OSX complains it can't launch it. (This is probably related to the next issue.)

Adding an Info.plist to the built app and telling it "this is a Cocoa app" will cause the app to launch a terminal describing the current working directory, and then there's no further output. No OpenGL window is shown.

I'd really like to figure out how to get around these errors, but I'm not experienced with Mac development. Anyone have any ideas?
#15
Issues Help Desk / Trouble compiling ENIGMA on Windows
August 12, 2014, 02:02:12 AM
I know, I know, everyone has trouble compiling ENIGMA on Windows. I actually had it working before, but I foolishly upgraded to Windows 8 and couldn't get it working on the new install. So now I'm trying to re-install from scratch in a Win7 virtual machine.

My question is, after following these steps:
http://enigma-dev.org/docs/Wiki/Install:Windows

...I use Git bash, cd to the source directory, and do:
mingw32-make
java -jar lateralgm.jar


...and it opens. But then, when I compile an empty project, I get the following verbose error.

Does anyone have any idea what I'm running into here?

Creating room creation code scope and parsing
"Linking" scripts into the objects...
"Linking" timelines into the objects...
"Link" complete.
Tabulating maximum argument passes to each script
Finished
Writing executable information and resources.
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x625836c6, pid=1852, tid=1884
#
# JRE version: Java(TM) SE Runtime Environment (7.0_67-b01) (build 1.7.0_67-b01)

# Java VM: Java HotSpot(TM) Client VM (24.65-b04 mixed mode, sharing windows-x86
)
# Problematic frame:
# C  [compileEGMf.dll+0x36c6]
#
# Failed to write core dump. Minidumps are not enabled by default on client vers
ions of Windows
#
# An error report file with more information is saved as:
# c:\Users\Administrator\source\enigma-dev\hs_err_pid1852.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
#16
General ENIGMA / Ini Plugin Upgrade
August 11, 2014, 02:28:13 AM
Hello all,

A while back I started working on some fixes to the ini plugin (which affects OSX and Linux users --Windows has its own approach). I had 3 goals:
  1) Provide basically the same behavior as GM:S (excluding obvious flaws). So, all the ini_* functions (including ini_write_*).
  2) Extend that to support saving and loading comments verbatim --now you can comment your ini files without ENIGMA eating the comments.
  3) Replacing that horribly ugly ini Extension icon.

I originally lost interest, but at Robert's request, I have polished up my branch and stabilized it. You can try it out here:
https://github.com/sorlok/enigma-dev/compare/sorlok:robust_inis

A sample ini file that the plugin can load and save (mostly) verbatim:
; Comments can appear above sections.
[somesection]
test = hi ;..also after vars
test2 = " hi "

;Var quote
test3 = " hi " ;quotes are used to preserve spaces in values.
test4 = hi ;test
test5 = hi
test6 = hi ;tset
test7 = "hi;" ;...quotes also help if the comment character is inside your value
test8 = "newvar;"

;A comment at the end of the file


Please let me know your thoughts on this. I'm still debugging weird edge cases, but once it's stable I'll prepare a pull request.
#17
Just FYI:
#18
General ENIGMA / ENIGMA prototype bindings for SDL
August 02, 2014, 01:16:45 AM
Good evening all,

Last week I started a prototype to get ENIGMA working with SDL platform bindings (code here). It was actually a lot easier than I thought, and we've got running games now:



I know that SDL is being bound, because the input's frozen. Whoops. :P

Anyway, so far this project was just for my own curiosity. I don't intend to continue it, but I wanted to check with you all first before abandoning it. Is this a wanted feature? Some benefits of SDL:

  • It has mostly the same code on all 3 platforms (glXSwapIntervalEXT notwithstanding).
  • SDL2 (which I am using) has support for Android. So... this makes things easier, right?
  • Even if you never use it, it's always nice to have a "backup", and right now most "Platforms" only have 1 option.
  • I have to fix all the xLib stuff anyway at some point, and switching to SDL might actually be easier.

The challenges:

  • A lot of the code in Platforms/ is actually not platform-specific, so I'd have to do a lot of refactoring.
  • This will inevitably lead to temporary breakage, which everyone (including me) hates.
  • Basically, I only want to put in the extra effort if people will use it.

Side-note: Input does actually work in my test scripts; I'm not 100% sure why it's frozen in Project Mario.
#19
General ENIGMA / Fun with imge_single
July 23, 2014, 12:37:53 PM
After two previous attempts, I've finally got image_single working. These three commits (#1, #2, #3), in order, comprise the basic solution.

Before explaining what my solution does, I need to explain why the previous two approaches fell short.

  • Approach 1: #define image_single as image_index. The problem here is that, when image_single is set back to -1, image_index must be set back to its old value, including the fractional component (if, e.g., speed is <1). But the fractional component must be dropped if image_index was manually reset any time during that period.
  • Approach 2: Use events.res to overwrite image_index in some event (say, End Step). The problem here is that image_single can be set by another event using "with(object)". This leads to flickering, as the image_index has likely advanced a frame, but image_single won't be applied until the next frame.

My approach is basically to create two classes that wrap gs_scalars/integers and overload operator= to track every access. Then, the following logic occurs:

  • ImageIndex::operator=() -- Sets a "manual" flag to let the program know that image_index was set by the user (not by image_single). (Protects against image_index updated while image_single is still in control.)
  • ImageSingle::operator=() -- If the new value is -1, restore the old value. Else, save the old value of image_index, but only if the manual flag is set. (Protects against multiple calls to image_single in a row.)
  • The step event -- don't update if image_single is >=0.

This approach works very well (tested in Iji, a very image_single-heavy game). There's a potential issue with image_index getting a few frames ahead if image_single is called from another object's with() block, but it doesn't come up in practice, because everyone just resets image_index manually most of the time anyway when setting image_single to -1. This is, I think, part of the reason why image_single was dropped originally.

Caveat emptor: I'm not planning on merging this anytime soon. It adds a penalty to every image_index access even if image_single is not used, which I don't think is fair (since no-one uses it for new games). Also, it's only been tested on GM5 (yes, technically GM:S also supports image_single, and I've heard it behaves slightly differently). So I'm only presenting this as an overview to answer the question "What would be necessary to properly support image_single?". The nice thing is that these changes, although messy, are all relatively localized, so we could, in theory, enable them selectively at compile time.
#20
Developing ENIGMA / Iji on ENIGMA
July 07, 2014, 08:55:01 PM
Hey all,

Now that I've finally gotten past the intro cutscene, I figured it would be a good time to formally introduce my project: porting Iji to ENIGMA (and thus, a native Linux port).

Requisite gameplay video:
https://www.youtube.com/watch?v=iBErmgih7fU

The video describes some basics about what I'm trying to accomplish. In terms of commits to ENIGMA, I have been pushing relevant commits upstream for months, but there will always be some hacks that I feel should not be included in the engine. Thus, you'll have to use my Github fork of ENIGMA to run this.

NOTE: Game is super-crashy, and may hang your system.
#21
General ENIGMA / Cross-platform filename mangling
July 03, 2014, 01:12:20 AM
Hello again everyone,

I've run into an issue that requires sweeping changes, and I thought I'd post here to get everyone's thoughts on my proposed solution. The issue: "\" on Linux messes up things like "file_exists()" and "sound_add()" (and a LOT of other functions). Although using "/" will work on both Windows and Linux, many developers forget or aren't aware. At the very least, both Project Mario and Iji are affected.

My proposed fix is outlined in this commit, which is a prototype fix that I will expand to cover all the other file functions if everyone thinks it makes sense.

Basically, I've changed the following:
//Every instance of "fname", such as :
int file_exists(std::string fname);

//...becomes:
int file_exists(const filestr& fname);


The "filestr" class is defined in PFfilemanip.h, and takes a "const char*" in a single-argument constructor. This allows you do the following in your script:
file_exists("somefile.txt")

...in other words, no changes are required to user scripts. The "filestr" class also exports "c_str()", so the functions themselves (e.g., "file_exists") only need to change the parameter type of "fname". The constructor of "filestr" is platform-dependent:
//On Linux:
filestr::filestr(const char* fname) : data(fname) { std::replace(data.begin(), data.end(), '\\', '/');}

//On Windows:
filestr::filestr(const char* fname) : data(fname) {}


In other words, Windows filenames are unaffected, and Linux filenames should "just work". (There are still potential problems with case sensitivity, but by far the most common problem I've seen is with backslashes.)

Please let me know what your thoughts are on my solution. In particular:

  • Is this something generic enough to replace *every* occurrence of "string fname" with "const filestr& fname"?
  • Is the "filestr" class defined in the right place?
  • Are there any other concerns I should be aware of, or reasons this is not considered a good solution?

I'm happy to scour the code base and make these changes, but I want to make sure this is a good approach first.
#22
General ENIGMA / Compatibility flags.
June 23, 2014, 10:49:18 PM
Hello all,

Something came up during my timeline branch that I'm not quite sure how to address. The field "timeline_running" is (I think) OFF by default in GM:Studio. In GM5, however, it does not exist, and it is implied that all timelines start as running. So, GM5 games still can't use timelines (since I made the GM:Studio behavior the default).

There's a simple fix to this: in write_object_data.cpp, we can do something like this:
//Old code:
wto <<"instance->timeline_running = false;\n"

//New code:
wto <<"instance->timeline_running = " <<(GM5COMPAT?"true":"false") <<";\n"


However, I'm not quite sure where to put this option (a screenshot of the Enigma settings dialog is below for reference).

  • Unlike normal options, this should be set automatically when importing a project. Do we do that for anything else at the moment?
  • None of the current categories seem like a good place to put this option. Do we have any similar settings at the moment?

Any thoughts?

#23
General ENIGMA / Question about audio:none
June 14, 2014, 12:20:20 AM
Good evening,

I've got a development-based question about the "None" audio backend. Would it make sense to add empty initializations of "sound_add", "sound_play", etc. to this backend? In other words, "sound_add()" would check for the file and return an id, sound_play would take that id and do nothing (no sound). Basically, this would allow developers to compile games that use audio functions without actually linking to an audio backend, which is useful for debugging, performance testing, and other things.

If this doesn't really belong in "None", what about a "Mute" backend that does what I described? I'm comfortable implementing such a system, but I thought I'd check first.
#24
Hello!

I've been tracking down the issue egofree reported in the Timelines announcement thread, and I think I've finally got it narrowed down. Please refer to the image at the bottom of this post. Also, you'll need egofree's test game:
https://dl.dropboxusercontent.com/u/29802501/TestTimeLine.gmx.zip

Open the game, and open the first timeline's Step 60 code. You'll see show_message(60);. This (at least on Linux) will fail to compile, so change it to:  show_message("60"); (note the quotes). Now, save the game and compile it without closing the editor. As you can see from the picture:
A) the "code" window shows the updated text
B) the filesystem itself shows the updated text
C) the compiler is still using the old text.

After some more digging, I found out that:

  • The same error occurs in EGM format (not just GMX folder format).
  • Closing and re-opening the project will "fix" the issue (as egofree reported)
  • The same issue does NOT affect objects (which compile similarly to timelines).

Does anyone (esp. Robert) know if there's special code that "refreshes" objects when they're saved to disk (or when the "ok" button is checked in Lateral GM), and if the same logic is not being run for timelines? I can try to narrow this down further, but I honestly haven't done much work with Lateral GM, so if this is an easy fix I'd appreciate if someone could let me know.

#25
Hey all,

I was up late for unrelated reasons, so I decided to consolidate all of my mega-unstable ENIGMA hacks to see what the end result was. And here it is:



That's right, you can watch the entire intro cutscene from Iji now. Back when I started hacking on this, you couldn't even get past the title screen, or see any text. The heavy lifting for cutscenes is done by my Timelines code, but there's a slew of bug fixes to boot. Gameplay is still impossible; there's a weird room-related bug I'm trying to track down. But this is very encouraging!

If you're curious to try it yourself, you can use this branch. Just be forewarned: that code is NOT production ready. I'll be cleaning it up and testing it more thoroughly in the coming weeks.

Happy hacking all.