Hey Folks,
I'm having trouble attempting to compile the Level_1-1 example in VS Code on my M2 MacBook using the template at: GitHub - cadin/playdate-vscode-template: VS Code template with tasks for building and running in Playdate simulator..
The compiler never adds the json files to datastore and so the call in LevelLoader.lus
for local s = playdate.file.getSize(path)
fails and I error out at the call to json.decode(levelData)
.
I've used this template to build other examples and my own projects without issues, albeit not ones that use .json. Any ideas where I should look to hunt down why VS Code is so scared of these json files?
A couple of things I've tried so far are:
- Moving the files into a sub directory:
levels
- Creating new .json files and copying the contents of the old ones:
Level_1-2.json
- Calling the files files with and without the extension:
local level = Level('levels/level_1-2')
andlocal level = Level('levels/level_1-2'.json)