Language for PA

Discussion in 'Mod Discussions' started by D3adm0nk3y, June 9, 2013.

  1. D3adm0nk3y

    D3adm0nk3y Member

    Messages:
    49
    Likes Received:
    0
    Sorry, I don't think I got this info, what language is PA coded in? or at least Us modders will code in? I'm relatively new to programming(Only Know JAVA, but that will fix soon ;) ). Thanks.
  2. feyder

    feyder Member

    Messages:
    88
    Likes Received:
    13
    Json is what is used and it's extremely simple.
  3. RCIX

    RCIX Member

    Messages:
    664
    Likes Received:
    16
    A better question is: what sort of scripting will be available? JSON is nice but it doesn't let you write code for specific units.
  4. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Json isnt even a programming language.

    The UI of PA uses Javascript with html and css.
    I think Javascript will also be used for other script stuff, but I dunno for sure.
    The core engine is written in C++ I think.
  5. fellowplanet

    fellowplanet New Member

    Messages:
    110
    Likes Received:
    0
    We could write a language system with the current UI System. But should we really do this work? Maybe UberEnt already did anything in this direction :lol:

    I think XML or JSON files per language in a language directory would do the work?
    Or how did UberEnt planned to do it?
  6. DeadMG

    DeadMG Member

    Messages:
    217
    Likes Received:
    8
    It's JavaScript. The UI is in JS, HTML and CSS written in WebKit. The unit descriptions are written in JSON. I didn't see any unit scripts like SupCom had.
  7. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    They're probably only on the server at this stage.
  8. DeadMG

    DeadMG Member

    Messages:
    217
    Likes Received:
    8
    I don't see it. How could the game require the blueprints but not the scripts on the client? If you want to simulate a unit you need both, and if you don't want to simulate a unit you don't need either. Maybe the blueprint is only *part* of the real blueprint that the UI needs?
  9. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    I think client side "blueprints" and server side "blueprints" are completely different.
    Client don't need to know what unit actual damage/defense/speed are. Server don't need to know what 3d model, animations, audio and effects unit use.
  10. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    Actually I think deadmg is right. And damage, defence, speed etc. are all currently in the client blueprints.
  11. asgo

    asgo Member

    Messages:
    457
    Likes Received:
    21
    or the blueprints are mirrored on server and client side, because server and client use different parts (perhaps with some overlap) of the information, e.g, client visual stuff and server dmg values.
    These files aren't that big and instead of maintaining two files with partial overlapping data it's easier to make too copies of one and the same file. But that's just my guess.
  12. fellowplanet

    fellowplanet New Member

    Messages:
    110
    Likes Received:
    0
    I hope this is just for now and will be changed in the future.
    The Single Player is also a "localhost" server (currently port 6543, maybe jut for testing),
    so the client should not save these information, just get it each time from the server.

    And yes: The server is not public yet!
  13. mushroomars

    mushroomars Well-Known Member

    Messages:
    1,655
    Likes Received:
    319
    I saw a hint that scripting will be in Python. Launch PA, and click to big alpha button in the middle of the window that plays the video. Now look at the first line as the text starts scrolling before Jon comes on.

    I don't remember what it says, but it ends in .PY.
  14. neutrino

    neutrino low mass particle Uber Employee

    Messages:
    3,123
    Likes Received:
    2,687
    The scripting situation is complicated but there aren't currently "unit scripts" in the way you would think of them from TA/SupCom. The intent for server side scripting is to set it up in a different way that allows the server to not run script code per unit. This could potentially change if our system doesn't work as intended (e.g. we will add in unit scripts if it ends up being necessary).
  15. DeadMG

    DeadMG Member

    Messages:
    217
    Likes Received:
    8
    That's probably a build script, which is a completely different thing.
  16. neutrino

    neutrino low mass particle Uber Employee

    Messages:
    3,123
    Likes Received:
    2,687
    Correct. Our build system is written in python. It runs across windows/mac/linux and handles everything include compiling the code and data.
  17. mushroomars

    mushroomars Well-Known Member

    Messages:
    1,655
    Likes Received:
    319
    Can you use Python for the scripting language anyways? <3
  18. neutrino

    neutrino low mass particle Uber Employee

    Messages:
    3,123
    Likes Received:
    2,687
    We heavily considered it but have rejected it.

    Part of the issue with scripting is running multi-threaded code in the sim. We don't want to require that everyone writing script understands how to write code properly so we are trying to figure out a way to appropriately sandbox the script but still give it enough power. In addition I want the servers to be FAST and script generally isn't. Overall this is a challenging area of ongoing work.
  19. D3adm0nk3y

    D3adm0nk3y Member

    Messages:
    49
    Likes Received:
    0
    Sweet thanks for all the info :)
  20. RCIX

    RCIX Member

    Messages:
    664
    Likes Received:
    16
    I don't really see a way around scripts, because modders will want to do a LOT of things that not offering scripting will disallow. Unless you plan to give us access to the server code, and then that seems clunky. :S

Share This Page