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.
Versions
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.8.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.8.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")