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

Macarena

  • 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

Macarena

Ascii Macarena is a built-in game that ships with the CosPlay. This is a simple 100 lines of code game with a five cute stick-figures dancing Macarena. Each of the five dancers can be turned on and off by pressing his number key 1 through 5 on the keyboard. This game comes pre-packaged with CosPlay.

To play this game run the following commands:

Maven From IDE
                    # One-time Git clone & build:
                    $ git clone https://github.com/nivanov/cosplay.git
                    $ cd cosplay

                    # To run the game:
                    $ sbt "project cosplay; package; runMain org.cosplay.games.macarena.CPMacarenaGame"
                
                    # One-time Git clone & build:
                    $ git clone https://github.com/nivanov/cosplay.git
                    $ cd cosplay

                    # To run the game:
                    $ mvn -f modules/cosplay exec:java -P macarena
                

From IDE just execute this class: org.cosplay.games.macarena.CPMacarenaGame

The game looks like that:

SBT & Maven

CosPlay comes with support for both SBT and Maven builds. Running examples and built-in games via SBT will automatically use terminal emulator since both SBT and CosPlay use JLine library and SBT therefor uses Java process fork to launch the examples and games. If you want to run directly in the terminal console using pure text-mode - use Maven method instead.

  • On This Page
  • Macarena
  • Quick Links
  • Discord
  • Stack Overflow
  • GitHub
  • @cosplayengine
  • YouTube
  • API
Copyright © 2023 Rowan Games, Inc. Privacy • Docs release: 0.9.5 Latest: