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.
91
Issues Help Desk / Debugging Your Game
« on: March 03, 2014, 04:42:17 am »
This guide has since been moved to the Wiki, where you can find more comprehensive information about how to improve your game's performance:
http://enigma-dev.org/docs/Wiki/Debugging
The following guide is also useful for letting us know about an issue:
http://enigma-dev.org/docs/Wiki/Bug_reporting
Please do try to put some effort into debugging issues before asking for help.
http://enigma-dev.org/docs/Wiki/Debugging
The following guide is also useful for letting us know about an issue:
http://enigma-dev.org/docs/Wiki/Bug_reporting
Please do try to put some effort into debugging issues before asking for help.
Quote from: Original Post
I am not sure if any of you are already aware but GCC and MinGW are redistributed in ENIGMA with GDB a popular and powerful debugging tool.
http://www.sourceware.org/gdb/
If your game opens and closes immediately or crashes, GDB can tell you what line in the ENIGMA source code your game crashed in. These are the steps to run your game in GDB.
1) Open your game in ENIGMA and execute it in debug mode by clicking the debug icon, this will add debugging symbols to the built executable.
2) Close the game, and look in the output window for the name of the output executable, usually a temp file on Windows and is usually named egm503450990 or similar. Copy and paste the full path to your clipboard.
3) Open enigma-dev/git-bash or on Linux or Mac any Command Line Interface or Terminal will suffice.
4) Enter "gdb file/path/to/egm/with/debugging/symbols" on the command line and hit enter.
5) Type "run" and hit enter.
6) Run the game to the point that it crashes, once it does GDB will display the segfault information.
7) If the error report is not detailed enough type "bt" for backtrace and hit enter, and it will show you the exact source files and what lines the error occurred in/on.
8) To close your game you may have to type "quit" and hit enter.
And there you have it, some advanced and very helpful debugging. These debug logs can also be useful when filing a help desk ticket as well, and you are encouraged to include them if you know how.
Note: On Windows to copy and paste a terminal window, right click on the title bar and hit Edit->Select All/Copy
92
Tips, Tutorials, Examples / Conway's Game of Life
« on: March 03, 2014, 04:40:51 am »
I found another interesting example from Game Maker 6 that works perfect in ENIGMA, Mark Overmar's iteration of Conway's Game Of Life. For anyone who doesn't know what Conway's Game of Life is, it was a computer simulation developed as an example that shows that higher order complexities can arise from a very simple set of rules.
https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
I decided to test it in ENIGMA and it works 100% perfectly right out of the box.
Download: http://sandbox.yoyogames.com/games/3157-life
https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
I decided to test it in ENIGMA and it works 100% perfectly right out of the box.
Download: http://sandbox.yoyogames.com/games/3157-life
93
Developing ENIGMA / GDB execute by default
« on: March 03, 2014, 02:37:50 am »
We should make debug mode execute with GDB by default, it's included in all our releases anyway, and ENIGMA still launches the game in debug mode. So why launch the game only for it to provide no debugging information?
We simply can not provide enough debugging macros that will catch every single exception anyway.
We simply can not provide enough debugging macros that will catch every single exception anyway.
94
Developing ENIGMA / High Frequency Mouse Capture
« on: March 03, 2014, 12:58:01 am »
http://msdn.microsoft.com/en-us/library/windows/desktop/ee418864(v=vs.85).aspx
According to this you can obtain the mouse position during a WM_MOUSEMOVE call, and I am wondering if this would be better for us to do than querying it using the WinAPI's calls every frame, or rather if the difference is very noticeable such as window_set_caption.
This is related to my decision in my recent pull request to move the Joystick code that wasn't even using DirectInput out of an extension since Microsoft doesn't even advise for DirectInput for anything except joysticks because it adds overhead. And I programmed our Joystick code for Windows using RawInput and it works fine, so I saw no reason to add overhead to Joysticks for no reason.
The only place XInput is needed is for the Xbox 360 controller.
According to this you can obtain the mouse position during a WM_MOUSEMOVE call, and I am wondering if this would be better for us to do than querying it using the WinAPI's calls every frame, or rather if the difference is very noticeable such as window_set_caption.
This is related to my decision in my recent pull request to move the Joystick code that wasn't even using DirectInput out of an extension since Microsoft doesn't even advise for DirectInput for anything except joysticks because it adds overhead. And I programmed our Joystick code for Windows using RawInput and it works fine, so I saw no reason to add overhead to Joysticks for no reason.
The only place XInput is needed is for the Xbox 360 controller.
95
Developing ENIGMA / LateralGM Studio Plugin
« on: February 21, 2014, 10:19:21 am »
Ok so, I am working on the next part of LGM's developing, which is bringing GMX and GMK support closer together, such as multiple configuration files.
I've been thinking about making a Studio plugin using their asset compiler that would basically allow you to use LateralGM in place of GM's IDE and allow you to build projects. This could be a means of increasing LateralGM's userbase, and I am wondering what everyone thinks about this.
I've been thinking about making a Studio plugin using their asset compiler that would basically allow you to use LateralGM in place of GM's IDE and allow you to build projects. This could be a means of increasing LateralGM's userbase, and I am wondering what everyone thinks about this.
96
Off-Topic / Studio Deprecating iOS In Game Advertisements
« on: February 18, 2014, 05:33:24 pm »
Well apparantly YYG just got boned by their own poor design of Game Maker.
http://help.yoyogames.com/entries/40317136
Apple has changed the submission process so you can not have advertisement identifiers, when you don't actually use advertisements.
They so silly, like how the include a full debugger in games that are built in release mode.
http://help.yoyogames.com/entries/40317136
Apple has changed the submission process so you can not have advertisement identifiers, when you don't actually use advertisements.
They so silly, like how the include a full debugger in games that are built in release mode.
97
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?
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?
98
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.
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.
99
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
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
100
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.
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.
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?
I need to generate the following numbers in a combobox, so I don't have to type them out statically.
Code: (cpp) [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?
101
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.
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();
}
}
102
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
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
103
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!!!!
104
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.
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.
105
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: (cpp) [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