• 0

    posted a message on For-Loop

    GUI for-loops are still converted to while-loops

    Posted in: Galaxy Scripting
  • 0

    posted a message on For-Loop

    try it, works in vanilla galaxy script

    Posted in: Galaxy Scripting
  • 0

    posted a message on For-Loop

    Just wondering since when for loops are supported within the galaxy language? (Somebody knows that?)

    example:

    void init(){
        int i = 0;
        for(; i < 10;i+=1){  
            UIDisplayMessage(PlayerGroupAll(), c_messageAreaDebug, StringToText("Integer: "+IntToString(i)));
        }
    }
    
    Posted in: Galaxy Scripting
  • 0

    posted a message on Max value for a floating point?

    there are no floating point numbers in SC2, we only have fixed point numbers.

    the max value for those fixed number in SC2 is 2^19 (500k), the other bits are reserved for fractional digits (fixed is also 32bit, or atleast should be)

    Posted in: Triggers
  • 0

    posted a message on luna - sc2 galaxyscript compiler

    Hmm...

    Posted in: Third Party Tools
  • 0

    posted a message on GalaxyX

    Initializer-Block:

    Within initalizer blocks you have to initialize your main stuff! This block gets called by Starcraft. Those blocks have to be initialized within namespaces! If you add something new to a namespace you may override the current initializer! (Not possible for System namespace).

    	Example:
    	namespace TestSpace{
    		initializer {
    			CustomUI.init();
    			Main.init();
    			//You also could create the Triggers here:
    			Trigger trig = new Trigger();
    			trig.setCondition(Main.cond.String);
    			trig.setAction(Main.action.String);
    		}
    	}
    	
    	//in another file, new stuff?
    	namespace TestSpace{
    		override initializer {
    			//New stuff
    		}
    	}
    
    Posted in: Galaxy Scripting
  • 0

    posted a message on GalaxyX

    I will impliment assert statements into the language, allowing better debuging! Example:

    	...
    	public void setLives(int n){
    		assert n > 0;
    		//Do something
    	}
    	...
    	->
    	void pub_setLives_int(int pointer,int n)[
    		if(!(n > 0)){
    			System_debug_pub_print("Assertion-Error: Line x");
    		}
    		//Do something
    	}
    

    The compiler will replace the x with the line of the assert statement!

    Posted in: Galaxy Scripting
  • 0

    posted a message on GalaxyX

    It's quite a while since I last posted something about GalaxyX. Time for working on it is rare...learning, doing stuff for univ. is more important.

    But if you want to know what I'm working on check this: Information

    Small Example, how I wan't to start standard libraries:

    /**************************************************************************
     *	GalaxyX System Library
     *
     *	Author: xDSchurke (Timo Hanisch)
     *	E-Mail: [email protected]
     *
     *	About:
     *		This library contains classes/methods/values which belong to the
     *		System-Namespace.
     *
     *	Contents:
     *		- Debug
     *		- Game
     *		- All Wrapper-Classes (e.g. Unit/Unitgroup/Trigger etc.)
     *
     **************************************************************************/
     
    
    namespace System{
    	
    	globals{
    		//Within global-blocks final variables can be declared (auto. final)
    		//Better var names then standard blizzard vars?? wtf global constants lower case??
    		//All blizzard constants get new names -> (within compiler they get exchanged again
    		
    		//GalaxyX values which only can be read -> constant
    		int DEFAULT_CLASS_MAX_INSTANCES = 256;
    		int DEFAULT_STRING_MAX_INSTANCES = 8192;
    		
    		//Type values
    		int DEFAULT_INT_VALUE = 0;
    		fixed DEFAULT_FIXED_VALUE = 0.0;
    		char DEFAULT_CHAR_VALUE = '';
    		String DEFAULT_STRING_VALUE = "";
    	}
    
    	
    	public class Debug[-1]{
    		//-1 Size declarators just mean they are uninstanceable!
    	
    	}
    
    	public class Game[-1]{
    	
    	}
    	
    	public class String[DEFAULT_STRING_MAX_INSTANCES]{
    		native{
    			string wrapper_str = "";
    		}
    		
    		public String(){
    		
    		}
    		
    	}
    }
    

    Also I will need help for the standard librarie, mostly including wrapper-classes but also should include other usefull stuff.

    If you have wishes, tips, questions => Please Help! Otherwise the project may take a lot of time to complete the first release.

    Posted in: Galaxy Scripting
  • 0

    posted a message on GalaxyX

    Hey mapster,

    Here I want to make some advertising for my current project which is called GalaxyX. I first anounced it within another project (http://forums.sc2mapster.com/resources/third-party-tools/19814-galaxy-parser/#p10) which was my first step to get into the whole thing.

    What is GalaxyX?
    Basicly it is a scripting language which gets translated into galaxy script, allowing scripters to do stuff more easily (At least that's what I intend to).

    GalaxyX can be descriped as a pseudo object oriented language (since it is just a big wrapper around the core which in the end is galaxy) in the same
    imparative style like Galaxy/Java/C#.

    Is GalaxyX easy to learn?
    This depends on allready known skills. If you are familiar with Java/C# it is easier for you to learn, then only knowing galaxy.

    How will I be able to use GalaxyX?
    There will be a compiler with a UI (and without), so you directly can implement the compiled script into the map. Also I plan to release the EditorX, which
    actually is the tool to work with GalaxyX more easily :) , but not necessary.

    How is the progress doing?
    I actually finished the syntax part of the compiler, as far as I can evaluate it, since there may be some syntactical stuff added.
    The actual step is to program the TreeParser.

    Is there any way I can get an overview?
    Beside the programming, I'm also working on a manual, so users who are interessted can learn and inform thereself about GalaxyX.
    You can find the manual on the following page: http://userpage.fu-berlin.de/timoh1991/manual.html (It's not finished yet)

    Do you need help?
    There actually is a part where I could need help. Writing the core scripts, like wrappers for native types, language functionality. And of course new stuff
    which has to be done, like Collections, Math etc.). If you are interessted in helping, ask me if you can join. There are of course a few requirements: You have to know what you are doing, your coding has to be clean and well documented (with EditorX I also will provide an external documentation, which is loaded with the library).

    Is there a lifetime support?
    Of course there isn't, but I will release the sourcecode, so everyone who wants to continue the project, or just want to fix something, or maybe to learn something ( :D) can do so.

    That's it for now. If you have tips/wishes or just questions regarding GalaxyX, post them or contact me via mail ([email protected]).

    Posted in: Galaxy Scripting
  • 0

    posted a message on GalaxyParser

    new version 0.3.0

    v0.3.0
    - Added a new feature which informs the user about the total memory his script allocated (Used by Variables)
    - If there is only 10% of memory left the parser will start throw a warning that the user is close to the limit

    Posted in: Third Party Tools
  • 0

    posted a message on GalaxyParser

    new version 0.2.1

    v0.2.1
    - fixed a bug with the TreeParser (Struct variable types, couldn't be obtained when struct was saved in an array)
    - debug text polished for putting functions/variables into the HashMap

    Posted in: Third Party Tools
  • 0

    posted a message on GalaxyParser

    @MotiveMe: Go

    yeah true, for final versions I also will release the sourcecode!

    for this if you want to fix something, you have to know the ANTLR grammar language and ofc. Java.
    The parser stuff has to be fixed in the grammar (if there are any errors), since the generated source code (ANTLR) is about 20k lines of non documented
    java code with cryptic variable names^^

    Edit: Btw. the actual Agenda for GalaxyX can be found here: http:userpage.fu-berlin.de/timoh1991/manual.html (Sorry, only the userpage provided by my university)

    Posted in: Third Party Tools
  • 0

    posted a message on GalaxyParser

    updated to version 0.2.0

    v0.2.0
    - full type checking added
    - debug stuff is now shown with "DEBUG:" prefix
    - Parser now works slightly different: before it was like: lexer -> Parser -> Type checking
    Now it's more like a real compiler: Lexer -> Parser -> AST -> TreeParser -> Type Checking
    - the contained native galaxy files are slightly different then the original (only so that the parser has less to do, I've written a
    small programm which cleans the lib_ntv file and the AI file... to get rid of function bodies and marking them as natives

    Posted in: Third Party Tools
  • 0

    posted a message on GalaxyParser

    updated to version 0.1.1

    @SBeier: Go

    I've noticed your project, but as you may have noticed mine is not a whole editor, it's single executable => others can build their own editor with it, if wanted ^^

    Posted in: Third Party Tools
  • 0

    posted a message on GalaxyParser

    In some way one could say it's similar to vJass for Jass. The whole stuff will be similar to the imperative oop languages like Java/C# (no real oop, since Galaxy isn't). It will support stuff like classes (ofc. includes scoping => private/public/static etc., structs (this part I dont know yet, maybe just like they are, or more like those in C#), namespaces (namespace in C#, or package in Java), interfaces etc. (I also consider tips from users :D ) I also had an idea for the UI part: there will be a small language within GalaxyX only used for dialog stuff (to shorten complex UI creation).

    But first I need to complete the actuall GalaxyParser (galaxy language only), since I will need it.

    Posted in: Third Party Tools
  • To post a comment, please or register a new account.