• Docs
  • Install
  • Follow @cosplayengine
  • v.0.8.8
  • GitHub
  • Watch
  • Examples
  1. Home
  2. Install

Install

  • Introduction
  • Install
  • ASCII Games
  • Demos
  • Examples
  • Macarena
  • Pong
  • Snake
  • Bird
  • Developer Guide
  • Quick Game 🏃
  • Key Concepts
  • Game Structure
  • Scenes & Objects
  • Log & Debugging
  • Pixels & Colors
  • Images
  • Keyboard Input
  • Sprite Animation
  • Shaders
  • Particle Effects
  • Fonts
  • Canvas Drawing
  • Text Input
  • Camera Tracking
  • Tile Mapping
  • Audio
  • Video
  • Build & Run

Support

For any questions, feedback or suggestions:

  • File a bug or improvement in Issues
  • Post a question at  Stack Overflow using cosplay tag
  • Join project on GitHub and chat on Discord

License

By installing CosPlay you are agreeing to Apache 2.0 License terms & conditions.

Prerequisites

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.

Java 17+

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.

Maven/SBT

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 0.8.8.

Mill Maven
                libraryDependencies += "org.cosplayengine" % "cosplay" % "0.8.8"
                
                def ivyDeps = Agg(
                    ivy"org.cosplayengine::cosplay:0.8.8"
                )
                
                <dependency>
                    <groupId>org.cosplayengine</groupId>
                    <artifactId>cosplay</artifactId>
                    <version>0.8.8</version>
                </dependency>
                

GitHub

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:

Maven
                $ sbt clean package
                
                $ mvn clean package
                

To build and check Scaladoc run SBT:

            $ sbt doc
        
  • On This Page
  • Support
  • Maven/SBT
  • GitHub
  • Quick Links
  • Discord
  • Stack Overflow
  • GitHub
  • @cosplayengine
  • YouTube
  • API
Copyright © 2023 Rowan Games, Inc. Privacy • Docs release: 0.8.8 Latest: