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

271
Actually, "insert a=string(1);" in the create event of an object does work, I just tested on Windows 10. You have a bigger problem going on. Is this the first time you've used ENIGMA in a while? Did you use it on a different PC before? Also, we do not support OpenJDK because it has terrible issues with running Swing (LateralGM) applications. I would recommend installing the Oracle JDK.

272
Tips, Tutorials, Examples / Re: Sprite Patch Scripts
« on: May 02, 2016, 09:52:24 PM »
I am sorry Harri I should have thought you would have used something similar for the GUI stuff.  How does that function work though? It just looks like draw_sprite_part to me.

273
Tips, Tutorials, Examples / Sprite Patch Scripts
« on: May 01, 2016, 07:09:11 PM »
This was requested of me to write a script that can do this. Drawing sprites this way makes it easier to scale parts of them without messing up and blurring the corners. This is especially useful for rendering UI controls.

NOTE: These scripts should work in older GM versions, but if you are using Studio or ENIGMA you may want to replace control variable increments (such as += 1 in a for loop) with ++i as an optimization because preincrement is faster. If you are using ENIGMA then it is even faster to just use an int with preincrement.
Code: (GML) [Select]
// this works in old GM versions but is slower
for (i = 0; i < 3; i += 1) {
// this is faster and only works in GMS, ENIGMA, or C++
for (i = 0; i < 3; ++i) {
// this is the fastest in both ENIGMA or C++
for (int i = 0; i < 3; ++i) {

This is what a 9-patch sprite looks like:


My first attempt makes use of a single sprite and its subimages.
Code: (GML) [Select]
/// draw_sprite_patch(sprite, x, y);
/// by Robert B. Colton
///
/// draws a 9 patch sprite with x, y as the top-left corner
/// subimages are in the order: top-left, top-center, top-right,
/// middle-left, middle-center, middle-right, bottom-left, bottom-center, bottom-right

var spr = argument0;
var xx = argument1, yy = argument2;
var ww = sprite_get_width(argument0), hh = sprite_get_height(argument0);

for (i = 0; i < 3; i += 1) {
    for (j = 0; j < 3; j += 1) {
        draw_sprite(
            spr,
            j + (i * 3),
            xx + j * ww,
            yy + i * hh);
    }
}

My second attempt actually adds the arguments for scaling. If you wanted to center it around the x, y parameter you can just subtract the sprite origin from xx and yy.
Code: (GML) [Select]
/// draw_sprite_patch(sprite, x, y, stretchedWidth, stretchedHeight);
/// by Robert B. Colton
///
/// draws a 9 patch sprite with x, y as the top-left corner where the middle and
/// center row and column is stretched to the given width and height
/// subimages in the order: top-left, top-center, top-right,
/// middle-left, middle-center, middle-right, bottom-left, bottom-center, bottom-right

var spr = argument0;
var xx = argument1, yy = argument2;
var sw = argument3, sh = argument4;
var ww = sprite_get_width(spr), hh = sprite_get_height(spr);

// top-left and top-right corners do not need scaled
draw_sprite(spr, 0, xx, yy);
draw_sprite(spr, 2, xx + ww + sw, yy);

// bottom-left and bottom-right corners do not need scaled
draw_sprite(spr, 6, xx, yy + hh + sh);
draw_sprite(spr, 8, xx + ww + sw, yy + hh + sh);

// top-center and bottom-center need stretched horizontally
draw_sprite_stretched(spr, 1, xx + ww, yy, sw, hh);
draw_sprite_stretched(spr, 7, xx + ww, yy + hh + sh, sw, hh);

// middle-left and middle-right needs stretched vertically
draw_sprite_stretched(spr, 3, xx, yy + hh, ww, sh);
draw_sprite_stretched(spr, 5, xx + ww + sw, yy + hh, ww, sh);

// middle-center needs stretched horizontally and vertically
draw_sprite_stretched(spr, 4, xx + ww, yy + hh, sw, sh);

And my last attempt uses a single subimage of a single sprite.
Code: (GML) [Select]
/// draw_sprite_patch(sprite, subimg, x, y, stretchedWidth, stretchedHeight, sourceWidth, sourceHeight);
/// by Robert B. Colton
///
/// draws a 9 patch sprite with x, y as the top-left corner where the middle and center row and column
/// is stretched to the given width and height
/// subimages in the order: top-left, top-center, top-right, middle-left, middle-center, middle-right,
/// bottom-left, bottom-center, bottom-right

var spr = argument0, subimg = argument1;
var xx = argument2, yy = argument3;
var sw = argument4, sh = argument5;
var ow = argument6, oh = argument7;
var cw = (sprite_get_width(spr) - ow) / 2,
    ch = (sprite_get_height(spr) - oh) / 2;
var color = c_white, alpha = draw_get_alpha();

/// do this if you want to center the sprite around its origin
/// var xx = (sprite_get_xoffset(spr) / sprite_get_width(spr)) * (sprite_get_width(spr) - ow + sw),
///    yy = (sprite_get_yoffset(spr) / sprite_get_height(spr)) * (sprite_get_height(spr) - oh + sh);

// top-left and top-right corners do not need scaled
draw_sprite_part(spr, subimg, 0, 0, cw, ch, xx, yy);
draw_sprite_part(spr, subimg, cw + ow, 0, cw, ch, xx + cw + sw, yy);

// bottom-left and bottom-right corners do not need scaled
draw_sprite_part(spr, subimg, 0, ch + oh, cw, ch, xx, yy + ch + sh);
draw_sprite_part(spr, subimg, cw + ow, ch + oh, cw, ch, xx + cw + sw, yy + ch + sh);

// top-center and bottom-center need stretched horizontally
draw_sprite_part_ext(spr, subimg, cw, 0, ow, ch, xx + cw, yy, sw/ow, 1, color, alpha);
draw_sprite_part_ext(spr, subimg, cw, ch + oh, ow, ch, xx + cw, yy + ch + sh, sw/ow, 1, color, alpha);

// middle-left and middle-right needs stretched vertically
draw_sprite_part_ext(spr, subimg, 0, ch, cw, oh, xx, yy + ch, 1, sh/oh, color, alpha);
draw_sprite_part_ext(spr, subimg, cw + ow, ch, cw, oh, xx + cw + sw, yy + ch, 1, sh/oh, color, alpha);

// middle-center needs stretched horizontally and vertically
draw_sprite_part_ext(spr, subimg, cw, ch, ow, oh, xx + cw, yy + ch, sw/ow, sh/oh, color, alpha);

I can think of about 50 more ways that this can be done, including using the tile drawing functions, which may be faster because they are batched and have little overhead. I haven't wrote those yet but if anybody needs it done a different way, feel free to ask me and I'll write the script.

274
Issues Help Desk / Re: gamepad
« on: April 30, 2016, 07:08:18 PM »

275
General ENIGMA / Re: What do you want?
« on: April 24, 2016, 02:30:23 PM »
The first part to understanding the parser would be a general knowledge of compiler construction at the very least. I managed to hack some things in without entirely understanding how a compiler works, like the object inheritance.

The most annoying parser problem we have is variadic functions, or variable arity. Those are basically just functions that take a variable number of arguments.

https://github.com/enigma-dev/enigma-dev/issues/214

https://en.wikipedia.org/wiki/Variadic_function
https://en.wikipedia.org/wiki/Arity

I think more people contributed to LGM because it's generally a much simpler project. Working on ENIGMA has a much steeper learning curve, except for adding basic engine functions such as draw_* I would argue.

Quote from: egofree
1) Fix lateralgm plugin stability
I was actually going to mention that if nobody else suggested it. That's a really good one. Currently I am actually cleaning up ENIGMA.exe and I wrote a better method to detect Java, but it likely won't eliminate  some of the other issues. I must say that I have had relatively few issues installing ENIGMA from the Portable ZIP myself. I am investigating ways to make this less a pain in the but. I am also doing some other things like cleaning up my XInput extension and properly formatting the code using Josh's code style. I have an Xbox 360 controller now so I am using it to make the functions work exactly like GMS.

276
Issues Help Desk / Re: LGM Stops Working When Using Build Menu Items
« on: April 24, 2016, 10:47:47 AM »
That is actually a slight mistake, LGM should not have output that message. I have already patched it in the master branch, it looks like that change was accidentally made within the last year. It is really just a warning to tell people that some function we use somewhere in the IDE may not be supported by your Java version (like how we don't support Drag and Drop on the main tree in < Java 6) so ignore for it right now. I am going to be patching some other things and then updating LGM again.
https://github.com/IsmAvatar/LateralGM/pull/278
https://github.com/IsmAvatar/LateralGM/pull/279

Can you actually run that script one more time and let me see the output? There's two dependencies there that got updated but I don't think they should have been updated or needed to be.

At this point though I really do think your issue is entirely the Java installation. Could you boot a live CD of Lubuntu and see if it works there?

277
General ENIGMA / Re: What do you want?
« on: April 24, 2016, 10:22:33 AM »
In my opinion I would say the parser is more important. But fundies/cheeseboy was actually doing an SDL port before but it wasn't attached to ENIGMA. It was just GM functions in C++ using SDL.

But anyway the parser is still a really big thing. I am thinking more along the lines of your most annoying bug, something that really annoys you and makes it hard for you to do something. Like how the path editor was broken for so long until I fixed it in the latest release. Something like that which I can go and just fix real easy.

278
Issues Help Desk / Re: LGM Stops Working When Using Build Menu Items
« on: April 23, 2016, 09:25:22 PM »
No I was just curious if maybe you had another Linux distro to try on another partition. I feel like something is wrong with your Java installation. Most of the other issues that people have I am able to fix, but like I said, I've never seen this one before at all...

One more thing you can try is to run "python install.py" one more time. You posted on the 14th and I released a new LGM and plugin on the 15th and updated those packages. So try running that script one more time and it will run an md5 hash over both of the jars and update them. Then try LGM again, you'll have the newer version, and maybe that will fix it.

I'll keep thinking of what else could be causing this issue.

279
General ENIGMA / What do you want?
« on: April 23, 2016, 05:30:48 PM »
Just out of curiosity and to see where to go next. I would like to get a feel of what people want. For both LGM and ENIGMA, please tell me what the 3 most important issues you see are. You should try to pick simple things that you feel are important for each, or you can suggest 1 really important item that takes a little longer to do. So either 3 simple things for each project that you find important or 1 really big thing.

The trackers should give you some ideas of what issues we currently have:
https://github.com/IsmAvatar/LateralGM/issues
https://github.com/enigma-dev/enigma-dev/issues
https://github.com/enigma-dev/lgmplugin/issues

Maybe if everyone reaches a consensus on a really important issue, I will actually do it.

280
Announcements / Re: LateralGM 1.8.7
« on: April 23, 2016, 05:24:32 PM »
Thanks! But, what EGM file extension errors?

Also, I am sorry that the path editor was broke in the IDE for so long. That was not introduced by me, but was introduced after 16b4 by a pull Rusky merged. I picked up LGM on 16b4's master branch, which is why it isn't broken in 16b4. So anyway, I never noticed that the path editor was broken until now but I am really glad that issue is fixed and I wish someone had pointed it out earlier. As far as ENIGMA side though I do not know if it's possible yet to disable that extension because I know there was some debate there for some reason.

281
Issues Help Desk / Re: LGM Stops Working When Using Build Menu Items
« on: April 21, 2016, 10:38:42 PM »
Do you have any other partitions or is this the only OS you have installed?

282
Issues Help Desk / Re: LGM Stops Working When Using Build Menu Items
« on: April 21, 2016, 02:45:42 PM »
I am having a hard time because this is the first time anyone has ever reported this error message. I keep track of all the different issues reported, and this one is a completely new one. Can you open the Help->About dialog in LateralGM and tell me what version it says? We did just release a new version of LGM and I updated the installer script so I don't know if you got that one and it's my fault or if it is an issue in the older version.

I would also try increasing the maximum heap size when launching LGM. Try the following:
Code: [Select]
java -jar -Xms256m -Xmx1000m lateralgm.jar
Here is what comes after the second "Creating swap" in a successful build. Yours passes on the first but fails on the second.
Quote from: output_log.txt
Creating swap.
Dumping whiteSpace definitions...
Opening ENIGMA for parse...
ERROR(c:\users\owner\desktop\enigma\mingw32\bin\../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/include//sdkddkver.h,186,48): #error NTDDI_VERSION and _WIN32_WINNT mismatch!
ERROR(__buildint,0,34): Invalid preprocessor directive `a'
ERROR(c:\users\owner\desktop\enigma\mingw32\bin\../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/include//wtypes.h,631,1): Expected closing preprocessors before end of code
ERROR(c:\users\owner\desktop\enigma\mingw32\bin\../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/include//wtypes.h,631,1): Expected closing preprocessors before end of code
ERROR(c:\users\owner\desktop\enigma\mingw32\bin\../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/include//wtypes.h,631,1): Expected closing preprocessors before end of code
ERROR(C:/ProgramData/ENIGMA//API_Switchboard.h,35,46): Could not find Networking_Systems/None/include.h
  Checked C:/ProgramData/ENIGMA/
  Checked ENIGMAsystem/SHELL/
  Checked C:/ProgramData/ENIGMA/
  Checked c:\users\owner\desktop\enigma\mingw32\bin\../lib/gcc/i686-w64-mingw32/4.8.2/../../../../include/c++/4.8.2/
  Checked c:\users\owner\desktop\enigma\mingw32\bin\../lib/gcc/i686-w64-mingw32/4.8.2/../../../../include/c++/4.8.2/i686-w64-mingw32/
  Checked c:\users\owner\desktop\enigma\mingw32\bin\../lib/gcc/i686-w64-mingw32/4.8.2/../../../../include/c++/4.8.2/backward/
  Checked c:\users\owner\desktop\enigma\mingw32\bin\../lib/gcc/i686-w64-mingw32/4.8.2/include/
  Checked c:\users\owner\desktop\enigma\mingw32\bin\../lib/gcc/i686-w64-mingw32/4.8.2/include-fixed/
  Checked c:\users\owner\desktop\enigma\mingw32\bin\../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/include/
ERROR(c:\users\owner\desktop\enigma\mingw32\bin\../lib/gcc/i686-w64-mingw32/4.8.2/../../../../include/c++/4.8.2//bits/c++0x_warning.h,34,62): #error This file requires compiler and library support for the \
ISO C++ 2011 standard. This support is currently experimental, and must be \
enabled with the -std=c++11 or -std=gnu++11 compiler options.
ERROR(SHELLmain.cpp,98,68): Could not find Preprocessor_Environment_Editable/IDE_EDIT_whitespace.h
  Checked ENIGMAsystem/SHELL
  Checked ENIGMAsystem/SHELL/
  Checked C:/ProgramData/ENIGMA/
  Checked c:\users\owner\desktop\enigma\mingw32\bin\../lib/gcc/i686-w64-mingw32/4.8.2/../../../../include/c++/4.8.2/
  Checked c:\users\owner\desktop\enigma\mingw32\bin\../lib/gcc/i686-w64-mingw32/4.8.2/../../../../include/c++/4.8.2/i686-w64-mingw32/
  Checked c:\users\owner\desktop\enigma\mingw32\bin\../lib/gcc/i686-w64-mingw32/4.8.2/../../../../include/c++/4.8.2/backward/
  Checked c:\users\owner\desktop\enigma\mingw32\bin\../lib/gcc/i686-w64-mingw32/4.8.2/include/
  Checked c:\users\owner\desktop\enigma\mingw32\bin\../lib/gcc/i686-w64-mingw32/4.8.2/include-fixed/
  Checked c:\users\owner\desktop\enigma\mingw32\bin\../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/include/
Successfully loaded builtin variant type
Successfully loaded builtin var type
Successfully loaded builtin varargs type
ERROR in parsing engine file: The parser isn't happy. Don't worry, it's never happy.
ERROR: UnknownContinuing anyway.
Creating dummy primitives for old ENIGMA
Initializing EDL Parser...
Grabbing locals...
Finding parent...Found parent scope
 >> Checking ancestor object_collisions
 >> Checking ancestor object_transform
 >> Checking ancestor object_graphics
 >> Checking ancestor object_timelines
 >> Checking ancestor object_planar
 >> Checking ancestor object_basic
Plugin: Delegating to ENIGMA (out of my hands now)
Determining build target...




Starting platform inspection
 - ENIGMAsystem/SHELL/Platforms/./Info/About.ey: Failed!
 - ENIGMAsystem/SHELL/Platforms/../Info/About.ey: Failed!
 - ENIGMAsystem/SHELL/Platforms/Android/Info/About.ey: Opened.
 - ENIGMAsystem/SHELL/Platforms/Cocoa/Info/About.ey: Opened.
 - ENIGMAsystem/SHELL/Platforms/General/Info/About.ey: Opened.
 - ENIGMAsystem/SHELL/Platforms/iPhone/Info/About.ey: Opened.
 - ENIGMAsystem/SHELL/Platforms/platforms_mandatory.h/Info/About.ey: Failed!
 - ENIGMAsystem/SHELL/Platforms/Win32/Info/About.ey: Opened.
 - ENIGMAsystem/SHELL/Platforms/xlib/Info/About.ey: Opened.
 Done.
Initializing dialog boxes
Initialized.
Building for mode (0)
Cleaning up from previous executions
 - Cleared parsed objects
 - Cleared room entries
 - Cleared shared locals list
 - Cleared event info
Adding extension
extension
Universal_System/Extensions
:
Alarms
Loading shared locals from extensions list
Finding parent...Found parent scope
 >> Checking ancestor object_collisions
 >> Checking ancestor object_transform
 >> Checking ancestor object_graphics
 >> Checking ancestor object_timelines
 >> Checking ancestor object_planar
 >> Checking ancestor object_basic
Location in memory of structure: 4fbae440
Copying resources:
Copying sprite names

Copying sound names

Copying background names

Copying path names

Copying script names

Copying shader names

Copying font names [1]
Copying timeline names

Copying object names

Copying room names

Copying constant names

SYNTAX CHECKING AND PRIMARY PARSING:
0 Scripts:
"Linking" scripts
`Linking' 0 scripts and 0 timelines in 0 passes...
Completing script "Link"
Done.
Completing timeline "Link"
Done.
0 Objects:
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.
Writing modes and settings
Writing object switch
Writing resource names and maxima
Writing timeline control information
Linking globals and ambiguous variables
Running Secondary Parse Passes
Writing events
Writing object data
Writing local accessors
Writing font data
Writing room data
Writing shader data
Running make from `mingw32-make.exe'
Full command line: mingw32-make.exe Game WORKDIR="C:/ProgramData/ENIGMA/" GMODE=Run GRAPHICS=OpenGL1 AUDIO=OpenAL COLLISION=Precise WIDGETS=Win32 NETWORKING=None PLATFORM=Win32 CXXFLAGS="-std=c++11 -I../Additional/i686-w64-mingw32/include" COMPILEPATH="Windows/Windows" EXTENSIONS=" Universal_System/Extensions/DateTime Universal_System/Extensions/Paths Universal_System/Extensions/DataStructures Universal_System/Extensions/MotionPlanning Universal_System/Extensions/Alarms Universal_System/Extensions/BasicGUI Universal_System/Extensions/ParticleSystems Universal_System/Extensions/Timelines" OUTPUTNAME="C:/Users/Owner/AppData/Local/Temp/egm6376538652707687857.exe" eTCpath=""


********* EXECUTE:
mingw32-make.exe Game WORKDIR="C:/ProgramData/ENIGMA/" GMODE=Run GRAPHICS=OpenGL1 AUDIO=OpenAL COLLISION=Precise WIDGETS=Win32 NETWORKING=None PLATFORM=Win32 CXXFLAGS="-std=c++11 -I../Additional/i686-w64-mingw32/include" COMPILEPATH="Windows/Windows" EXTENSIONS=" Universal_System/Extensions/DateTime Universal_System/Extensions/Paths Universal_System/Extensions/DataStructures Universal_System/Extensions/MotionPlanning Universal_System/Extensions/Alarms Universal_System/Extensions/BasicGUI Universal_System/Extensions/ParticleSystems Universal_System/Extensions/Timelines" OUTPUTNAME="C:/Users/Owner/AppData/Local/Temp/egm6376538652707687857.exe" eTCpath=""

******** Make Completed Successfully ********
`$exe` == '$exe': true
0 Adding Sprites to Game Module:
Done writing sprites.
Finalized sprites.
0 Sounds:
Done writing sounds.
0 Adding Backgrounds to Game Module:
Done writing backgrounds.
1 Adding Fonts to Game Module:
Iterating included fonts...
Allocated some font stuff
Copied metrics
Sorted out some font stuff
Expanded to 128 by 64
Finished packing font stuff.
Generating font map and metrics...
Allocated a big texture. Moving font into it...
Wrote all data for font 0
Done writing fonts.
0 Adding Paths to Game Module:
Done writing paths.
Closing game module and running if requested.
Running "C:/Users/Owner/AppData/Local/Temp/egm6376538652707687857.exe"
AL lib: (EE) alc_cleanup: 1 device not closed
Initializing audio system...
Opening ALURE devices.


********* EXECUTE:
C:/Users/Owner/AppData/Local/Temp/egm6376538652707687857.exe



Game returned 0
0

283
Announcements / Re: LateralGM 1.8.7
« on: April 18, 2016, 02:46:36 PM »
What it turns into 50% of the time is to just do something trivial and have some body make a decision about it. A lot of our problems come down to trivial things and fixing them is just a matter of personal style.

284
Issues Help Desk / Re: LGM Stops Working When Using Build Menu Items
« on: April 17, 2016, 07:13:19 PM »
Ignore my last post, can you tell us the output of java -version? If you are using OpenJDK please try Oracle JDK.

285
Issues Help Desk / Re: LGM Stops Working When Using Build Menu Items
« on: April 17, 2016, 03:33:00 PM »
I figured it out, run with sudo.

Failed to create make directory at /home/house/.enigma/
Make directory is: "/home/house/.enigma/"

It has to store the binaries of ENIGMA's engine there, apparently you don't have permission.