Wiki

Clone wiki

pyShipCommand / GUIClient

GUI Client

While all ship and script updates are processed on the server, pyShipCommand comes with a GUI Client that can connect to the server to manage scripts and provide a visual approximation of the current state of the Universe. The goal is to provide multiple types of GUI clients (standalone, HTML5, mobile) so a player can check on their ships at any time.

Starting the GUI

After you'd successfully installed pyShipCommand, the GUI can be started by running the `pyship-gui` command from within the pyShipCommand working directory. This will present you with the login screen.

Selecting a Server

Currently, there is no public facing pyShipCommand server available for use. You must either start your own locally or use a known address/port for an already active server. For now, the server settings default to `localhost:12345` to aid in local development.

Logging In

Before you can log into the server, you will need to make sure you have registered an account with that server. If you are running the server locally, creating an account is as simple as adding a `username:pass` entry to the creds.dat file in the working directory. This must be done before the server is started.

You can also register a new account through the GUI Client by entering your desired Username/Password into the login fields and then clicking the [Register] button. This can/should be done while the server is running. Currently, there is no confirmation of new account registration, so you'll just have to try and log in to see if it was successful.

If you already have an account with your target server, you can just enter your account information into the provided fields and click [Login]. After a brief loading period, you will be presented with the main viewer screen.

Viewer

The Viewer is your main insight into the current state of Server Universe. Despite its appearance, it cannot be used to directly control any of your ships (unless you have administrative privileges). In addition to providing a visual representation of the the known Universe, the Viewer helps you with managing, uploading, and binding your various AI Scripts to your Ships.

Script Management

Your Ship Scripts are the sole controllers of your Ships and the entire reason for this game. Written in Python, they have access to most of the features of the language and to the Universe via the Ship's Equipment. While ultimately, the Viewer will provide a built-in IDE for editing these Scripts, it currently only has the ability to help upload and bind these Scripts to your Ships. As of now, editing Scripts will require the use of an External Editor and then need to be imported into the GUI. This functionality can be found in the Script Widget of the Viewer.

There are 3 steps to getting a Script running on the server:

  1. Import - Loads or Updates the Script locally on the client. This brings the script into a locally tracked directory. It also doubles as a way to refresh the state of Scripts that were modified with an external editor. This can be used on an entire directory.
  2. Upload - Uploads the script to the server and makes it available for binding to your Ships.
  3. Bind - Instantiates the Script and links it to the currently selected Ship. The Script will now run every time that ship is updated.

To get a Script to run on the server, you must Import, Upload, and then Bind a Script to an existing Ship in the Universe. New Ships created via Scripts can be automatically bound to a certain Script assuming that the Script was already uploaded to the Server.

Console

The current Viewer has very basic text input box that is used for chat and administration commands.

Updated