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.

Topics - Goombert

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 »
Developing ENIGMA / Maximum Window Size
« on: February 17, 2014, 01:11:10 AM »
Well upon doing some testing with TKG's game in ENIGMA, I discovered an anomaly between us and Game Maker. ENIGMA does not limit the size of your Window on desktops, so if you create a game with an empty room 5000x5000 and run it in ENIGMA it will cover your entire display but you will only see a portion of the room because the rest of the window is running off your display.

Now, Game Maker imposes an arbitrary limitation to all its window_set_size/set_region_size and other functions, and even for the default room_width and room_height. It will not allow them to become larger than the display width or height, this is nice as it means somebody who sets their game on a super high resolution that your PC does not accommodate, it won't cut off your task bar when you play their game. This does mean however, that those with dual monitors could potentially not be able to full utilize multiple monitor support? I don't know if that's true or not, if somebody would really want a game stretched out over several monitors.

GayMaker: Studio has the exact same behavior.

Now at any rate, ENIGMA introduces no such limitation as mentioned above, and it can be kind of frustrating for reasons above, but we have a few options.
1) Limit the window size like Game Maker does
2) Not limit the window size and let people do w/e they want
3) Limit the window size only for room_width and room_height then if they want to make a ginormous window with window_set_size they still can

What does everyone think?

General ENIGMA / LateralGM Beta
« on: February 10, 2014, 06:21:17 PM »
I began developing LateralGM 1.8.4 about a week ago hoping to address a few issues and improve some things. After some extensive bug testing on this revision ( I would like to release it as a test version for everyone to test around with.

NOTICE! You are advised to upgrade to the latest Java version, it will have the best performance and fix many security holes in many old Java versions. We would also like to start utilizing JavaFX features after the release of Java 8 next month.

To try it out, simply update the following files from the extra packages page.

If you only want to test LateralGM out without the ability to compile games then you can just download the lateralgm.jar and open it and play with it. I highly advise you back up your projects in case anything goes wrong.

If you encounter any issues or bugs I would appreciate it if you could file them on the LateralGM GitHub Issue tracker, you may file them here on the site but I would prefer they be posted on LGM's tracker, but it doesn't matter. Please don't be afraid to report issues, if I do not know what they are I can not fix them.

********** CHANGE LOG **********
* Type Safety: The number of warnings between LateralGM and the plugin have gone from 380ish to only 26.
* Loading bar which presents feedback when loading projects.

* Updated font editor, beware old EGM's will have their character ranges reset, so you'll have to open the font editor add a default range and then save the EGM again before compiling with it. It may change again because the format I chose was to just list the ranges like paths do with points, a result of the shitty YAML parser we have.

* New sound editor

* Improved GMX reading and writing, can also handle projects with empty Sprites and Backgrounds
* Syntax Highlighting ENGIMA specific functions and auto-completion is now fixed
* Fixed resource frame to have a monospaced font
* Added physics options to room and object frame
* Resolved an issue where the resource toolbar buttons wouldn't work if the tree selection was -1
* Recent files has been moved to a submenu under File->Recent Files, stores up to 10 recently loaded projects now.
* Added timeline saving to the EGM format, pretty similar to the object format
* Fixed all exceptions in the action list editor, also correct an issue where drag and dropping actions caused them to duplicate, was a simple line of code I had accidentally removed.
* Fixed GMX Shaders I accidentally had the split token wrong.

Developing ENIGMA / JavaFX
« on: February 09, 2014, 09:09:08 AM »
So part of what I am doing in LGM 1.8.4 is addressing some long standing issues. One of these is the sound editor does not let you preview play MP3, MPEG, PCM, or OGG audio. One way to address this is the use of JavaFX which is now a part of the JSE since Java 7, though a substantial amount of the Java usage share is still Java 6.

I will probably end up doing which ever is the most popular. Also keep in mind that JavaFX also replaces swing for GUI controls allowing CSS for styling and theming, among a host of other features including hard accelerated painting and 3D graphics. Java 8 is mainly continuous integration with JavaFX and Oracle plans Java 9 in 2016 to be tightly knit with JavaFX, making it basically part of the core framework.

Programming Help / Help with Maths
« on: February 07, 2014, 12:44:17 PM »
Can someone help me with something?

I need to generate the following numbers in a combobox, so I don't have to type them out statically.
Code: (C++) [Select]
8, 16, 24, 32
40, 48, 56, 64
80, 96, 112, 128
144, 160, 192, 224,
256, 320, 512

If you notice there is a pattern, every even square of 8 the increment increases by 8. For instance, the numbers increase by 8 up until it hits 64, which is a perfect square of 8, and then it starts adding 16, it continues this pattern.

Just added information is that this is for the audio bit depth in the new sound editor for LGM 1.8.4

Anyway, I wrote the following for loop.
Code: (Java) [Select]
for (int i = 0; i <= 512; i += 8 * Math.sqrt(i)) {

However I only need to increment i by the multiplicative of the lowest square root, so if for instance i is 0 or 8, I need the result to be 1, but when it is 64 I need the result to be 2 * 8. Got any ideas?

Developing ENIGMA / Optimized GMX Loading
« on: February 03, 2014, 03:44:40 AM »
I wanted to make part of LGM's 1.8.4 development about optimizing GMX loading and saving. Many of us have already discussed this optimization technique, and everybody is already aware. I have started by running a simple test of a way I think I can add it to LGM pretty easily.

The idea is pretty simple, you only load the resource tree when somebody opens a project and only load each resource when they open it in an editor, and only write it when they actually make changes. This can effectively bring loading times down to instant even for very big projects. The only downside is that conversion from GMX to another format will be twice as long. The reason is because loading was postponed and when it comes time to write to the new format you now have to load all resources and then write all resources.

There are still a few faults with this however, one of them being compile time. When it comes time to compile and run the game all resources need to be in memory. So this would then make the first time you hit the run button twice as long as well. This could also explain why Studio does not do something similar.

Here is an image of loading Son of Blagger with my new prototype class below. Note that I have not added the preview icon just yet.

I added the following prototype class to the GMX reader. This class is used to postpone a ResNode's resource reference to the first time that it is accessed. Testing with it on egofree's Son of Blagger brought loading time from 2,500ms to 1802ms.
Code: (Java) [Select]
        public static class GMXSprite extends ResNode {
                private boolean loaded = false;
                private String classpath = "";
                public GMXSprite(String name,byte status)
                        super(name.substring(name.lastIndexOf("\\") + 1, name.length()),status,Sprite.class,null);
                        // TODO Auto-generated constructor stub
                        classpath = name;
                public ResourceReference<? extends Resource<?,?>> getRes()
                        if (!loaded && status == ResNode.STATUS_SECONDARY) {
                                loaded = true;
                                Sprite spr = LGM.currentFile.resMap.getList(Sprite.class).add();
                                res = spr.reference;
                          String fileName = new File(getUnixPath(classpath)).getName();

                          String path = LGM.currentFile.getPath();
                          path = path.substring(0, path.lastIndexOf('/')+1) + getUnixPath(classpath);
                                Document sprdoc = null;
                                        sprdoc = documentBuilder.parse(path + "");
                                catch (SAXException e)
                                        // TODO Auto-generated catch block
                                catch (IOException e)
                                        // TODO Auto-generated catch block
                                spr.put(PSprite.ORIGIN_X, Integer.parseInt(sprdoc.getElementsByTagName("xorig").item(0).getTextContent()));
                                spr.put(PSprite.ORIGIN_Y, Integer.parseInt(sprdoc.getElementsByTagName("yorigin").item(0).getTextContent()));
                                spr.put(PSprite.SHAPE, ProjectFile.SPRITE_MASK_SHAPE[Integer.parseInt(sprdoc.getElementsByTagName("colkind").item(0).getTextContent())]);
                                spr.put(PSprite.SEPARATE_MASK, Integer.parseInt(sprdoc.getElementsByTagName("sepmasks").item(0).getTextContent()) < 0);
                                spr.put(PSprite.BB_MODE, ProjectFile.SPRITE_BB_MODE[Integer.parseInt(sprdoc.getElementsByTagName("bboxmode").item(0).getTextContent())]);
                                spr.put(PSprite.BB_LEFT, Integer.parseInt(sprdoc.getElementsByTagName("bbox_left").item(0).getTextContent()));
                                spr.put(PSprite.BB_RIGHT, Integer.parseInt(sprdoc.getElementsByTagName("bbox_right").item(0).getTextContent()));
                                spr.put(PSprite.BB_TOP, Integer.parseInt(sprdoc.getElementsByTagName("bbox_top").item(0).getTextContent()));
                                spr.put(PSprite.BB_BOTTOM, Integer.parseInt(sprdoc.getElementsByTagName("bbox_bottom").item(0).getTextContent()));
                                spr.put(PSprite.ALPHA_TOLERANCE, Integer.parseInt(sprdoc.getElementsByTagName("coltolerance").item(0).getTextContent()));

                                //TODO: Just extra shit stored in the GMX by studio
                                //int width = Integer.parseInt(sprdoc.getElementsByTagName("width").item(0).getTextContent());
                                //int height = Integer.parseInt(sprdoc.getElementsByTagName("height").item(0).getTextContent());

                          // iterate and load the sprites subimages
                                NodeList frList = sprdoc.getElementsByTagName("frame");
                          path = LGM.currentFile.getPath();
                          path = path.substring(0, path.lastIndexOf('/')+1) + "/sprites/";
                                for (int ii = 0; ii < frList.getLength(); ii++) {
                                  Node fnode = frList.item(ii);
                                  BufferedImage img = null;
                                                img = File(path + getUnixPath(fnode.getTextContent())));
                                        catch (DOMException e)
                                                // TODO Auto-generated catch block
                                        catch (IOException e)
                                                // TODO Auto-generated catch block
                        return super.getRes();

General ENIGMA / LateralGM and Plugin Revisions
« on: February 02, 2014, 12:26:10 PM »
So after a few of my recent fixes and getting LGM pretty solid I have decided to move her into 1.8.4

As a part of this I backed up all copies of LateralGM and the plugin I have available and you can find them on the following Wiki page.

ALLCAPS BOARD / Rock Monster
« on: January 31, 2014, 08:35:39 AM »

We were on the moon, everybody had - matching socks! Somebody went exploring and there they saw a rock!

But it wasn't a rock...

it was a - rock monstaaaa!!!!

Developing ENIGMA / JDI Definitions Fix
« on: January 31, 2014, 05:44:33 AM »
So I finally managed to figure out a little bit about how Josh's compiler works and was able to fix the issue with why definitions modified was populating keyword and function lists for the plugin with only those that were unscoped.

The following commit contains the fix.

I have also partially corrected the issue with them not showing up properly in the Function List panel and the autocompletion window.
The following is the commit to the LGM plugin that resolves this.

As you can see in the following image not only does it display correct but ENIGMA specific functions such as those for threads will now syntax highlight.

While I am on the subject, this window from the plugin should have access to all definitions and be able to filter them, for debugging purposes it is useful to look up definitions and tokens from other namespaces and what not. This could also all be done from a single window.

I created a mockup of what the frame could look like in Qt.

Developing ENIGMA / Window Alpha and Message Box
« on: January 30, 2014, 10:10:30 PM »

Tinkering around I add two new functions to ENIGMA which GM doesn't have.
Code: (C++) [Select]
void window_set_alpha(unsigned char alpha);
unsigned char window_get_alpha();

This is the pull request implementing the functions.

Documentation is available on the Wiki.

Now this also gave me the idea that we could overload all of these window functions to accept the Win32 handle allowing them to work with multiple windows. Another important thing this would rectify is removing the need for message_* functions, such as message_alpha, allowing you to obtain the window handle of a message box function and simply use window_set_alpha()

We should also consider doing the message functions entirely differently and modeling them after something like Java/C#/VB message boxes like the following.
Code: (EDL) [Select]
mid = message_box_show("Hello, world!");
wid = message_box_get_window(mid);
window_set_alpha(wid, 150);
message_box_set_visible(mid, true);
This could all be done without removing support for the old version of the functions.

This would be the equivalent in Java. (even though there is a bug in JDK 1.7 making this example cause an exception)
Code: (Java) [Select]
JOptionPane.showMessageDialog(null, "Hello, World!");

There is however another issue and that is our Message Box system does not have a dialog result interface.

Developing ENIGMA / Asynchronous Dialogs/Win32 Threads Implemented
« on: January 29, 2014, 08:13:54 PM »
I have implemented the Win32 thread functions to allow threading of scripts, this completely does away with the need for Asynchronous events allowing users to properly use cross-platform threading.

This is the pull request I have made.

Interim documentation is available on this page.

A basic example is the following.
1) Create a new script called "scr_asynch_message" and add the following code.
Code: (EDL) [Select]
show_message("Hello, world!");2) Create a new object and in the create event add the following code.
Code: (EDL) [Select]
script_thread(scr_asynch_message);3) In the draw event add the following code.
Code: (EDL) [Select]
repeat (50) {
        draw_circle(random(room_width), random(room_height), 5, false);
4) Create a new room and place a single instance of this object
5) Run the game

As you can see an asynchronous message dialog will appear while the game continues to randomly draw circles in the background.

Developing ENIGMA / Make Directory
« on: January 27, 2014, 06:24:12 PM »

I recently started making some changes to update YAML settings, you can read about that in the following topic.

Along the way I made several bugfixes to the plugin, and also made the ability to set the make directory per-project. This way each game can have a /build/ folder next to its project file, kind of like you see in Visual Studio or Qt Creator where you are asked where you want binaries outputted to. This however holds two problems, 1 the compiler should output its binaries to one single directory, and then link them from wherever your game/preprocessor is written to, the theoretical "build" folder. This does however mean we could do away with use of temporary files, and write the executable directly inside the build folder, and this would stop the creation of many many temporary files that need cleaned up.

This was the ENIGMA commit.
This was the plugin commit with other fixes, including escaping the ENIGMA Settings YAML since it holds the spec header and is subject to it.

This means you will all need to update the plugin next time you update from the repository.
The portable ZIP has not been updated yet.

Developing ENIGMA / YAML Settings Update
« on: January 26, 2014, 10:14:13 PM »
While implementing a new ENIGMA setting I also added the ability to set platform specific defaults to the compiler settings frame. It works as Default-TargetOS where TargetOS is the name of the operating system returned by TargetHandler.GetOS(), an example follows for the Make Directory setting.

If the platform specific default is not found, the generic default is used.
Code: (YAML) [Select]
-Build Options:
: Grid
: 2
: Textfield
: Make Directory
: "./ENIGMA"
: "./ENIGMA"
: Checkbox
: Object Inheritance
: true

I implemented this to the plugin in the following commit.
The settings were implemented to ENIGMA's repo in the following pull request.

When this is merged to the repository I will immediately upload a new version of the Plugin and LateralGM as well as the Portable ZIP that you will need to download the next time you update from the repository.

Graphics and Video / issues
« on: January 26, 2014, 03:50:27 AM »
Thanks to sorlok this is resolved and is included in LGM 1.8.6

You can now use converticon icons.


I just want to write this post up explaining why should not be used to convert large icons and images to and from the ICO format.

Upon discovering TKG's icon woes in the following topic, I discovered that the website does not adhere to the ICO file specification.
The ICO file specification states that the 7th byte will be the width of the image when the format is BMP, if the format is PNG the next part is simply the PNG header.

When I investigated I found out that every ICO file with a size layer larger than 192x192 exported from will be essentially broken.

The following is a screenshot of me viewing a 192x192 ICO file from which does match the ICO specification and the width is reported correctly.

The following is a screenshot of me viewing a 512x512 ICO file from which does NOT match the ICO specification and the width is reported as 0.

The following shows what a 256x256 ICO file using PNG looks like. The 7th byte is 0 but that is because that portion starts the PNG header. This header clearly does not match the corrupted version. So that rules out the possibility that LGM couldn't load as a result of the icon using the PNG format, because LGM loads this one fine.

I do not care if Windows and Studio can work with these corrupted ICO files or not. LateralGM will not support them, because they do not follow the specification and there is no way to tell exactly how to read them. Please do not use this site to convert large icon files, there are standards in computing for a reason.

For proof that LGM loads 512x512 ICO files when they are in the correct format, try to use the following icon and it should work fine.

A good image editing software is Paint.NET it is freeware and has a lot of plugins.
There is also GIMP.
Both of these tools can be used to export ICO files properly.

General ENIGMA / ANGLE Project
« on: January 25, 2014, 06:29:14 PM »
So I recently discovered that Studio is using ANGLE for shaders. More information can be found on Google code.

ANGLE basically lets you use GLSL/GLES shaders in Direct3D. It is used in Google Chrome and Firefox.

As you can see Studio is using it.

Now I was originally spouting nonsense about CG which is even more proprietary than HLSL and just as bad. This may actually be one of the few things YoYoGames did correctly. However it is important to note that this project is BSD licensed and I am not sure if we could make it optional if implemented.

I also discovered that Studio does not mention them in the licenses tab of the launch section like they do Box2D and other things. This either means they made a mistake and are inadvertently or purposefully infringing the copyright, or they have some sort of deal with Google.

However I am still missing something fundamental here I think, because the following page suggests that ANGLE also abstracts vertex/index buffers.
This could explain why Studio does not allow you to choose the graphics system because it only has 1 graphics system, in theory, but I have no evidence.

General ENIGMA / Action Library Reader
« on: January 21, 2014, 12:34:26 AM »
Well, it came time for someone to port the Java LGM Action Library code over to C++, so Josh asked me to do so, and I did. I have created this repository it the hopes that it will be useful, but the main reason is to help NGM out and anyone who wants to make an IDE.

The lib is licensed GPL, you can find out information including further license details in its repository.

It has not been tested yet, but the LGL format has an issue at the moment with being able to load and split the subimages for the actions, but LIB format is completed.

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 »