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 »
106
General ENIGMA / LateralGM 1.8.4.1 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 (1.8.4.1) 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.
enigma-dev/lateralgm.jar
enigma-dev/plugins/enigma.jar
Download: http://enigma-dev.org/docs/Wiki/Install:Extra_Packages

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.
https://github.com/IsmAvatar/LateralGM/issues?state=open

********** 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.

107
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.

https://en.wikipedia.org/wiki/Java_version_history#Java_SE_8

108
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)) {
  bitOptions.add(Integer.toString(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?

109
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;
                        }
               
                @Override
                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;
                          LGM.currentFile.resMap.getList(Sprite.class).lastId++;
                          spr.setNode(this);
                         
                          String fileName = new File(getUnixPath(classpath)).getName();
                          spr.setName(fileName);

                          String path = LGM.currentFile.getPath();
                          path = path.substring(0, path.lastIndexOf('/')+1) + getUnixPath(classpath);
                         
                                Document sprdoc = null;
                                try
                                        {
                                        sprdoc = documentBuilder.parse(path + ".sprite.gmx");
                                        }
                                catch (SAXException e)
                                        {
                                        // TODO Auto-generated catch block
                                        e.printStackTrace();
                                        }
                                catch (IOException e)
                                        {
                                        // TODO Auto-generated catch block
                                        e.printStackTrace();
                                        }
                                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;
                                  try
                                                {
                                                img = ImageIO.read(new File(path + getUnixPath(fnode.getTextContent())));
                                                }
                                        catch (DOMException e)
                                                {
                                                // TODO Auto-generated catch block
                                                e.printStackTrace();
                                                }
                                        catch (IOException e)
                                                {
                                                // TODO Auto-generated catch block
                                                e.printStackTrace();
                                                }
                                  spr.subImages.add(img);
                                }
                        }
                       
                        return super.getRes();
                }
       
        }

110
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.
http://enigma-dev.org/docs/Wiki/LateralGM:_Revisions

111
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!!!!

112
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.
https://github.com/RobertBColton/enigma-dev/commit/3a3d863e88d65fc8ec9ab4b836a2cceb5e098418

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.
https://github.com/enigma-dev/lgmplugin/commit/e82762d65e0b47f41cfcf3d240948d1344d95941

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.

113
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.
https://github.com/enigma-dev/enigma-dev/pull/635

Documentation is available on the Wiki.
http://enigma-dev.org/docs/Wiki/Display_and_Window_Functions

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()
http://enigma-dev.org/docs/Wiki/Message_Box_Functions

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.getRootFrame().setOpacity(0.5f);
JOptionPane.showMessageDialog(null, "Hello, World!");

There is however another issue and that is our Message Box system does not have a dialog result interface.
http://msdn.microsoft.com/en-us/library/20stz12s%28v=vs.110%29.aspx

114
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.
https://github.com/enigma-dev/enigma-dev/pull/634

Interim documentation is available on this page.
http://enigma-dev.org/docs/Wiki/Game_State_Functions

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]
draw_set_color(c_red);
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.

115
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.
http://enigma-dev.org/forums/index.php?topic=1736.0

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.
https://github.com/enigma-dev/enigma-dev/pull/628
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.
https://github.com/enigma-dev/lgmplugin/commit/d21f29c3867ccbb072cb9b24214edf9291d7ea29

This means you will all need to update the plugin next time you update from the repository.
http://enigma-dev.org/docs/Wiki/Install:Extra_Packages
The portable ZIP has not been updated yet.

116
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:
    Layout
: Grid
    Columns
: 2
    -make-directory
:
        Type
: Textfield
        Label
: Make Directory
        Default-Windows
: "%PROGRAMDATA%/ENIGMA/"
        Default-Linux
: "%HOME%/ENIGMA/"
        Default-MacOSX
: "./ENIGMA"
        Default
: "./ENIGMA"
    -inherit-objects
:
        Type
: Checkbox
        Label
: Object Inheritance
        Default
: true

I implemented this to the plugin in the following commit.
https://github.com/enigma-dev/lgmplugin/commit/1f6071e1cf91c70a5c31a115cea60a397ef369f5
The settings were implemented to ENIGMA's repo in the following pull request.
https://github.com/enigma-dev/enigma-dev/pull/628

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.

117
Graphics and Video / converticon.com issues
« on: January 26, 2014, 03:50:27 AM »
Thanks to sorlok this is resolved and is included in LGM 1.8.6
https://github.com/IsmAvatar/LateralGM/pull/146

You can now use converticon icons.

* IGNORE THIS POST IT HAS BEEN FIXED *

I just want to write this post up explaining why converticon.com 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.
http://enigma-dev.org/forums/index.php?topic=1700.msg16563#new
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.
http://en.wikipedia.org/wiki/ICO_%28file_format%29

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

The following is a screenshot of me viewing a 192x192 ICO file from converticon.com 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 converticon.com 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 converticon.com 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.
https://www.dropbox.com/s/4y9ygbm7mqai6fy/DeathStar512.ico

A good image editing software is Paint.NET it is freeware and has a lot of plugins.
http://www.getpaint.net/
There is also GIMP.
http://www.getgimp.com/
Both of these tools can be used to export ICO files properly.

118
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.
http://code.google.com/p/angleproject/

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.
http://code.google.com/p/angleproject/wiki/BufferImplementation
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.

119
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.
https://github.com/enigma-dev/ActionLibraryReader

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.

120
Tips, Tutorials, Examples / Retro Tile Engine Example
« on: January 12, 2014, 08:46:00 PM »


I built this engine to handle a very large tile map for a retro game I am making. The example works in GameMaker: Studio as well and should work in older GM versions. The idea here is to only re-render the tile map when any tiles change or at the end of the month or when the camera moves. It can handle a very large number of tiles the demonstration runs 250x250=62500 tiles at a pretty solid framerate, slower in Studio of course.

Download: https://www.dropbox.com/s/c93v5pcur2ougwf/tilemap.gm81
Size: 14.39 KB

Enjoy!

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