Ratings (show detail)
What I have so far.
Running on the real hardware
pew pew pew pew pew
Since CircuitPython is mostly compatible with Python 3, the only thing I really need to run PewPew games on a desktop computer is the pew.py library for handling the display and key presses. Turns out that PyGame is pretty much perfect for this — the code is even shorter than for original PewPew.
I have the emulator working now, available at https://github.com/pewpew-game/pewmulator and I have tested it with the two demo games for PewPew: tetris and snake: https://github.com/deshipu/pewpew/tree/master/games.
Now I can start thinking about the game itself.
Of course the display will need to scroll, and to double (or even triple) the number of colors, I will have some of the dots blink. That should give me enough colors for the monsters, the walls, the doors and the items. Arrows for movement (first press turns, subsequent presses move in that direction), fire for shooting, and second fire for the inventory. Seems doable.
The monsters will be re-spawning (they are behind everything), but the items like ammunition and health packs will not — so you need to find the exit as fast as possible.
Forgot about the Memory
Don't worry, though, because I can put a lot of stuff on the flash. It's not like the disk on the PC — it's almost as fast to access as the RAM. I think I will start with the level map, as that's the biggest thing.
I might also revise my approach to programming this. I somehow naturally levitated towards using objects and classes, because that gives you nice organisation, but on such a limited platform that is really wasteful. For a start I will use slots on the classes, and if that doesn't help, I will rewrite the whole thing into more a procedural way.
Slots to the rescue!
I still want to do level loading directly from the file, because then I can have large levels not limited by memory, but I'm already happy with this outcome.
Slowly thinking about the AI for the monsters, I think I will have a couple of different behaviors, randomly assigned to them, so that they don't just lump into one group in a corner somewhere.
Another failed PyWeek
Anyways, I have walking around a scrolled level and shooting, and I have monsters that simply walk towards you. I didn't implement health or ammo, and you can't get to the next level — which would be the minimal features to make this a game.
I still uploaded what I have, and I think I will be finishing this slowly at my own pace.