magiclantern_simplified
magiclantern_simplified copied to clipboard
Add basic tetris to dev
A few notes:
- "ptetris" is a minimal tetris library I made. It interfaces with a common "binding" to IO. https://github.com/petabyt/ptetris/
- Code doesn't recompile when ptetris.h is modified
- Needs better field checking. Currently doesn't check out of field after rotating
-
menu_redraw_blocked
is set to1
to prevent tetris rendering to flicker as menu is being drawn. -
task_create
is called to keep the ML menus in place after the game is quit.
Test merge worked. Bugs found:
- pieces can spawn outside of the boundary, and then they cannot be moved into play. Seems to happen if piece was dropped at either edge and cursor left there, some pieces then spawn incorrectly
- square block never spawns, so presumably something around the RNG is incorrect
- sleeploop variable is never referenced and should be removed (triggers a compiler warning)
- the left- and right-handed S pieces are the same colour! It hurts my brain!
It's a cool mini-tetris :)
Some of those issues seem familiar. I've got an updated ptetris.h that I never pushed, I'll add it later
Fixed all of the things you mentioned. IMO it's very playable at this point. Could still use some minor improvement (better visuals, better controls) but for tetris on a DSLR it's not bad :)