Now the game can load images for graphics. Also the right click menu action “Examine” is hooked up to the server scripts and as a test they can create an object, which is a purple square at 0,0.
Every game asset has a json file that describes it. I created an AssetManager class that loops through all the json files and loads their sprite (only sprites for now). The server tells the client what “model” (a string) an object/tile is using, and then the client looks that model up in the AssetManager.
Contents of mario.json:
{
"mario":
{
"sprite": "mario.png"
}
}