<- back

The Mystic Ships

Description

The Mystic Ships is a test online network game inspired from Netrek from around 2005, then updated in 2014. It was mostly a test framework to implement and test various technologies. A screenshot can be found here.

Download

The following prebuilt clients were updated in 2014. Various library depedencies have been included for convenience and to permit these archives to remain functional despite system updates.

An Android port would be nice as an eventual test, however this would require Java JNI wrapper hacks, special game controls changes and Android is generally a keyboard-starved environment. Because this test was as part of research for a later application framework to replace some HTTP applications by a more secure solution involving thin clients, there is currently no incentive to write a web AJAX+WebSockets client.

Gameplay

The game is minimal, but currently allows simple dogfighting (here is a TMS screenshot). Ships can cloak, fire torpedoes and they have a raisable shield to protect their hull. These features cost fuel. Fuel loss, shield damage and hull damage are recoverable if being careful. TMS can be played with a gamepad or with the keyboard. TMS is a network game, and although overkill, the server is currently configured to accept up to 64 concurrent client connections. The default server heartbeat and world update rate is 20 per second. There currently are two supported space ship types, each with their own characteristics, advantages and disadvantages.

Gamepad controls

Note that there is no support for Microsoft XInput, only for standard USB HID. This means that the XBox 360 controller will not work with TMS.

  • Paddle direction - fire in the specified direction, or stir in the specified direction; a button is used to fire, another one to stir, allowing to fire in the wanted direction without altering the flight course.
  • Button 0 | A - Fire torpedo in direction of paddle
  • Button 1 | B - Unused, reserved for secondary weapon
  • Button 2 | C - Stir in direction of paddle
  • Button 3 | D - Unused, reserved for third weapon
  • Button 4 | Left 1 - Raise/Lower shield
  • Button 5 | Left 2 - Cloak/Reveal
  • Button 6 | Right 1 - Accelerate | Increase thrust
  • Button 7 | Right 2 - Decelerate | Decrease thrust

Keyboard controls for the keypad

  • 78963214 direction - fire in the specified direction, or stir in the specified direction; a key is used to fire, another one to stir, allowing to fire in the wanted direction without altering the flight course.
  • 5 or Space - Fire torpedo in the specified direction
  • f - Unused, reserved for secondary weapon
  • 0 - Stir ship in the specified direction
  • g - Unused, reserved for third weapon
  • Enter - Raise/Lower shield
  • . - Cloak/Reveal
  • + - Accelerate | Increase thrust
  • - - Decelerate | Decrease thrust

Alternative keyboard controls without a keypad

  • uiojlm,. direction - fire in the specified direction, or stir in the specified direction; a key is used to fire, another one to stir, allowing to fire in the wanted direction without altering the flight course.
  • Space - Fire torpedo in the specified direction
  • f - Unused, reserved for secondary weapon
  • d - Stir ship in the specified direction
  • g - Unused, reserved for third weapon
  • s - Raise/Lower shield
  • w - Cloak/Reveal
  • z - Accelerate | Increase thrust
  • a - Decelerate | Decrease thrust

Project goals

The main project goals were as follows:

  • test client portability
  • test TCP in the context of an interactive multiuser application with fast active updates over a persistent connection
  • evaluate BSD kqueue(2) performance and usability
  • profile the overhead of protocol compression and encryption
  • explore the multithreaded SDL intrinsics portably
  • test the clipboard isolation provided by an SDL-based custom terminal
  • test the user input capabilities and limitations of SDL
  • implement an example safe protocol in terms of how clients can affect the server states (sending input events rather than update requests)
  • demonstrate protocol safety in relation to how the server updates the client display declaratively (avoiding arbitrary remote execution via client-side script injection)
  • minimize the disclosure of client and user information when connecting to servers supporting anonymous services (publicly accessible resources), i.e. no http-referer, user-agent, accept-encoding, site-specific storage or cookies, etc.
  • provide forward secrecy in the encryption protocol (using transient session keys not easily derivable from a persistent secret)
  • easy embedding of files as part of the client executable
  • provide a client that is easy to install and use without an installer or non-file-system special resources like register databases
  • a future version might use SSL/TLS+DHE to profile and compare the overhead to that of the custom encryption

Source code

The source can be found here. This can be useful to build a custom client, to port it to another system or might be interesting for game or network application developers.

Miscellaneous

  • Some TMS fan-art, under the "Innes-Giftware License" (IGL, which full text is "Do what thou wilt with it shall be the whole of the license."): innes-tms-1.jpg, innes-tms-2.jpg.
  • New collection of win32 libraries built under the NetBSD/pkgsrc mingw32 cross-compiler in 2014.
  • Old NetBSD 3.0, Linux 2.6 and Windows XP i686 clients (deprecated, incompatible with the current network protocol).
  • Old collection of win32 libraries built under the cygwin-mingw cross-compiler.

Legal

The image and sound sample files included with the client were previously released in the Public Domain before TMS was written, and were borrowed for the TMS client.

The included music piece (ogg file) "Nordic Dance", was composed and produced by Matthew Mondor and remains Copyright (c) 2008, Matthew Mondor, licensed under the Creative Commons by-nc-sa License.

The following BSD-style license pertains to the code (of the server and client):


Copyright (c) 2005, 2014, Matthew Mondor
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY MATTHEW MONDOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL MATTHEW MONDOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Powered by NetBSD