1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Andromeda - Galaxy Extension

Discussion in 'StarCraft I & II' started by gexxo, Apr 25, 2010.

  1. Flame_Phoenix

    Flame_Phoenix

    Joined:
    May 4, 2007
    Messages:
    2,283
    Resources:
    11
    Tools:
    1
    Maps:
    1
    Spells:
    6
    Tutorials:
    3
    Resources:
    11
    Your project seems quite interesting from the technical point of view. I wish I could learn more and somehow help you. Does Galaxy support 2D arrays? You could add that to Andromeda, like Vex added to vJass.
     
  2. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,176
    Resources:
    66
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Tutorials:
    1
    JASS:
    1
    Resources:
    66
    Yes, Galaxy supports up to 4D Arrays.
     
  3. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,617
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    I hate to break it to you guys, but the editor is only a beta. As such it is subject to be changed anywhere from slightly to toatally.

    Blizzard themselves admit the editor currently is incomplete, as such you might find many of the features you are after (real time syntax checking) may eventually get added.
    Until the game is actually released, I would not attempt to hack the editor.
     
  4. gexxo

    gexxo

    Joined:
    Jul 26, 2006
    Messages:
    49
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Not advancing at the moment, because this feature is not necessary at the moment. I first want to make everything work that adds new functionality. Making function inlining work can also be done later...

    Realtime syntax checking won't be added, I am 99% sure of that ;).
     
  5. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,176
    Resources:
    66
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Tutorials:
    1
    JASS:
    1
    Resources:
    66
    I see. What about destructors?
     
  6. gexxo

    gexxo

    Joined:
    Jul 26, 2006
    Messages:
    49
    Resources:
    1
    Maps:
    1
    Resources:
    1
    they will come soon, since they add functionality and polymorphism is working :)
     
  7. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,176
    Resources:
    66
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Tutorials:
    1
    JASS:
    1
    Resources:
    66
    Great, alright.
    I need help about implementing Andromenda, how can I make it run automatically on save? Is there any way?
     
  8. gexxo

    gexxo

    Joined:
    Jul 26, 2006
    Messages:
    49
    Resources:
    1
    Maps:
    1
    Resources:
    1
    not yet, we are the hell working on the mpq module which you need to inject the code into the map. Since we could only test since the editor is out, we will still need some time (but we re quite far).

    I must confess that working productively is not yet possible with the current release but we are trying to get a working version asap.
     
  9. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,617
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    You need to do a memory scan and inject your code into the editor like JNGP did. This requires you going through the editor with a disassembler fidning the right places to inject. This is why JNGP has problems with patches. I am prety sure I saw some kind of heck syntax button in SC2, but then again I am still very new to it.
     
  10. Element of Water

    Element of Water

    Joined:
    Aug 3, 2008
    Messages:
    2,298
    Resources:
    5
    Spells:
    3
    Tutorials:
    1
    JASS:
    1
    Resources:
    5
    There is a "Compile All" button, but it doesn't work for custom scripts in GUI, just in that script editor that doesn't let you use the scripts you write :p

    EDIT: I only just realised we can actually download it now, but I can't work out how to use it. I tried running the .jar file and nothing happened, I tried calling it with a batch file followed by the name of a galaxy file, nothing happened... how do we actually use it?

    EDIT2: It turns out I was using it right, but it didn't do anything since I had an error. You should at least make it say "Error on line X -- stopped compiling" even if you can't output proper error messages yet.

    Also, the outputted scripts using classes give syntax errors in the galaxy editor, because pointers are no longer supported as of patch 9. I guess you'll have to resort to using the array index as a pointer like vJass does.
     
    Last edited: Apr 26, 2010
  11. Zoxc

    Zoxc

    Joined:
    Mar 5, 2005
    Messages:
    52
    Resources:
    1
    Tools:
    1
    Resources:
    1
    My compiler parses and validates the native library in 36 ms, some of which is probably I/O overhead.

    It also integrates nicely into a IDE, as seen here: http://img694.imageshack.us/img694/7049/mwe6.png

    </hijack>

    With regards to backward compatibility Blizzard did remove pointers, did you update Andromeda already?

    Also I do find a few thing odd with the language:
    - private and public per-function which usually results in prefixes on most functions.
    - the strcall and inline keyword, I feel like these would be better as a form of attribute, they're just hints for the compiler anyway.
    - the mixing of include and import, I see no reason to do this, nor how import would be able to find the right file to import in the first place.
    - I don't know if curly brackets are required for accessors, but they shouldn't be.
    - you seem to have added a lot of keywords for things that probably will never be used (exceptions much?)
    - it seems like the comma separator can only be used in variable declarations and for loops, which is a tad inconsistent.

    Personally I'm probably not going to write any extensions until Galaxy stabilizes, the removal of pointers pushes the potential extensions in the direction of Java/C# though.
     
  12. gexxo

    gexxo

    Joined:
    Jul 26, 2006
    Messages:
    49
    Resources:
    1
    Maps:
    1
    Resources:
    1
    well I didn't know that they removed pointers. This makes things really complicated... (how to hand a class/struct to/from a function for example). What about a petition to Blizzard asking for pointers again and all other problems galaxy has at the moment => here do we go
     
  13. Zoxc

    Zoxc

    Joined:
    Mar 5, 2005
    Messages:
    52
    Resources:
    1
    Tools:
    1
    Resources:
    1
  14. gexxo

    gexxo

    Joined:
    Jul 26, 2006
    Messages:
    49
    Resources:
    1
    Maps:
    1
    Resources:
    1
    I like yours, (but I think you got too far with Closures, blizzard is even struggling with function pointers, do not make them dizzy :D)

    check out my PM!
     
  15. gexxo

    gexxo

    Joined:
    Jul 26, 2006
    Messages:
    49
    Resources:
    1
    Maps:
    1
    Resources:
    1
    v0.0.11 released

    This is a huge milestone in the development of Andromeda because v0.0.11 is the first version that can actually be used productively. Not only is it now able to read Andromeda code from map files and write back the compiled galaxy code into them, but it also comes with a small, yet very simple GUI to run Andromeda onto your maps. The GUI however is not finished yet, so expect updates for it soon.

    Also classes work again now (without using pointers anymore ;( ) and static initializers and destructors were added, too.

    An installation and usage guide can be found here.
    The download itself can from now on be found in our resource database.

    Since the MPQ handling is still in a beta status, please remember:
    Make a save copy of your map before running Andromeda on it, especially when saving to the same map file!


    Here is the complete changelog:

    -Classes no longer compile to pointers but instead use an array indexing system for dynamic allocation
    -Fixed many small errors
    -Fixed mixed up line breaks
    -Added static initializers (check specification)
    -Added destructors (check specification)
    -Andromeda is now able to read code from maps and write it to maps / combine it with the script that is present in a map
    -Added a simple GUI to execute scripts. This GUI starts up if Andromeda isn't started with parameters
    -Added new language class System (a/lang/System.a)
     
  16. tagg1080

    tagg1080

    Joined:
    Nov 28, 2008
    Messages:
    632
    Resources:
    0
    Resources:
    0
    I would seriously like to know what is wrong with the language we have been given?

    I feel like you want to write this, and havn't actually had experience using the given language to really know what needs/doesn't need to be changed.

    I am just curious.
     
  17. Flame_Phoenix

    Flame_Phoenix

    Joined:
    May 4, 2007
    Messages:
    2,283
    Resources:
    11
    Tools:
    1
    Maps:
    1
    Spells:
    6
    Tutorials:
    3
    Resources:
    11
    Galaxy is an imperative language Value based -> this means that it doesn't follow the Object Programming paradigm which is superior than the Value programming paradigm.

    Gexxo is trying to add the object oriented paradigm concept to Galaxy so it evolves into a more modular, easy and portable stage (thus becoming a better language).

    Galaxy is nothing but an improved version of JASS. Gexxo has a lot of experience with JASS and it's globally known extension - vJass - so yes, he knows what he is doing.

    You are the one who should experiment or at least read things before giving an opinion.
     
  18. tagg1080

    tagg1080

    Joined:
    Nov 28, 2008
    Messages:
    632
    Resources:
    0
    Resources:
    0

    OO is not always better...

    I just don't see the need to work on a project of this magnitude before the full editor is even out yet...
     
  19. gexxo

    gexxo

    Joined:
    Jul 26, 2006
    Messages:
    49
    Resources:
    1
    Maps:
    1
    Resources:
    1
    if you don't like oop and want to write useless conversion stuff like StringToText over and over again, then yes, you might be better off with galaxy. Anyone else is better off with andromeda. Many people used vJASS with wc3 to overcome the limitations of JASS. And as Flame Phoenix already stated, galaxy is just JASS with C-syntax and almost unusable structs. They didn't really add much functionality.

    The need to work on it right now: to ensure that it is more or less stable when SC2 is released so everyone can use it from the beginning on.
     
  20. Element of Water

    Element of Water

    Joined:
    Aug 3, 2008
    Messages:
    2,298
    Resources:
    5
    Spells:
    3
    Tutorials:
    1
    JASS:
    1
    Resources:
    5
    I've never heard it called "Value programming" before. Did you mean "procedural"? Anyway, OO is not always better, as tagg1080 said: procedural programming is quicker and simpler to program with, and the main advantage of OO is organisation, so procedural programming is probably better for small projects and OO for large ones.

    Andromeda does add other improvements, however, so I'd always use this over regular Galaxy.