-
Notifications
You must be signed in to change notification settings - Fork 0
How to: Cache Levels
UnbelievableFlavour edited this page Jun 8, 2022
·
1 revision
Loading the LDtk levels json files can be a bit slow. However Nic Magnier provided us with a nice little solution to cache your games! Due to development being easier without cache this setting is disabled by default.
Levels will automatically be cached when the cache is not being used.
- Set
useFastLoader
tofalse
inconfig.lua
. - Run the game in the simulator.
- Cached cached levels are created in your PlayDate game's data directory(
<playdate_sdk_location>/Disk/Data/<yourgame>/LDtk_lua_levels
)
The cached files are saved in in your PlayDate game's data directory. You will have to manually copy it over.
- Move
<playdate_sdk_location>/Disk/Data/<yourgame>/LDtk_lua_levels
to<this_project>/Source/levels/LDtk_lua_levels
- finally enable the cache by changing
useFastLoader = true
inconfig.lua