In this tutorial we will build a simple game using FXGL - a Java / JavaFX / Kotlin Game Library. FXGL is built on top of JavaFX, but you don’t need to know JavaFX to follow the tutorial. We will use version 11.13 of FXGL.
The tutorial is divided into a number of chapters that each introduces a new part of the game, and usually a new part of FXGL. Each chapter builds on the previous, so it’s advisable to read and execute them in order. The tutorial is accompanied by a Maven project with one module per chapter, each containing the code for the game as it is at the beginning of the chapter. The Maven project can be found in repository mazela-man. Following the tutorial closely will result in code that looks like the code contained in the following chapter. Experimentation is encouraged, but if you lose your way in the process, you can always start over with a working code base in the following chapter.
All resources used in the tutorial, and a few extras, can be found here.
If you are content with just reading through the tutorial, you can start right away, but if you also want to write code and run the game, you need to install some software on your computer. The following pieces of software are needed to follow the tutorial:
You also need to clone the Git repository of the tutorial. You can do this directly in your IDE, or you can do it on the command line, and then open the tutorial as a Maven project in the IDE.
> git clone https://github.com/dykstrom/mazela-man.git
The best way to start is from the beginning.
You can also jump directly to a specific chapter:
Terms used in the tutorial, explained in the context of FXGL.