Author Topic: ML Tetris (mltetris.mo)  (Read 1585 times)

petabyte

  • Freshman
  • **
  • Posts: 77
ML Tetris (mltetris.mo)
« on: May 26, 2021, 02:46:14 AM »
Source code: https://github.com/petabyt/mltetris
Download: https://github.com/petabyt/mltetris/releases/download/0.1.0/mltetris.mo

Of course, I was too lazy to actually write the game myself, so I ported somebody
else's code. (http://spritesmods.com/?art=zx3hack, GPL3)

Demonstration:


theBilalFakhouri

  • Developer
  • Hero Member
  • *****
  • Posts: 1024
  • UHS-I
Re: ML Tetris
« Reply #1 on: May 26, 2021, 08:02:34 AM »
Cool, thanks for sharing

petabyte

  • Freshman
  • **
  • Posts: 77
Re: ML Tetris (mltetris.mo)
« Reply #2 on: November 02, 2022, 11:25:43 PM »
Update:
Will eventually be merged into magiclantern_simplified. https://github.com/petabyt/magiclantern_simplified/tree/tetris
Some notes:
- menu_redraw_blocked is set to 1 to prevent flickering as menu is being drawn.
- task_create is called to keep the ML menus in place after the game is quit.
- Code is based on my project, ptetris (https://github.com/petabyt/ptetris/), which can be compiled and run with X11/rawdraw

dpjpandone

  • Senior
  • ****
  • Posts: 317
Re: ML Tetris (mltetris.mo)
« Reply #3 on: November 19, 2022, 01:26:24 AM »
Does not work on EOSM. The game starts but none of the buttons work.

petabyte

  • Freshman
  • **
  • Posts: 77
Re: ML Tetris (mltetris.mo)
« Reply #4 on: November 19, 2022, 03:13:37 AM »
Should work if you compile it yourself. MODULE_KEY_PRESS macros might be different.

dpjpandone

  • Senior
  • ****
  • Posts: 317
Re: ML Tetris (mltetris.mo)
« Reply #5 on: November 25, 2022, 05:21:17 PM »
I did compile myself, Where to change MODULE_KEY_PRESS macros? you use same format as arkanoid (working) what else could be the problem? Is it because EOSM has "Q" "Set" combined? so game does not start?


Code: [Select]
switch(key)
    {
    case MODULE_KEY_Q:
        running = 0;
        return 1;

game does not start until "Q" ?
The blocks fall, just cannot move or flip them and cannot exit until level fills up and Game Over

petabyte

  • Freshman
  • **
  • Posts: 77
Re: ML Tetris (mltetris.mo)
« Reply #6 on: November 25, 2022, 07:16:30 PM »
Is it because EOSM has "Q" "Set" combined? so game does not start?
Maybe? I don't know, I've never used an EOS M and I'm not familiar with the button macros.
Are you compiling https://github.com/petabyt/magiclantern_simplified/tree/tetris/modules/tetris or https://github.com/petabyt/mltetris?
Wouldn't make sense if none of the buttons work, I assume it must be some kind of major bug. Maybe try in Qemu?

dpjpandone

  • Senior
  • ****
  • Posts: 317
Re: ML Tetris (mltetris.mo)
« Reply #7 on: December 02, 2022, 07:57:21 PM »