-
Notifications
You must be signed in to change notification settings - Fork 3
Getting started
This page will guide you through downloading, installing and using Pikt.
-
Download the Pikt archive and extract its content anywhere.
The archive contains:
-
pikt.jar: the executable; -
colors.properties: the default color scheme; -
colors.pngthe default color scheme as a palette image; -
kotlin-compiler-[version].zip: the Kotlin compiler needed to compile/interpret sources; -
lib/: external libraries, including the stdlib.
-
Unzip the Kotlin compiler anywhere to extract the
kotlincfolder. -
Create a very small (e.g. 5x5 pixels) white image with any editor you like and save it as a PNG file.
I personally use Photoshop, but any pixel art editor will be good.
You may also use the Piskel web app. -
Test if everything is set: run
java -Dsource=<your_image.png> -Dcolors=colors -Dtargets=jvm -Djvmcompiler=<path_to_kotlinc>/bin/kotlinc -jar pikt.jar
This should compile a JAR executable into theout/folder that will do nothing since your source image is empty.
Note: append
.batto the-Djvmcompilerproperty if you are on Windows.
-Dcolorspoints to the.propertiescolor scheme that your program uses, which is the default one in this case.
On-the-fly interpretation is also available:
java -Dsource=<your_image.png> -Dcolors=colors -Djvmcompiler=<path_to_kotlinc>/bin/kotlinc -jar pikt.jar -interpret