Programming project for the Object Oriented and Functional Programming course @ Vrije Universiteit Amsterdam. The project was initially completed in October 2022. The code found in this repository is unchanged from the original at project completion time.
Can you get Atze to all the coffee machines without running into any of the errors that are swarming around?
Disclaimer: The protagonist (Atze) is 100% fictitious, and in no shape or form inspired by Atze von der Ploeg.
Game and engine are implemented completely from scratch, only using the Scala FX library for rendering. All graphics and animations (except for the level backgrounds) are 100% self-made.
- A: Left
- D: Right
- Space: Jump
- Shift: Sprint
- ESC: Pause
To complete a level, you need to bring Atze to all the coffee machines that are scattered throughout the level, so he can enjoy a tasty, steaming hot coffee (sugar optional). Once you have collected a coffee, the machine will show you how many there are left.
Pro Tip: There is usually more than one way to complete a level, and the most intuitive one is often not the fastest. So it might be worth to revisit some levels after completing them.
Note: Due to time constraints (and the need to get some sleep from time to time), the number of levels is still fairly limited
Of course, it wouldn't be a day in the life of Atze if there weren't some pesky syntax errors and warnings lurking begin every corner. You can choose to either have him avoid the errors or to fix them by jumping on top of them. But watch out, if Atze runs into an error (or an error runs into Atze), he will lose a life, and you will need to start the level from the beginning.
You can see how many lives Atze has left in the top left corner. Running into errors or falling out of the map will result in Atze losing a life, or, when there are no more lives left, in the game being over and the score being reset.
Atze can, however, get more lives by earning points. Each coin that he collects will give 10 points, each error that he fixes gives 50 points, plus however many coins the error might have collected, and each coffee also gives 50 points.
Every 1,000 points that Atze collects, will give him an additional life.
Note: I have never came around to turn this game into an executable jar, so the process to run the game is a bit involved... Sorry :(
To run the game, simply run the Super Atze Game configuration. Alternatively, navigate to src/engine/Engine and run the Engine object with a supported Java SDK (developed and tested with Java 12).
If there is an error similar to Class 'engine.Engine' not found in module 'superA', try going to File -> Project Structure -> Module, remove the content root, and re-add the root folder (superA) as the content root.
All the settings can be found in the settings package. Most of these settings should not be changed for a normal execution of the game.
The following settings may need to be adapted depending on the system:
scalingFactor: changes the scaling of the game
To avoid scaling issues with the textures only integer values are possible
screenWidth: changes the width of the window
Values larger than 64 will result in incorrect rendering of the background. The levels are designed for a width of 32
framesPerSecond: changes the frame rate of the game.
60 fps is the ideal setting for a smooth game, however, on weaker systems it is recommended to change it to 30 for better performance. Other values might lead to unintended behavior.
All of these settings are part of the Rendering settings file.
Levels are simple text files (example) with different characters representing different blocks.
To add another level, a new text file can simply be added to the resources/levels directory with the index as the name of the file.
In that text file, the first row needs to include a number that specifies the background/theme of the level (currently three different themes are implemented, so either 0, 1, or 2). The following lines are the actual map of the level. The level length is automatically determined by the length of the longest line in the text file.
This game is not based on any existing game engine but rather written completely from scratch, only using ScalaFX for basic rendering.
As I wanted to have an additional challenge for this project, I chose to use the ScalaFX API for the graphics of the game. The available documentation for this API is fairly limited and I don't think it was ever really intended to be used for games. The process of creating a somewhat usable engine included copious hours of trial-and-error and many frustrated walks to the coffee machine, however, this made each bit of progress even more rewarding.
To keep the amount of "help" from the API to a minimum, I limited myself to only use image and text objects. All animations, camera movements, etc... are built exclusively on top of those.
To get started with the ScalaFX API, I got some inspiration from https://blog.rockthejvm.com/snake/, a blog post about making a very simple snake game in ScalaFX. Any further development came purely from myself, the only other source I considered was the ScalaFX API documentation, which can be found at https://www.scalafx.org/api/8.0/.
All textures and animations are 100% self-made. Only the level background images are made from royalty free images from http://unsplash.com. The used font is a royalty free font and can be found at https://www.dafont.com/super-mario-bros-2.font.
This project has been extremely time-consuming, but at the same time one of the most fun assignments I have worked on so far. There are still a lot of ideas for additional features, so I might continue working on this project in the future.


