A downloadable game for Windows, macOS, and Linux

A game where you modify the source code during the program's execution. The language in question is JavaScript. The version of such depends on the version of Java you currently have. Since this JAR is compiled in Java 8, the code is written in version ES5. If you have a more modern version of Java, you can use the ES6 features.

It is very short, if you want extra content, add it yourself lmao.

Here are the docs of the "game" object:

  • number windowWidth (read-only)
  • number windowHeight (read-only)
  • function loadImage(string name, string path)
  • function loadSound(string name, string path)
  • function loadMusic(string name, string path)
  • function mouseX() returns number
  • function mouseY() returns number
  • function leftMouseClicked() returns boolean
  • function rightMouseClicked() returns boolean
  • function middleMouseClicked() returns boolean
  • function leftMousePressed() returns boolean
  • function rightMousePressed() returns boolean
  • function middleMousePressed() returns boolean
  • function setTitle(string name)
  • function setFPS(int  fps)
  • function setColor(int r [0-255], int g [0-255], int b [0-255], int a [0-255])
  • function drawRect(number x, number y, number width, number height)
  • function fillRect(number x, number y, number width, number height)
  • function drawImage(string name, number x, number y)
  • function drawImage(string name, number x, number y, number width, number height)
  • function drawImage(string name, number x, number y, int srcX, int srcY, int srcWidth, int srcHeight)
  • function drawImage(string name, number x, number y, number width, number height, int srcX, int srcY, int srcWidth, int srcHeight)
  • function drawImage(string name, number x, number y, boolean flipX, boolean flipY)
  • function drawImage(string name, number x, number y, number width, number height, boolean flipX, boolean flipY)
  • function drawImage(string name, number x, number y, int srcX, int srcY, int srcWidth, int srcHeight, boolean flipX, boolean flipY)
  • function drawImage(string name, number x, number y, number width, number height, int srcX, int srcY, int srcWidth, int srcHeight, boolean flipX, boolean flipY)
  • function drawString(string text, number x, number y) - Each character is 6 pixels long
  • function scale(number x, number y)
  • function rotate(number degrees)
  • function translate(number x, number y)
  • function getScaleX() returns number
  • function getScaleY() returns number
  • function getRotation() returns number
  • function getTranslationX() returns number
  • function getTranslationY() returns number
  • function playSound(string name)
  • function playMusic(string name)
  • function playMusic(string name, boolean loop)
  • function stopMusic()

Also, here are some bonus util functions located in the game's code:

  • function changeEntityProperty(string entityID, string property, value)
  • function setTime(int x, int y, int id) - 0 for air, 1 for ground, 2 for key and 3 for toxic fluid

Download

Download
Source Code 276 kB
Download
The Runtime 11 MB

Install instructions

java

Leave a comment

Log in with itch.io to leave a comment.