Dev Module

The Dev module contains

  1. JavaFx application selection and developer settings for the different apps.
  2. Generates the HTML files for the website, including this file.

It currently works on JavaFx and web page. Using canvas on both platforms. See Scala Docs and See Scala Docs for JavaScript target.")

The Strategy games was the original motivation for the project, but the geometry and graphics library have far wider applicability. The geometry and graphics are far more developed, while the tiling and strategy games are still in a far more experimental stage. This is in accordance with the original vision, part of which was to explore the possibilities of an Algebra of Tiling.

I would welcome input from developers with greater experience and knowledge than my own. One of the goals of the project is to explore, where it is best to compose with trait / class inheritance and where to use functions. When to use mutation and when to use immutability. When to use smart, garbage collected heap based objects and when to use dumb data values. Balancing the competing priorities of elegance, succinctness, readability, run-time performance, compile time performance and accessibility for inexperienced programmers. I feel Scala is, and in particular Scala 3 will be the ideal language to explore these questions.

Scala currently set to 3.4.1. Jdk 11+, 11 preferred. Scala.Js set to 1.16.0. Scala native set to 0.4.16. Sbt currently set to 1.9.9 (uses the openstrat.sbt file). Note(probably due to the JavaFx dependency). Sbt will not work running on Windows in Git Bash. Update your Mill to 0.11.6.

Run sbt in bash from project's root folder.
From within the sbt console run:

The tilde ~ tells sbt to rerun the command every time you modify and save a source file. The first command will build and launch a ScalaFx window. It will rebuild and relaunch so you can immediately see the effects of your changes.Copy the Dev/Misc/DevSettings.rson file to the Dev/User folder. Creating the directory and its parents if not already existing. Change the appStr setting in Dev/User/DevSettings.rson to change the application. All the examples on the website are available plus others.The second command will also rebuild on source changes in similar manner. However unlike with the reStart command, when you make a source file edit and save it, you will have to manually refresh the browser window after the fastOptJS command has finished the rebuild.

For sbt js apps add the relevant source directory for the app you want to build
For IntellliJ useful options:

Place to put various notes, so as stuff doesn't get lost. It can be sorted into proper documentation later.

So at least recent versions of Kubuntu the java command on the path, is at /usr/bin/java. It is a link to /etc/alternatives/java. This is also a link. To install a different java, install the JDK root folder in usr/lib/jvm. It doesn't have to be here, but it makes it easier to go with convention. Run
sudo update-alternatives --config java
In my example this gives

Selection Path Priority Status
0 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 auto mode
1 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 manual mode
2 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual mode

So leave the number as it is, then add to alternatives. I put the number 3 at then end because in my case slots 0 to 2 are already taken.
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.8.0_212/bin/java 3
then repeat
sudo update-alternatives --config java