Darkstar2
|
|
Posted on: May 20, 2014, 11:43:03 pm |
|
|
Joined: Jan 2014
Posts: 1238
|
Ok I had made other topics before about this and thought the problem was resolved but it came back. I was recommended to tweak settings.ini and use -xms 1000m which is the maximum. I thought this had helped as it crashed less frequently - however I spoke to soon I found a way to reproduce a crash, here is the gay error message I get: java.lang.Error: Invalid memory access at com.sun.jna.Native.invokeInt(Native Method) at com.sun.jna.Function.invoke(Function.java:383) at com.sun.jna.Function.invoke(Function.java:315) at com.sun.jna.Library$Handler.invoke(Library.java:212) at com.sun.proxy.$Proxy0.compileEGMf(Unknown Source) at org.enigma.EnigmaRunner$CompilerThread.run(EnigmaRunner.java:679)
Now you must be wondering how the bloody fuck did I manage to do this, I must have been working on a really big project .... No ! Here is how I did it, I don't know if it is relevant to the settings I used and have not tested with other fonts/gfx system yet. New project, ogl1 no sprites 1 font resource arial, size 99 (which is the maximum allowed through LGM). (font0) 1 object with code in draw event draw_set_font(font0); draw_text(0, 0, "Hello, world!"); draw_text(1.5,20.5, "Hello, world!"); 1 room, 1 instance of this object. That's it, nothing else. Also tried build all / clean, same thing. The crashing even occurs on font size 70, worked on 50. Tried this in GMS, not a problem, it handled it fine....of course in gaymaker studio the fonts even that big was ugly as fuck, 2nd one was blurry. I hope this information can be useful. The past days I have had ENIGMA crash on me with retarded errors of this sort at least 200 times.
|
|
|
Logged
|
|
|
|
Goombert
|
|
Reply #1 Posted on: May 21, 2014, 12:46:59 am |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
This is a separate issue unrelated to the out of memory ones. This issue is the font texture page not being big enough to handle the font size or some shit. It however should not be failing in the plugin, it should be failing in ENIGMA's graphics system. At any rate, we need texture atlasing to allow us bigger texture combinations.
Let's see I reproduced it with 32-127 character range, so 127-32=95, so sqrt(95)= roughly 9.7 * 90px per character = roughly 877.2 pixel wide font texture.
Again, the plugin should still not be failing, I'll investigate when I have time.
|
|
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
|
Goombert
|
|
Reply #3 Posted on: May 21, 2014, 02:36:07 am |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
No large sprites are fine currently, they will lag the IDE, but they are usable as long as they are smaller than or equal to what your video card supports. It's just something wrong with the fucking plugin font population that is causing it to shit out. Large games are less likely to run perfectly out of the box however because as the size of the game increases, the number of chances of it using something ENIGMA has not finished or is buggy increases as well.
|
|
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
Darkstar2
|
|
Reply #4 Posted on: May 21, 2014, 02:47:04 am |
|
|
Joined: Jan 2014
Posts: 1238
|
No large sprites are fine currently, they will lag the IDE, but they are usable as long as they are smaller than or equal to what your video card supports. It's just something wrong with the fucking plugin font population that is causing it to shit out. Large games are less likely to run perfectly out of the box however because as the size of the game increases, the number of chances of it using something ENIGMA has not finished or is buggy increases as well.
I have 2GB video memory, but if using more than video RAM isn't regular RAM used to compensate ? Regarding the lagging of IDE, I had talked about a project I had long ago I might work on it soon, external resources, and regarding fonts if this does not get fixed I think I have an idea around it, crazy idea actually Think I am actually going to learn more from this than actual game development lol!
|
|
|
Logged
|
|
|
|
Goombert
|
|
Reply #5 Posted on: May 21, 2014, 02:57:59 am |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
Yes if you overflow VRAM new resources will be pooled in system RAM. At any rate, that isn't what I was talking about, regardless of how much RAM you have, most graphics cards limit the size of textures, some really old shitty cards may be 1024x1024, average is 2048x2048, and I think mine is 5096x5096, and if you have a card like Harri or Josh or Cheeseboy it would be even higher. https://www.google.com/#q=texture+size+limitIf you want to support tablets, you should go no higher than 2048^2, which is what Tegra 3 supports (iPad3/Tegra 4 supports 4096^2). If iPad, Nexus, or Galaxy Tab are possible candidates, don't go over 2048^2. http://www.gamedev.net/topic/646362-expected-maximum-texture-size/But also yes, the IDE lags, but so does Studio's IDE with big projects. I've compared opening big games such as TKG's in Studio and it runs just about as badly as LGM, the editors just don't lag nearly as much, it's written in Delphi.NET currently. But they use an optimization that we can not, since LGM works with all formats. They convert all projects to GMX when imported, this means, they only load the tree nodes and the first subimage of sprites to iconify the tree nodes when you open the game. Then as you click each resource they will load it into memory, and when you close the editor free that up. LGM does not have the currently capability of doing that, if we did our IDE would be inextricably faster than theirs.
|
|
« Last Edit: May 21, 2014, 03:02:59 am by Robert B Colton »
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
TheExDeus
|
|
Reply #6 Posted on: May 21, 2014, 04:05:55 am |
|
|
Joined: Apr 2008
Posts: 1860
|
I have 2GB video memory, but if using more than video RAM isn't regular RAM used to compensate ? Not precisly. GPU cannot use regular RAM to render. It does what RAM does with pagefiles in windows. If you are out of VRAM, it will write some to RAM and then overwrite that VRAM portion with the new stuff. When the old stuff is needed again, it will load it from RAM. If you are out of RAM at that point (could be possible) then your OS will write to HDD. So it's possible that in the worst case scenario your VRAM is actually written to HDD (which would probably reduce framerate to 5). If this writing is not possible, for example, when you use all 2GB in one shader, then it will probably crash. But as Robert pointed out. It's not VRAM, but what texture sizes it supports. You could have 2GB, but that doesn't mean 1 texture can be 2GB. One texture is usually up 4092x4092 these days. Usually higher on newer PC's. I just googled and it seems my 660Ti can have up to 16384x16384 in DX11 (probably the same in GL). That is actually 1GB of 32bit texture, so with my 2GB of VRAM I can have two of these textures in memory. So in theory this could mean ENIGMA cannot be used to make very complex games with large sprites, backgrounds, animations, etc. That is purely dependent on the PC, not ENIGMA. But the LGM issue is something to do with Java not having enough memory.
|
|
|
Logged
|
|
|
|
Darkstar2
|
|
Reply #7 Posted on: May 21, 2014, 12:41:22 pm |
|
|
Joined: Jan 2014
Posts: 1238
|
Yes if you overflow VRAM new resources will be pooled in system RAM. At any rate, that isn't what I was talking about, regardless of how much RAM you have, most graphics cards limit the size of textures, some really old shitty cards may be 1024x1024, average is 2048x2048, and I think mine is 5096x5096, and if you have a card like Harri or Josh or Cheeseboy it would be even higher. https://www.google.com/#q=texture+size+limit
I use AIDA64, great hardware info tool, it lists so many thing about hardware, there is 1D, 2D, 3D, all kinds of numbers. Mine is 16384x16384 and in other places it says 65535x65535. I guess the only workaround for using such large games in ENIGMA is an advanced developer by using external resources and keeping the LGM IDE compact, only using the resources as needed. This is what nearly all commercial games do. Currently GMS deprecated certain functions to allow this, luckily in ENIGMA they still exist, all that remains is for me to write my single file encrypted resources I can extract files from direct to memory or to disk. If you want to support tablets, you should go no higher than 2048^2, which is what Tegra 3 supports (iPad3/Tegra 4 supports 4096^2). If iPad, Nexus, or Galaxy Tab are possible candidates, don't go over 2048^2. http://www.gamedev.net/topic/646362-expected-maximum-texture-size/[/quote] Yeah, mobile support is the last thing on my mind right now That's why I am using ENIGMA now, it has some of the advanced functionality I am looking for, that is not present in GMS. But also yes, the IDE lags, but so does Studio's IDE with big projects. I've compared opening big games such as TKG's in Studio and it runs just about as badly as LGM, the editors just don't lag nearly as much, it's written in Delphi.NET currently.
Soon, in C#. They could have prevented the lag with optimization and allowed dynamic resource allocation as needed instead of preloading everything to the IDE. Why the HELL would one need to preload anything after all you are testing your game back and forth. Should be optional, preload and after a certain limit go dynamic handling. But of course that requires more coding ! so I guess that part is left up to the developer. No biggie, I think I am capable of doing so.
|
|
|
Logged
|
|
|
|
Darkstar2
|
|
Reply #8 Posted on: May 21, 2014, 12:43:09 pm |
|
|
Joined: Jan 2014
Posts: 1238
|
But as Robert pointed out. It's not VRAM, but what texture sizes it supports. You could have 2GB, but that doesn't mean 1 texture can be 2GB. One texture is usually up 4092x4092 these days. Usually higher on newer PC's. I just googled and it seems my 660Ti can have up to 16384x16384 in DX11 (probably the same in GL). That is actually 1GB of 32bit texture, so with my 2GB of VRAM I can have two of these textures in memory.
I use AIDA64, and it also says 16384x16384. (but there is 1D,2D,3D, etc.) numbers can vary 65535, 2048, 16384, etc. You will find all the info on just about everything hardware using that tool.
|
|
|
Logged
|
|
|
|
Goombert
|
|
Reply #9 Posted on: May 21, 2014, 07:04:31 pm |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
I use AIDA64, and it also says 16384x16384. (but there is 1D,2D,3D, etc.) numbers can vary 65535, 2048, 16384, etc. You will find all the info on just about everything hardware using that tool. This is actually where I am kind of stumped with texture atlasing, I don't know if Studio places any limit on the number of textures per page or not. I guess the only workaround for using such large games in ENIGMA is an advanced developer by using external resources and keeping the LGM IDE compact, only using the resources as needed. This is what nearly all commercial games do. Currently GMS deprecated certain functions to allow this, luckily in ENIGMA they still exist, all that remains is for me to write my single file encrypted resources I can extract files from direct to memory or to disk. You should probably do that anyway, having external resources makes your game modifiable by the end user, and that is a very very positive thing. SimCity 4 came out in 2001, yet it is still very VERY popular today because of the sheer amount of modifications for it, it even has an entire development community built around it. http://www.simtropolis.com/They could have prevented the lag with optimization and allowed dynamic resource allocation as needed instead of preloading everything to the IDE. Why the HELL would one need to preload anything after all you are testing your game back and forth. Should be optional, preload and after a certain limit go dynamic handling. But of course that requires more coding ! so I guess that part is left up to the developer. No biggie, I think I am capable of doing so. That's what I just said above, currently I can't make LGM do that, because it does not have a guaranteed format, and the ENIGMA plugin needs to write the resources out to the EGM format anyway. Josh does not like the idea of making the CLI for ENIGMA natively handle GMX, and I kind of do not either. But basically, we can, in the future, optimize LGM specifically for the format that is loaded, so if you load GMK's they will always be loaded all at once, but GMX will be optimized and not lag as much, and so will EGM. Potentially, but none of us have the time to overhaul the system this much.
|
|
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
Darkstar2
|
|
Reply #10 Posted on: May 21, 2014, 07:42:23 pm |
|
|
Joined: Jan 2014
Posts: 1238
|
This is actually where I am kind of stumped with texture atlasing, I don't know if Studio places any limit on the number of textures per page or not.
I don't know if things changed but I recall they do, because of their mobile exports. For windows you can tweak texture page settings. I remember long ago when I tried importing high res textures in GMS they looked so damn blurry/blocky, a simply bumping up texture settings in the configs, made them nice and crisp. I'm pretty sure they do have limits. You should probably do that anyway, having external resources makes your game modifiable by the end user, and that is a
Not really what I am after. The external resources engine I would build would allow me to keep the core compact, fast, efficient. Would probably open the doors to adding support for DLC, level editors, etc, but that is really not a priority right now. My main priority is starting to work on my engine which would be in 2 parts. The resource file builder which would parse a text file and encrypt / link all the files together and build an index, and the reader engine which would pass a request through a function and extract individual resources. always be loaded all at once, but GMX will be optimized and not lag as much, and so will EGM. Potentially, but none of us have the time to overhaul the system this much.
Do you have high hopes for GameMaker's new IDE ? It will be C# based right ? Do you think it will offer much improvements ? Some say it will suck just as much dick, some say it will be better/faster. Wasn't this alleged new IDE due in christmas 2013 or Q1-2014 ?
|
|
|
Logged
|
|
|
|
Goombert
|
|
Reply #11 Posted on: May 21, 2014, 09:07:52 pm |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
Do you have high hopes for GameMaker's new IDE ? It will be C# based right ? Do you think it will offer much improvements ? Some say it will suck just as much dick, some say it will be better/faster. Wasn't this alleged new IDE due in christmas 2013 or Q1-2014 ? It was supposed to be released in that time frame, and it's going to be worse. Look at their debugger, they went and copy and pasted icons off some free icon website, or well it looks like that anyway. I have no faith in them, I do however have faith that Mark Overmars would make a good IDE. All they did was crap up everything he made.
|
|
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
|
Goombert
|
|
Reply #13 Posted on: May 21, 2014, 10:27:50 pm |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
No I've already talked with Dailly, they are going to be changing a lot, drag and drop will be overhauled, I'm certain it will be pretty unfamiliar from the traditional GM IDE.
|
|
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
|
|