For any questions, feedback or suggestions:
By installing CosPlay you are agreeing to Apache 2.0 License terms & conditions.
CosPlay APIs require Scala 3 and CosPlay runtime requires JDK 11+.
CosPlay & JavaFX
CosPlay uses JavaFX technology for its support for audio playback. JavaFX is a platform-specific SDK that is widely available for many platforms. Since JDK 11 the JavaFX is no longer a part of the official JDK from Oracle and is now a separate OpenJFX open source project. Some third-party JDK implementations may not provide support for JavaFX making CosPlay incompatible with these JDKs.
Make sure to use and/or bundle JDKs that are compatible with JavaFX.
When running CosPlay game under Java 17+ you need to add additional JVM command line parameter
--add-opens javafx.graphics/com.sun.javafx.application=ALL-UNNAMED for JavaFX to operate correctly. Note that when running examples and built-in games from project's Maven or SBT, this parameter is set automatically.
To start building games with CosPlay add the following Maven dependency to your Scala project. CosPlay consists of a single module that includes game engine APIs, prefabs, as well as all examples and demo games.
Latest version is
libraryDependencies += "org.cosplayengine" % "cosplay" % "0.8.10"
def ivyDeps = Agg( ivy"org.cosplayengine::cosplay:0.8.10" )
<dependency> <groupId>org.cosplayengine</groupId> <artifactId>cosplay</artifactId> <version>0.8.10</version> </dependency>
If you want to contribute to the project you need to get the full developer snapshot from GitHub:
$ git clone https://github.com/nivanov/cosplay.git
You can use either Maven or SBT to build CosPlay. You can open
pom.xml using any IDEs or use it with any editor of your choice to develop CosPlay. You can use SBT
build.sbt to compile, build and create Scaladoc docs.
To build an all-inclusive single JAR that you can use for native terminal testing run:
$ sbt clean package
$ mvn clean package
To build and check Scaladoc run SBT:
$ sbt doc