A simple tile-based 2D game developed with Java and Spring Boot.
Java 17 (JDK 17) or newer is required to build and run this project. The project toolchain is configured for Java 17.
To run the application, execute ./gradlew run (Linux/macOS) or .\gradlew run (Windows) in the project directory.
Maps can be supplied either through the existing programmatic configuration classes or as standalone JSON files. Each JSON file must follow the structure below and be placed under src/main/resources/maps.
{
"id": "example-id",
"displayName": "Example",
"heroStart": { "column": 1, "row": 1 },
"tiles": [[3, 3], [3, 999]],
"items": [[0, 0], [0, 0]],
"enemies": [[0, 0], [0, 0]]
}tilesdefines the terrain using the numeric values fromTileType.itemsandenemiesmatrices default to empty cells when omitted but must match thetilesdimensions when provided.heroStartuses zero-based coordinates and must reference a walkable tile.
At runtime the repository automatically combines programmatic maps and all JSON resources discovered on the classpath.
The following tilesets were used in this project, all licensed under the Creative Commons Attribution 4.0 International License:
- Author: NinaPixelArt
- Copyright Notice: NinaPixelArt
- Link to the work: https://ninapixelart.itch.io/floor-pixel-art-2d
- License: Creative Commons Attribution 4.0 International (CC BY 4.0)
- Disclaimer Notice: The content is provided "as is", without warranty of any kind.
Other graphics used in this project were generated by OpenAI DALL-E.