• Docs
  • Install
  • Follow @cosplayengine
  • v.0.9.5
  • 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
  • UI Toolkit
  • 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 & JDK 11+

It is recommended to use JDK 11+ when running and developing CosPlay applications. Note that JavaFX, used internally by CosPlay, is a modularized library and produces a warning every time CosPlay runtime starts complaining that it is started from the unnamed module (since Scala does not support JPMS). Consult the following Java and Scala compatibility table for support JDK versions.

Note also that default build.sbt assumes that current JDK does NOT bundle JavaFX and JavaFX library is attached to the classpath by SBT. Using JDK that bundles JavaFX can lead to undefined behaviour.

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

Mill Maven
                libraryDependencies += "org.cosplayengine" % "cosplay" % "0.9.5"
                
                def ivyDeps = Agg(
                    ivy"org.cosplayengine::cosplay:0.9.5"
                )
                
                <dependency>
                    <groupId>org.cosplayengine</groupId>
                    <artifactId>cosplay</artifactId>
                    <version>0.9.5</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.9.5 Latest: