It currently works on JavaFx and web page. Using canvas on both platforms. See ../api/index.html 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.7.4. Jdk 11+, 21 preferred. Scala.Js set to 1.20.1. Scala native set to 0.5.8. Sbt currently set to 1.11.7 (uses the openstrat.sbt file). Note Sbt will not work running on Windows in Git Bash, probably due to the JavaFx dependency. Mill set to 1.0.6.
sbt in bash from project's root folder. From within the sbt console run:
~DevFx/reStart To launch a ScalaFx window. The most useful command for development.~DicelessJs/fastOptJS To rebuild a fast optimised JavaScript file. Use with Dev/DevPages/DicelessSbtFast.htmlDicelessJs/fullOptJS To build a full optimised JavaScript file. Use with Dev/DevPages/DicelessSbtFull.html~Util/test Rerun tests on Util module.~Geom/test Rerun tests on Geom module.~Tiling/test Rerun tests on Tiling module.~Dev/test Rerun tests on, Dev module.~Util/test; Geom/test: Tiling/test; EGrid/test; Dev/test Rerun tests on the 5 modules.unidoc Will produce docs for all the main code in all the modules for the Jvm platform. They can be found in target/3.7.4/unidoc/JsAgg/unidoc Will produce docs for all the main code in all the modules for the Javascript platform. They can be found in
Dev/JsAgg/target/3.7.4/unidoc/bothDoc Will perform both the above tasks.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 if not already existing. Change
the appStr setting in Dev/User/DevSettings.rson to change the application. All the examples on the richstrat.com 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 JavaFx 3D set DevFx/reStart/mainClass:= Some("ostrat.pFx.App3D")
sudo tar -xzf ideaIC-2025.2.4.tar.gz -C /opt
git config --global user.name "MonaLisa"
Check user name properly set
git config --global user.name
MonaLisa
Set git email
git config --global user.email "YourEmail"
Check email properly set
git config --global user.email
YourEmail
Store Github username and token and other useful git commands.
git config --global credential.helper store
git remote show origin
git init --bare myrepo.git
/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-25-openjdk-amd64/bin/java | 2511 | auto mode |
| 1 | /usr/lib/jvm/java-21-openjdk-amd64/bin/java | 2111 | manual mode |
| 2 | /usr/lib/jvm/java-25-openjdk-amd64/bin/java | 2511 | 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/java-17-openjdk-amd64/bin/java 3
then repeat
sudo update-alternatives --config java
echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | sudo tee /etc/apt/sources.list.d/sbt.list
echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | sudo tee /etc/apt/sources.list.d/sbt_old.list
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo tee
/etc/apt/trusted.gpg.d/sbt.asc
sudo apt update
sudo apt install sbt
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb
If any errors appear about missing dependencies you may need to ‘force install.
sudo apt -f install
curl -fSsL https://download.sublimetext.com/sublimehq-pub.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/sublimehq-pub.gpg > /dev/null
echo 'deb [signed-by=/usr/share/keyrings/sublimehq-pub.gpg] https://download.sublimetext.com/ apt/stable/' | sudo tee -a
/etc/apt/sources.list.d/sublime-text.list
sudo apt update
sudo apt install sublime-text
subl --version
Sublime Text Build 4200