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.
1
General ENIGMA / Re: GMK Parser written in GML?
« on: September 15, 2013, 09:08:58 pm »Quote
but not some great "feature" that will somehow reduce 100 lines of code to 5.
But thats my point, how do you initialize a large ds_map without using like 100 lines? Tell me how I would quickly initialize a ds_map instead of doing:
Code: [Select]
a=ds_map_create();
ds_map_add(a,"a","A");
ds_map_add(a,"b","B");
ds_map_add(a,"c","C");
ds_map_add(a,"d","D");
ds_map_add(a,"e","E");
ds_map_add(a,"f","F");
ds_map_add(a,"g","G");
ds_map_add(a,"h","H");
ds_map_add(a,"i","I");
ds_map_add(a,"j","J");
ds_map_add(a,"k","K");
ds_map_add(a,"l","L");
ds_map_add(a,"m","M");
ds_map_add(a,"n","N");
ds_map_add(a,"o","O");
ds_map_add(a,"p","P");
ds_map_add(a,"q","Q");
ds_map_add(a,"r","R");
ds_map_add(a,"s","S");
ds_map_add(a,"t","T");
ds_map_add(a,"u","U");
ds_map_add(a,"v","V");
ds_map_add(a,"w","W");
ds_map_add(a,"x","X");
ds_map_add(a,"y","Y");
ds_map_add(a,"z","Z");
Quote
Long functions names (especially for ds_) is sometimes a hassle, but that is not because of language itself.
Yes it is because of the language itself. If you didn't have to use ds_map_add to add every element of a ds_map then you wouldnt have to type it 100 times. If they let you do ds_map_add_multiple(map,"a","A","b","B","c","C"); and that would still have nothing to do with the language but at least helps you write code faster. But they could add a ds_map literal like {"a":"A","b":"B","c":"C"} to the language
GML is an bad language until they add stuff like that. But yeah python is goddamn ugly too with requiring tabs.
3
General ENIGMA / Re: GMK Parser written in GML?
« on: September 15, 2013, 04:39:54 am »
I mean who wants to do
when you could do
which language is shittier? when will yoyo add an easier way to initialize ds_maps and ds_lists?
TBH they need at least something like
Code: [Select]
a=ds_map_create();
ds_map_add(a,"a","A");
ds_map_add(a,"b","B");
ds_map_add(a,"c","C");
when you could do
Code: [Select]
a={"a":"A","b":"B","c":"C"}
which language is shittier? when will yoyo add an easier way to initialize ds_maps and ds_lists?
TBH they need at least something like
Code: [Select]
a=ds_map_create("a","A","b","B","c","C");
4
General ENIGMA / Re: Font Add and Runtime Fonts
« on: September 15, 2013, 04:33:13 am »
It never creates the texture of glyphs. Who wants to learn to use libttf?
5
General ENIGMA / Re: Unions vs Operator Overload, Wtf Josh?
« on: September 15, 2013, 04:31:02 am »
What?
6
General ENIGMA / Re: GMK 820 Will Not Be Supported
« on: September 15, 2013, 04:30:20 am »
Does anyone have a sample 820 GMK with shader resources? I need one to test with.
8
General ENIGMA / Re: GMK Parser written in GML?
« on: September 15, 2013, 04:26:54 am »
You were talking about python, not c++, so I mentioned lambdas. Multiple inheritance doesnt matter but classes with some kind of inheritance do. You are trying to say that objects in GM are classes and TBH I don't know how parenting works with them. Do GM objects have methods? Do they have inheritance of methods and virtual methods of the subclass can be called by the base class? I'm not really sure that objects are equivalent to classes in other languages. C++ does have literals like for an array {1,2,3,4}, but I don't think ds_map has anything like that. Python does have pointers if you use ctypes or other libraries. Almost everything is a reference in python. But it is different than GML returning ints because the ints in GML have no type information. You don't know if the int is an object or a ds_map. I don't see how no pointers makes a language the best. I assume brainfuck doesn't have pointers, but that doesn't make it a good langauge. You're saying that the biggest waste of time for a programmer is figuring out how pointers work?
Now you say that GML is faster because you have GM and the IDE with it, and in python you don't. I think the GM IDE is great for quick 2d games, and maybe there isnt anything like that in python. You win. But that has nothing at all to do with comparing GML and python as languages. GML is still a shittier langauge than python. If lacking those features doesn't slow you down its because you haven't learned how to program effecively in a real langauge.
Now you say that GML is faster because you have GM and the IDE with it, and in python you don't. I think the GM IDE is great for quick 2d games, and maybe there isnt anything like that in python. You win. But that has nothing at all to do with comparing GML and python as languages. GML is still a shittier langauge than python. If lacking those features doesn't slow you down its because you haven't learned how to program effecively in a real langauge.
10
Programming Help / Re: error: array index >= 32000
« on: September 14, 2013, 02:29:28 am »
Whats the limit of ds_list in GMS?
11
General ENIGMA / Re: GMK Parser written in GML?
« on: September 14, 2013, 02:25:11 am »
I have to reply to time-killer-games PM here because the PM system wasnt working:
She is trying to explain every format in one file. What you have to do is work step by step through a GMK file. I only have support in my code for 800 and 810 files so thats what I know about. GM7 had simple obfuscation encryption but I haven't added support for that yet so I can't really tell you how it works.
Get a gm81 file. Open the file and the first DWORD (4 byte integer) is a magic number that tells you that you really have a GMK file. The value is 1234321 in decimal or 0x12d591 in hex so in hex editor it will be 91 d5 12 00. Then the next DWORD will be the format version like 701 or 800 decimal. Every number you read from a GMK is a DWORD (4 byte int). Even boolean values are DWORDS. The next thing is Game ID as a DWORD, and then 16 bytes for the game GUID, then another DWORD for the version of Game Settings resource. If the file is a version 800 file then the resources will probably be version 800 too. It's really confusing but you just have to work through until you can parse the entire file.
Actually there aren't any random values with no meaning. The only thing that you dont care about are the timestamps.
The zlib compression is easy, most resources are compressed and so the entire resource structure itself is compressed with zlib. You read a DWORD that is the length of the compressed data and then the compressed data. You use zlib's decompress function on the data and then you parse the data in that resource.
Sprite subimages and backgrounds in version 800+ are in a binary BGRA format so you have to convert them to whatever format you need. The sound data is just the sound file data, same as the original file WAV or MP3. I don't think there's anything obfuscated, its just a confusing format.
I don't think there is any gmk format that stores images as png. And the only gmk formats that store the lower left transparent pixel flag are versions 400-542. But I'm not sure if image data was always stored with alpha channel. Ism's description only says BGRA for 800+ version and I don't know what image data format is used for the older versions. Its really badly written.
Events and actions are confusing but all the information is there. Actions have an argument kind list and argument list. Arguments are always text so if its a number its really just the number as text.
If you are going to parse GMK in GML you have to find a zlib implementation for GML. I used python's zlib library or a c++ zlib library.
We should write a better description of GMK on the wiki.
She is trying to explain every format in one file. What you have to do is work step by step through a GMK file. I only have support in my code for 800 and 810 files so thats what I know about. GM7 had simple obfuscation encryption but I haven't added support for that yet so I can't really tell you how it works.
Get a gm81 file. Open the file and the first DWORD (4 byte integer) is a magic number that tells you that you really have a GMK file. The value is 1234321 in decimal or 0x12d591 in hex so in hex editor it will be 91 d5 12 00. Then the next DWORD will be the format version like 701 or 800 decimal. Every number you read from a GMK is a DWORD (4 byte int). Even boolean values are DWORDS. The next thing is Game ID as a DWORD, and then 16 bytes for the game GUID, then another DWORD for the version of Game Settings resource. If the file is a version 800 file then the resources will probably be version 800 too. It's really confusing but you just have to work through until you can parse the entire file.
Actually there aren't any random values with no meaning. The only thing that you dont care about are the timestamps.
The zlib compression is easy, most resources are compressed and so the entire resource structure itself is compressed with zlib. You read a DWORD that is the length of the compressed data and then the compressed data. You use zlib's decompress function on the data and then you parse the data in that resource.
Quote
the real issue is Ism's terrible description.
If there is any GMK format I'd most prefer to learn, it is the most recent one with built-in PNG transparency/alpha support, GM81.
Sprite subimages and backgrounds in version 800+ are in a binary BGRA format so you have to convert them to whatever format you need. The sound data is just the sound file data, same as the original file WAV or MP3. I don't think there's anything obfuscated, its just a confusing format.
I don't think there is any gmk format that stores images as png. And the only gmk formats that store the lower left transparent pixel flag are versions 400-542. But I'm not sure if image data was always stored with alpha channel. Ism's description only says BGRA for 800+ version and I don't know what image data format is used for the older versions. Its really badly written.
Events and actions are confusing but all the information is there. Actions have an argument kind list and argument list. Arguments are always text so if its a number its really just the number as text.
If you are going to parse GMK in GML you have to find a zlib implementation for GML. I used python's zlib library or a c++ zlib library.
We should write a better description of GMK on the wiki.
12
General ENIGMA / Re: GMK Parser written in GML?
« on: September 14, 2013, 12:52:23 am »@ssss- Thanks for the info ssss I'm still reading your comment but I found it a little nessisary to bring to your attention that even the GMZ are archivess generated by GMS's 7zip integration, they are are not icompressed inthe format you might think they are (*.7z, *.rar, etc) it is actually a regular *.zip folder. With the extension changed to GMA (but still the same format). I tried renaming the extension to zip and using Windows' default right click -> extract and it worked with having 7zip or any other 3rd party archive software installed. Also, though 7zip is primarily used for its ability to extract 7z and rar archives it does support plain old zips.I just tested some gmz from GMS and they are 7z archives not ZIP archives. unzip doesn't recognize them. If you try to open a 7z with a zip only program like maybe winzip it wont work. If you rename a .gmz to .zip and open it with 7z or winrar it just ignores the extension and sees that its really a 7z archive and opens it. I didn't think that windows explorer extract supported anything besides zip but maybe in Win 7 they support 7z too? Are you sure you didnt have 7z installed? What version of windows was it?
I have no idea why they didn't choose zip because its a pain in the ass having to support 7z since zip is a more standard format, java uses it.
13
General ENIGMA / Re: GMK Parser written in GML?
« on: September 14, 2013, 12:44:30 am »Quote
Not much less of a "toy language" than python. GML can do anything you need and while it lacks some low-level functions (unlike EDL), it still extremely powerful. I have yet to see a project I couldn't do in GML.
GML has lambdas? GML has OOP with multiple inheritance? GML has dictionary (ds_map) and list literals? GML has function pointers or functions as first class objects? I'm sorry that I missed all those features in the manual
You can do anything in a turing complete langauge and so I guess you could write your code in brainfuck if you really like to waste time. Nobody said that complex projects can't be done in brainfuck GML, all I said was that its a shitty language. Maybe you're not making progress on GL3 because you're writing it in C++ when you could be 1000 times more productive writing it in GML
I want to know is there anything that isn't shitty about GML?
14
General ENIGMA / Re: Oracle Solaris 11 support?
« on: September 14, 2013, 12:26:31 am »
Ask Cheeseboy. He has fixed the Mac port and was adding a BSD port.
15
Third Party / Re: CLI and new IDE for Enigma
« on: September 12, 2013, 03:33:31 am »
Thanks! You're right I should package it into an .exe for Windows.