Hi,

I am new to SimpleRockets, and I have a specific question and some general questions.

First, what are PCI coordinates in Vizzy? I tried to google it but came up empty.

On that note, is there a wiki or something similar to look up this kind of information? I also tried to look through the forum posts, but it seems like the forum is not searchable. Also, when I go to look at Vizzy related questions I get a blank screen, even though it says there are 39 posts.

Furthermore, is there a non-visual way to program the rockets? Is there a way to share code, or use someone else's code?

Tags
Vizzy

6 Comments

  • Log in to leave a comment
  • Profile image

    PCI is Planet-Centered Inertial Frame of Reference, according to Wikipedia. My problem is not that, it is that the game has to define every planetary coordinate by some sort of global system. Without access to that system, I would have to convert between vector spaces, which is messy linear algebra.

    3.5 years ago
  • Profile image
    Mod sflanker

    @ManBearPig0 honestly it's been a while, but I think I just did a search for "PCI Coordinates" and the ECI wikipedia page was the first result. After reading that I verified how the PCI system works in the game experimentally, I've written a bunch of Vizzy programs that make heavy use of PCI coordinates so I'm confident that this is how it works.

    4.1 years ago
  • Profile image
    Mod sflanker

    As for non-visual ways of programming. As of right now: no there is no practical way. Technically flight programs are stored as XML files (or parts of Craft XML) in your com.jundroo.SimpleRockets2/UserData folder (exact location depends on OS), however hand editing this XML is not really practical, and while it can be used to share code, it is generally easier to save the code to a craft and share the craft on this site.


    I am interested in creating a mod that allows flight programs to be modified as a normal text based programing language with the ability to both compile to Vizzy XML. I haven't decided on the structure of the language. I'm tempted to do either a simplified common lisp, possible with type annotations (à la Typed Racket) or something based on Linden Scripting Language.

    Some of the requirements I've been thinking of:

    • Define/import modules

      • Module definitions are shared across all craft.

      • Modules are versioned on save so that changes don't break existing Flight Programs.

      • Modules contain custom expressions, custom instructions, and event handlers.

      • Variables defined within modules should be module scoped not global.

      • Event handlers are still global, so choose broadcast strings wisely.

      • Expressions, instructions and variables should only be accessible from other files if exported. (Think ES6 modules).

    • In game text editor, with multiple tabs for editing modules.
    • Import/export helper for loading Flight Program and its dependencies from a folder to make external editing easy.
    • Syntax for defining event handlers should be simple and declarative.

    I would be interested to know what the community's thoughts are on language features. Personally I love lisps, but I think the community might be more comfortable with something that looked like javascript or python (hence LSL). I also love type checking, but it does add more syntax that people would have to learn. I would definitely like the language to be a close derivative of something so I can easily point to existing documentation. I also want it to be easy to parse and compile (another reason to go with some type of lisp).

    4.1 years ago
  • Profile image

    @sflanker thank you for the thorough explanation. Where do you get this information? Not that I doubt it, just so I know where to look in the future

    4.1 years ago
  • Profile image
    Mod sflanker

    Regarding searching the forums, yes, they are unfortunately difficult to search on the site. However Google does a pretty good job: https://www.google.com/search?q=site%3Asimplerockets.com%2FForums+vizzy&oq=site%3Asimplerockets.com%2FForums+vizzy

    +2 4.1 years ago
  • Profile image
    Mod sflanker

    PCI stands for Planet Centered Inertial, and it is the similar/equivalent for Earth Centered Inertial except that it is based on the planet whose sphere of influence your craft is currently in rather than Earth specifically. The key concept of a Planet Centered Inertial coordinate system is that while it remains centered on the planet as the planet moves through space, it does not change orientation with respect to "fixed" points in space (i.e. distant stars). So as the planet rotates and moves in its orbit the unit vector (1, 0, 0) will always be pointed off in the same direction with respect to the rest of the universe. Because there is no axial tilt, and the Y axis represents up and down relative to the "celestial plane", (0, 1, 0) always points towards the north pole. You can observe the behavior of PCI coordinates by watching the position change as a craft moves in orbit. If the orbit as 0 degrees of inclination X and Z will continually change, but Y will remain basically constant. Using latitude and longitude can be easier to think about when moving relative to the surface of the planet, however, working with lat/long as a coordinate system is challenging mathematically because it is not a cartesian system (i.e. mapped to a flat plane), it is a spherical system, so the vector math doesn't work the same (see spherical coordinate system).

    +5 4.1 years ago

2 Upvotes

Log in in to upvote this post.