Hi all,
I have been working on game project on my clue for a few months now and at this point it seems to have become too large? 1781 lines over 10 .py files at 64Kb. Max 14 sprites on screen at a time. 44 classes. Gc.mem_free() usually reads in the 31,000's range. I've been running into memory allocation errors left and right that I'm guessing are due to the amount of code I'm trying to write. I make sure to call the garbage collector quite regularly but still, creating new files and methods generate the memory allocation error.
I've been running the 6.x CircuitPython firmware and hoped that perhaps upgrading to 7.0.0 alpha may help things. Unfortunately, I couldn't get it to run as there seemed to be a library that used the outdated "gamepad" library that still needs to be migrated to the new "keypad".
Then I stumbled across the Arduino side of things and using C++ and the native libraries. I created an Arduino project and tried some sample code and it seemed to be promising. I began converting my Python project into C++ and realized that it may be quite of a pain. Specifically dealing with bitmap sprites. Thus far I've really enjoyed using displayio on Python and there just doesn't seem to be an established library in C++. I tried Arcada but it still seems that I'll be doing a lot of the display manipulation work myself. I looked for some pre-built libraries or example code for quite a while and didn't really stumble upon anything that seemed to jump out at me.
My questions are this; am I missing something on the Python side? Is my project aggressively large? Should I dig deep into the Arduino side and write a new display/sprite manipulation system?