• Docs
  • Install
  • Follow @cosplayengine
  • v.0.8.1
  • 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
  • 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.

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
                    $ mvn package

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

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

The game looks like that:

Built-In Terminal Emulator

By default, the game starts in the system terminal. If you want to run this examples in the built-in terminal emulator you need to add emuterm as a program argument. Depending on how you start the game - SBT, Maven, IDE or straight command line - this is done differently. For example:

Maven
                    $ sbt "project cosplay; runMain org.cosplay.games.macarena.CPMacarenaGame emuterm"
                
                    mvn -f modules/cosplay -P macarena exec:java -Dexec.arguments="emuterm"
                
  • On This Page
  • Macarena
  • Quick Links
  • Discord
  • Stack Overflow
  • GitHub
  • @cosplayengine
  • YouTube
  • API
Copyright © 2023 Rowan Games, Inc. Privacy • Docs release: 0.8.1 Latest: