It's been a while since my last post, but I'm back with some exciting updates on my game for the Playdate! I finally got my hands on the device, and I must say, it's absolutely amazing. I've been glued to the screen, playing Bomber Panda endlessly.
![lene_guard](https://devforum-cdn.play.date/original/2X/f/fd304f89e9d864327d94caa878cac480b087fde4.png)
As much as I want to bask in the joy of having the Playdate, I've encountered a critical error that's been causing some headaches. When I side load my game onto the device, it crashes after just a minute or two of gameplay. Even with sim settings (throttled and 16mb) I'm not crashing on my laptop.
My immediate goal is to tackle this memory problem head-on. To do that, I'm planning to reduce the number of sprites and active elements in memory. Additionally, I'm considering offloading some of the assets to storage, which can be retrieved as needed. This approach should help avoid overloading the memory and hopefully make the game run smoothly on the Playdate.
I've come up with an idea that involves loading the current room's elements as well as adjacent rooms' elements. By doing this, I aim to enable seamless movement of the player between rooms without maxing out the device's memory.
However, debugging device-only crashes has proven to be quite challenging. I could use some help from those who have experience in this area. If any of you have faced similar issues or have insights on how to effectively debug Playdate-specific crashes, I would greatly appreciate any pointers or advice.
![arilys-gif-32-72](https://devforum-cdn.play.date/original/2X/8/8666f0a206f3d681c872ccd083d8fe04e8e561f8.gif)
Currently, I have some debug code in place, which I know I should remove before shipping. This code allows me to open a text file using pd.file.open("debug.txt", pd.file.kFileWrite)
, where I write debug output. The best part is that this information persists in storage through crashes, unlike console logs, which are not available on the device or after a hard crash in the simulator. If this is not a memory issue and could potentially be a segmentation fault or something similar, I'm hoping that tracking it down using this method might be the key.
Thank you all for your support and insights. Developing for the Playdate has been an exciting journey, and I can't wait to share more progress and updates with you all soon.
![guard-32-72](https://devforum-cdn.play.date/original/2X/5/56c3f03f319c68f9f62d6bcd5eeaa4c6afd48824.gif)