Getting Started with Indigo the Scala Based Game Engine with IntelliJ IDEA [Scala]
Indigo is a Scala based game engine for 2D game development. It’s based on Scala.js, and outputs games as Web, Desktop or Mobile. There are several things to setup. This guide will contain steps to setup using IntelliJ IDEA on Windows 10.
First you will need a good shell. You can try powershell, but I found it easier to get this working with WSL Debian. WSL is a way to install Linux distros natively within Windows. There are some quirks, but generally works just like Linux.
I installed mine from the Microsoft store page. You can also use this guide to help you install it: https://docs.microsoft.com/en-us/windows/wsl/install
I recommend using the latest Debian release, and that’s what I will assume for this guide. Next install NodeJS. If you can get it to work using nvm, this is idea. Otherwise, just do a manual install within Debian.
Also I recommend using MobaXterm, which is a window manager that supports various shells and contains X Server. You can get it here: https://mobaxterm.mobatek.net/
Next you want to install Electron, which is a build tool to help deploy web based projects to desktop apps. Indigo uses Scala.js internally, so it will work as a web based game, or allow you to export as a mobile or desktop.
Using node, you can run npm install -g electron
. This is where I got stuck for a while. I think it was because I was using the Debian installation of node via nvm
and it complained about a lot of packages. Good luck with this, and I will post more details if I find anything more helpful.
Next you will need to install Mill, which is a build tool for Scala projects. An alternative is SBT, which is an older tool. I used Mill since this seems to be the recommended option for Indigo. I’m pretty sure you could use SBT with some minor edits, but I will assume Mill was used.
For notes on installing Mill, refer to this: https://com-lihaoyi.github.io/mill/mill/Intro_to_Mill.html. I used the manual install within the WSL Debian. Using Linux/Debian is going to be best for almost all these tools, especially if you have the native non WSL Linux.
At this point, make sure you have Java installed. You can do this in Debian using apt install default-jdk default-jre
which will give you the Java Runtime and Development Kit.
To check it’s working try running mill --version
. It should say something like Mill Build Tool version 0.9.9
and continue on with the Java version.
Now we can start looking into the IntelliJ IDEA setup. First go into IntelliJ IDEA and make sure you install the Scala plugin. This is in the global settings, not in a project setting.
Go ahead and create a new project using Scala. I chose a IDEA based Scala project, and this seems to work well. There are a few files you will need to get the minimal Indigo build working. Here’s some good examples you can use as a guide:
https://github.com/PurpleKingdomGames/blank-indigo-mill
https://github.com/PurpleKingdomGames/indigo-examples/tree/master/demos/snake
The first is the bare minimum, and the second shows a more full example with multiple scenes and using a package name.
You will end up with something like this:

The assets
directory is required, and contains your images and sounds. The game
folder should contain a folder named src
and another named tests
. Make sure to mark the src
folder as a Sources Root in IntelliJ. Then you can add your desired package name inside src
.
See the snake example for how the directory structure relates to the package name. If you change the structure, or filenames, remember you will need to delete the generated out
directory before you can build again.
You can take any of the three example files from the blank-indigo-mill
depending on your type of game. You can now build your project using the following command from the project root directory.
Before you build, edit the build.sc
file, and look for the line that says object mygame
and change this to object game
which is just so that it matches with the structure described. You can now run mill game.buildGame
If you want more debug output, use mill -d game.buildGame
. For running the game in dev mode in a browser, use mill game.fastOpt && mill game.indigoBuild
. This is two commands run together that give you a fast rebuild of the project.
In another shell window, run a http server to view the demo. This is something like ./out/game/indigoBuild/dest
. Navigate to that directory in Debian and run http-server -c-1
. This will give you a web address you can load in your browser. You should see a black rectangle. Also in your JS console, you should see [INFO] [Indigo] Starting Indigo
along with a lot of debug info below.
The rest I will leave up to you! What kind of game will you make? Hope this helps you get started using some great tools for cross platform game development.