Its just something I noticed, which could make the remaining code shorter. I don't care that much about obscuring the code; but if it saves almost 2k lines... dunno.
If you are worried about the size of the output file in terms of bytes, then I really don't think there are much to be gained here. With a 10 mb map size limit, 2k lines saved, and lets say 2 bytes pr line break, you save 0.04% of the total map size by removing line breaks.. And if it's the compiled code you are worried about (after the galaxy compiler), then I don't see how line breaks should have an effect on that.
But it still servers as an extra obfuscation technique.
Writing /*/*/ results in a crash or unhandled exception. In case of the exception, the file becomes unuseable if you save it.
Still unhandled exceptions when scrolling the autocompletion list with the mouse wheel
Could Obfuscate Strings have an impact on performance? Instead of just using the string, a quite lengthy function is called. Not recommended for high frequency functions, correct? (I did not benchmark it, though, but the function seems to be O(n), n being the string length; also uses quite some string manipulation functions for every run).
When using string obfuscation, the string is not decoded each time it is used, only once when the map is loaded. Of course this leads to some overhead when loading the map, but after that, the difference is loading a field instead of a string constant.
In the compiled script you see that the strings are moved out into fields of the form
I didn't know that you could use char or handle.. I haven't found any methods or fields from the library that use them... do they actually have any practical use?
It should still be valid to use of course. Just seems silly that they added them if they are unusable. (Not talking about the byte here)
I suggest adding an option to only compile straight up galaxy code, excluding your g+ + extentions. Many people do not want to settle for one language extension yet, there are multiple promising extentions in development (in the long run, you could even add support for other extensions like Andromeda or whatever).
When obfuscate strings is checked, and the script has no strings, the editor crashes.
I would like to have static members for structs (members, which don't require a struct instance - since the static keyword is already used, you might need to come up with another keyword), also a struct initializer would be nice, too. They might sound redundant, but I like to place everything, that belongs to the struct in the struct, instead of having to use external variables and functions.
If you select text from bottom to top and press shift + tab to remove an intendation, you get an unhandled exception. If the text was selected from top to botton, you don't.
A struct with only methods throws an error
structFooBar{intdummy;//to not get an error for no struct membersvoidbar(){return;}voidfoo(){bar();}}#Initializer{FooBarr;r.foo();}
This is correct for your editor (which it should), but causes a syntax error ingame.
The output script does not declare the struct methods properly and sorts them alphabetically from bottom to top, it seems. Switching the method names causes the order in the output script to swap, and the script to work again.
As always, thanks for the feedback.. I'll add it to my list.
People might not want to settle on one language yet, but eventually some language will be come the dominant choice. If that is not g++, I'm fine with that.
Like I have said a couple of times now, I will keep improving this language as long as people show an interest in it.
I do feel I have been pretty forthcoming about suggestions from people, but I will reserve my efforts for improving g++.
To that end, I have released version 1.9.0. It has the following changes
Added support for allowing characters in the range [0x0100 - 0xFFFF] to apear in strings and as identifiers.
Text coloring algorithm has been rewritten. Structs are no longer colored, and writing /*/*/* no longer results in an error.
Indentation algorithim has been rewritten due to some issues with the previous algorithm.
Varios warnings about the same thing has been joined into a single expandable error message.
Changed string obfuscation to work for fields without method calls in them.
Added a notation to quickly write triggers. See documentation.
Fixed a bug with the suggestion window that occured when scrolling down to the end.
Added an option to use tabs instead of 4 spaces.
Integer literals in the range [0, 255] are now considered bytes.
Added handle and char types (theese are also galaxy types)
Having no strings in a project will no longer result in an exception if string obfuscation is selected
Fixed a bug where pointer refferences inside a new expression would not be converted correctly.
Fixed an error where struct methods were not always declared before use in the output.
I know I promised to make runtime checks for pointers, but it was proving difficult, so I decided to wait with that.
If you don't want to wait for mapster to confirm that it is virus free, I got an ftp server where I uploaded it. ftp://46.163.69.112/Releases/
1.9 screws up my map, I get spammed with "00:00:00.00 Trigger Error in '': Function not found" errors.
Testing further.
€ when unchecking "join to 1 file" I get spammed with "unable to copy to map, too many files" errors. What is the limit of galaxy files a map can have?
unhandled exception when trying to test map while still compiling € precisely: when trying to compile while compiling the "already compiling" message pops up. Trying to compile again after that causes the exception.
The map being screwed up is caused by the String Obfuscation. It seems like strings defining trigger functions and obfuscation do not work well together.
€ the string obfuscation algorithm seems to be bugged in general; none of my strings are displayed correctly; pathes to files are false etc etc.
Replace all does not replace correctly in the line of the cursor: the thing to replace still exists, but the result appears randomly in the line sometimes.
€ the string obfuscation algorithm seems to be bugged in general; none of my strings are displayed correctly; pathes to files are false etc etc.
If u have a string that is incorrecly deobfuscated in game, could u post the unobfuscated and the obfuscated versions of them here?
Also, please note, that although I might not respond here, I do check this thread on a daily basis.
I like that you edit your post instead of making new ones, but could u keep the changes in the bottom of the post please? That would make it easier for me to get a quick overview of any changes.
If u have a string that is incorrecly deobfuscated in game, could u post the unobfuscated and the obfuscated versions of them here?
It seems to be that all the strings are just blank. The strange results occurred, when combining strings with function return values converted to strings and/or when using StringExternal to get text keys, which resulted in seemingly random combinations of numbers, characters and partially coherent text.
This problem is still present in the actual version; I did not register any change at all.
Quote:
...but could u keep the changes in the bottom of the post please? That would make it easier for me to get a quick overview of any changes.
Okay.
Checking "Remove unused methods" removes the action function of triggers created with your new trigger creation notation.
Un-intending multiple lines still doesnt work if marking text from botton to top.
Sometimes the process of the editor persists, even if the program was closed long ago
Hi, I enjoy your optimized galaxy language. Your editor seems to have several issues, as such I recommend working on just the compiler (which can then be attached to an editor/IDE of your choice).
Anyways I saw your editor today and decided to give it a shot. It unfortunately fails (does not report any errors, just crashes) with the following code. It's probably something to do with the code, I recently started programming in galaxy (recently being, today).
#trigger MeleeInitialization{ #events{TriggerAddEventMapInit(MeleeInitialization);} #actions{MeleeInitResources();MeleeInitUnits();MeleeInitAI();MeleeInitOptions();}}#class ZI_UnitGroup{unitgroupunitgrpCurrent;ZI_UnitGroup(){unitgrpCurrent=null;}voidCreate(){if(unitgrpCurrent!=null)return;unitgrpCurrent=UnitGroup(null,-1,RegionCircle(null,0),null,0);}voidAddUnit(unitunitNew){UnitGroupAdd(unitgrpCurrent,unitNew);}}// This class allows manipulation of a unit.#class ZI_Unit{unitunitCurrent;ZI_Unit(){unitCurrent=null;}voidCreate(stringstrUnitName,intiPlayer,pointptLocation,pointptFacing){libNtve_gf_UnitCreateFacingPoint(1,strUnitName,0,iPlayer,ptLocation,ptFacing);unitCurrent=UnitLastCreated();}voidDestory(){if(unitCurrent==null)return;UnitKill(unitCurrent);}voidRemove(){if(unitCurrent==null)return;UnitRemove(unitCurrent);}voidMakeInvulnerable(boolbInvunl){if(unitCurrent==null)return;libNtve_gf_MakeUnitInvulnerable(unitCurrent,bInvunl);}voidAttackGroundAtPoint(pointptAttack){if(unitCurrent==null)return;UnitIssueOrder(unitCurrent,OrderTargetingPoint(AbilityCommand("Attack",0),ptAttack),c_orderQueueReplace);}boolHasBehavior(stringstrBehaviorName){if(unitCurrent==null)returnfalse;returnUnitHasBehavior(unitCurrent,strBehaviorName);}boolIsAlive(){if(unitCurrent==null)returnfalse;returnUnitIsAlive(unitCurrent);}}
Nothing special, just some basic encapsulation of raw galaxy functions. It crashes once I added once I added some methods to the ZI_Unitgroup.
1. The double-click timer in the editor is truly maddening, I personally have it set to the minimal amount of time in windows, while in the editor it is 1-2 seconds or something like that. Meaning, whenever you place the cursor just slightly off, you must wait 1-2sec before clicking again with the mouse or it will interpret it as a double-click and select the word instead (interestingly enough, clicking once more isn't helping either, as it treats that as yet another double-click). I'd really like this fixed or at least be adjustable.
2. Not sure if it has been fixed in 1.9.3, but I had some major issues with crashing when doing nested for-loops yesterday, it would crash every other minute basically. The issue had something to do with {}, it seemed like every time I wrote } in certain places it would instantly crash.
3. Another really disturbing thing is that pressing ESCAPE does not really close any tootips/overlays, but rather inserts a space into the source-file... what's worse is that it really looks like a space but isn't, so it creates really cryptic compile errors.
Hi, your editor crashes upon folding multiple functions.
Also is there no way to make arrays of classes? Example: SampleClass[4] *SClass;
Indeed you can make arrays of classes, but remember that each time you use a class type, it must be a pointer type. What you declared there is a pointer to an array of SampleClass'es. You should define it as SampleClass*[4] to get an array of pointers to SampleClass'es
I'm having some difficulties reproducing the crashes you guys experience, so I made a new version with an error report feature among other things.
Say hello to v2.0.0
Fixed a crash that occured when unindenting lines, and having the cursor all the way to the left.
Pressing esc or similar, no longer inserts a char in the code.
The double click in the text editor now uses the settings from windows.
Implemented an error handeler. If a crash occurs, you will be prompted to send an error message to me.
Implemented an auto update feature.
Fixed some issues with navigating using the arrow keys while text was marked.
Available for download on ftp and the asset page now
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
If it's only about obscuring the code further, I can make an option to make as long lines as possible in the output
Its just something I noticed, which could make the remaining code shorter. I don't care that much about obscuring the code; but if it saves almost 2k lines... dunno.
If you are worried about the size of the output file in terms of bytes, then I really don't think there are much to be gained here. With a 10 mb map size limit, 2k lines saved, and lets say 2 bytes pr line break, you save 0.04% of the total map size by removing line breaks.. And if it's the compiled code you are worried about (after the galaxy compiler), then I don't see how line breaks should have an effect on that.
But it still servers as an extra obfuscation technique.
Writing /*/*/ results in a crash or unhandled exception. In case of the exception, the file becomes unuseable if you save it.
Still unhandled exceptions when scrolling the autocompletion list with the mouse wheel
Could Obfuscate Strings have an impact on performance? Instead of just using the string, a quite lengthy function is called. Not recommended for high frequency functions, correct? (I did not benchmark it, though, but the function seems to be O(n), n being the string length; also uses quite some string manipulation functions for every run).
When using string obfuscation, the string is not decoded each time it is used, only once when the map is loaded. Of course this leads to some overhead when loading the map, but after that, the difference is loading a field instead of a string constant.
In the compiled script you see that the strings are moved out into fields of the form
ya, I am pretty blind for not realizing that.
Still an unhandled exception when renaming a file and not actually changing the name
Some examples for valid galaxy code, which is not accepted by your editor:
I didn't know that you could use char or handle.. I haven't found any methods or fields from the library that use them... do they actually have any practical use?
It should still be valid to use of course. Just seems silly that they added them if they are unusable. (Not talking about the byte here)
I suggest adding an option to only compile straight up galaxy code, excluding your g+ + extentions. Many people do not want to settle for one language extension yet, there are multiple promising extentions in development (in the long run, you could even add support for other extensions like Andromeda or whatever).
When obfuscate strings is checked, and the script has no strings, the editor crashes.
I would like to have static members for structs (members, which don't require a struct instance - since the static keyword is already used, you might need to come up with another keyword), also a struct initializer would be nice, too. They might sound redundant, but I like to place everything, that belongs to the struct in the struct, instead of having to use external variables and functions.
If you select text from bottom to top and press shift + tab to remove an intendation, you get an unhandled exception. If the text was selected from top to botton, you don't.
A struct with only methods throws an error
This is correct for your editor (which it should), but causes a syntax error ingame.
The output script does not declare the struct methods properly and sorts them alphabetically from bottom to top, it seems. Switching the method names causes the order in the output script to swap, and the script to work again.
As always, thanks for the feedback.. I'll add it to my list.
People might not want to settle on one language yet, but eventually some language will be come the dominant choice. If that is not g
++
, I'm fine with that.Like I have said a couple of times now, I will keep improving this language as long as people show an interest in it.
I do feel I have been pretty forthcoming about suggestions from people, but I will reserve my efforts for improving g
++
.To that end, I have released version 1.9.0. It has the following changes
I know I promised to make runtime checks for pointers, but it was proving difficult, so I decided to wait with that.
If you don't want to wait for mapster to confirm that it is virus free, I got an ftp server where I uploaded it. ftp://46.163.69.112/Releases/
1.9 screws up my map, I get spammed with "00:00:00.00 Trigger Error in '': Function not found" errors.
Testing further.
€ when unchecking "join to 1 file" I get spammed with "unable to copy to map, too many files" errors. What is the limit of galaxy files a map can have?
unhandled exception when trying to test map while still compiling € precisely: when trying to compile while compiling the "already compiling" message pops up. Trying to compile again after that causes the exception.
The map being screwed up is caused by the String Obfuscation. It seems like strings defining trigger functions and obfuscation do not work well together.
€ the string obfuscation algorithm seems to be bugged in general; none of my strings are displayed correctly; pathes to files are false etc etc.
Replace all does not replace correctly in the line of the cursor: the thing to replace still exists, but the result appears randomly in the line sometimes.
I uploaded version 1.9.2 to mapster and my ftp. It has the following changes
If u have a string that is incorrecly deobfuscated in game, could u post the unobfuscated and the obfuscated versions of them here?
Also, please note, that although I might not respond here, I do check this thread on a daily basis.
I like that you edit your post instead of making new ones, but could u keep the changes in the bottom of the post please? That would make it easier for me to get a quick overview of any changes.
It seems to be that all the strings are just blank. The strange results occurred, when combining strings with function return values converted to strings and/or when using StringExternal to get text keys, which resulted in seemingly random combinations of numbers, characters and partially coherent text.
This problem is still present in the actual version; I did not register any change at all.
Okay.
Checking "Remove unused methods" removes the action function of triggers created with your new trigger creation notation.
Un-intending multiple lines still doesnt work if marking text from botton to top.
Sometimes the process of the editor persists, even if the program was closed long ago
Hi, I enjoy your optimized galaxy language. Your editor seems to have several issues, as such I recommend working on just the compiler (which can then be attached to an editor/IDE of your choice).
Anyways I saw your editor today and decided to give it a shot. It unfortunately fails (does not report any errors, just crashes) with the following code. It's probably something to do with the code, I recently started programming in galaxy (recently being, today).
Nothing special, just some basic encapsulation of raw galaxy functions. It crashes once I added once I added some methods to the ZI_Unitgroup.
I made a new version to fix some of what you guys said above
v 1.9.3
Didn't do the indent bug.. I'll make that for next version, once i'm done with an upcoming exam.
@SBeier: Go
Awesome work with the editor!
1. The double-click timer in the editor is truly maddening, I personally have it set to the minimal amount of time in windows, while in the editor it is 1-2 seconds or something like that. Meaning, whenever you place the cursor just slightly off, you must wait 1-2sec before clicking again with the mouse or it will interpret it as a double-click and select the word instead (interestingly enough, clicking once more isn't helping either, as it treats that as yet another double-click). I'd really like this fixed or at least be adjustable.
2. Not sure if it has been fixed in 1.9.3, but I had some major issues with crashing when doing nested for-loops yesterday, it would crash every other minute basically. The issue had something to do with {}, it seemed like every time I wrote } in certain places it would instantly crash.
3. Another really disturbing thing is that pressing ESCAPE does not really close any tootips/overlays, but rather inserts a space into the source-file... what's worse is that it really looks like a space but isn't, so it creates really cryptic compile errors.
Finally you got some more people throwing feedback at you :)
Hi, your editor crashes upon folding multiple functions.
Also is there no way to make arrays of classes? Example: SampleClass[4] *SClass;
Yep :) the more the merrier
Indeed you can make arrays of classes, but remember that each time you use a class type, it must be a pointer type. What you declared there is a pointer to an array of SampleClass'es. You should define it as SampleClass*[4] to get an array of pointers to SampleClass'es
I'm having some difficulties reproducing the crashes you guys experience, so I made a new version with an error report feature among other things.
Say hello to v2.0.0
Available for download on ftp and the asset page now