I create a complex Spring Boot simulation with React and Phaser. The simulation can be configured by the user and saved within a session. I have a PNG file for the different tiles of the simulation (65x65 pixels for each tile). When the React component is mounted with the phaser engine, the Phaser.Game is initialized, the PNG file is loaded into the preload function, and the tilemap is loaded with
If I understood it correctly, the JSON defines the complete tilemap. But I don’t understand how I’m supposed to be the structure of the JSON to be returned by this REST call.
My simulation consists of 3 layers:
- static background of walls / solids
- dynamic immovable elements to be set / removed by the simulation via websocket, but through which the moving figures can pass
- dynamic moving figures which are continuously changed via a web socket
I am working with phaser for the first time, so I need some help how to realize this project in detail.
Thank you a lot for help