ReadMe for Star Chess 2.1.0

ProgramStar Chess: Minimal 4X Game
Version2.1.0 (History)
Released20 April 2020
AuthorChristoph Nahr (Copyright)
Contactwebmaster@kynosarges.org
Websitekynosarges.org/StarChess.html

Table of Contents

  1. System Requirements
  2. Package Contents
  3. Usage Overview
  4. Source Package
  5. Known Issues
  6. Copyright Notice

1. System Requirements

Star Chess is a Java Swing GUI application that should work on any 64-bit operating system with a current Java Runtime Environment (JRE). The minimum requirement is Oracle Java SE 8 or compatible, such as OpenJDK. Users of high DPI displays should note that Java SE 9 or later is required for high DPI scaling.

Some hyperlink actions rely on Java’s multiplatform support for invoking default applications, such as web browsers and mail clients. These should work on all desktop platforms, assuming your applications are properly configured to handle the desired URLs or file types. If some action is entirely unsupported on your platform, the hyperlink’s tool tip will state that fact.

2. Package Contents

The directory to which the binary package was unpacked contains the following files:

ReadMe.htmlThis file
WhatsNew.htmlStar Chess version history
project.cssStyle sheet for ReadMe & WhatsNew
Diagrams.xmlProject file for overview diagrams
StarChess.jarStar Chess GUI executable (requires Java Swing)
StarChess.Core.jarStar Chess core algorithms (see below)
help/*Star Chess help system (show with index.html)

These files are all you need to run Star Chess. Java programmers may also want to download the source package which is available separately.

3. Usage Overview

Use the command line javaw -jar StarChess.jar to run Star Chess. Depending on your JVM, you may also be able to omit javaw -jar and execute StarChess.jar directly, or to simply double-click on StarChess.jar in your favorite file explorer.

Star Chess supports the command line argument LAF=… for selecting a Java Swing Look & Feel. The default is Nimbus, the only other tested L&F is Metal. Other L&Fs should work but possibly with display issues.

Star Chess creates a folder called StarChess in the current user’s home directory to store saved games and user settings. If creation of that folder fails, Star Chess will attempt to store games and settings directly in the current user’s home directory.

For more information on how to play Star Chess, please see the integrated help system. An additional PDF document available as a separate download on the Star Chess home page describes the computer player algorithms and internals of the game engine.

4. Source Package

The source package is available as a separate download on the Star Chess home page. The expected environment is IntelliJ IDEA 2020.1 with Oracle JDK 10.0.2. This package contains all of the files in the binary package, except for the precompiled Java archive, plus the following:

StarChess.imlIntelliJ project file
.idea/*IntelliJ project metadata
javadoc/*Javadoc class reference (once, combined)
res/*Embedded resources
src/*Source code and JAR manifest

The source package does not include standard build files (e.g. Ant) but you can simply download the free IntelliJ Community Edition and generate such files from the project.

Star Chess Core

The source package contains two IntelliJ projects: the main project StarChess for the Swing-based GUI executable, and the library project StarChess.Core with the actual game engine and computer player algorithm. StarChess.Core requires only the Java SE 8 Compact 1 profile, or the JVM module java.base on Java SE 9 and later, so you can use it on platforms that don’t support Java Swing.

StarChess.Core contains an executable command-line runner that prints the current game situation as ASCII art. Start the runner with java -jar StarChess.Core.jar as usual. You’ll be asked to enter a starting distribution, then the game will play out with four computer players. When finished the runner will save the game, and reload and replay the saved game. I use this program for testing the game engine. Edit Runner.java to change the hard-coded settings or the executed actions.

Overview Diagrams

The computer player documentation includes a chapter on implementation that describes relevant classes in the Star Chess source code. Relationships between these classes are visualized in several overview diagrams, created from the included file Diagrams.xml which is a Class Diagrammer project.

To view or edit the project in Class Diagrammer, open Diagrams.xml in the same directory that holds StarChess.jar. Note that the diagrams in the computer player documentation were created with locally installed Adobe Myriad Pro fonts, so you may have to adjust the diagram layouts for wider fonts.

5. Known Issues

About Star Chess: The positions/second display is somewhat imprecise. It’s based on System.nanoTime which measures total JVM execution time, not per-thread execution time for the computer player background thread. The latter would require java.lang.management.ThreadMXBean from module java.management, and StarChess.Core otherwise only requires module java.base.

Moreover, on the default turn prediction setting of two you may see an evaluation count of zero for a while because the computer player turn time is not long enough for a non-zero denominator. Keep playing until the mid to late game or increase the turn prediction setting for a non-zero display.

All files – individual files, multi-file packages, and individual files contained in multi-file packages – that constitute the original distribution of Star Chess are Copyright © 1999–2020 by Christoph Nahr, except where otherwise noted.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Exceptions

The futuristic text font in the main window is Share Regular by Ralph du Carrois, hosted on Font Squirrel and available under the SIL Open Font License.

Icons are rendered from Font Awesome by Dave Gandy, available under the Font Awesome Free License, and Ionicons by Ben Sperry, available under the MIT License. All fonts are embedded. The original font files can be found in directory StarChess/res of the source code package.

The map image is based on Galaxies in Hiding, a photograph of 200 galaxies in the Perseus-Pisces supercluster taken by NASA’s Spitzer Space Telescope. Courtesy NASA/JPL-Caltech as per Spitzer’s Image Use Policy.

The barren planet image is based on Mars and Elysium, taken by NASA’s Hubble Space Telescope. The terran planet image is based on Full Earth, taken by NASA’s Apollo 17 crew traveling toward the moon. Both images are covered by the NASA Copyright Notification. (Note: These links are now broken since NASA has moved its photos to Flickr NASA Commons, without forwarders or any decent search function. Sorry.)