Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tetris?
#6
(04-30-2015, 05:42 PM)wiegraf Wrote: Any chance of putting the code up on Github? I'd be interested to see how you implemented the game on the NGPC.

I'll see what can be done, I could also mail them.
.
It's assembly only.

The playfield is represented by a bit table (each line is a word), collision detection is done for each line of a filling block using a logical and function. If result is not zero, then pieces collides, so the move cannot be done.

The main issue is the way I handle falling speed.
When I started the developpement, I had no idea of the maximum falling speed I could achieve using vsync, the result was too slow to provide challenge, so I used a lazy way... Slower speed are achieved by waiting for 1 or more vsync, as fastest speed is achieved by moving a block 2 pixels downward instead of only one.
Reply


Messages In This Thread
Tetris? - by wiegraf - 04-29-2015, 11:21 PM
RE: Tetris? - by Loïc - 04-30-2015, 05:11 PM
RE: Tetris? - by wiegraf - 04-30-2015, 05:17 PM
RE: Tetris? - by Loïc - 04-30-2015, 05:39 PM
RE: Tetris? - by wiegraf - 04-30-2015, 05:42 PM
RE: Tetris? - by Loïc - 04-30-2015, 06:00 PM
RE: Tetris? - by wiegraf - 04-30-2015, 06:03 PM
RE: Tetris? - by Loïc - 04-30-2015, 06:33 PM
RE: Tetris? - by wiegraf - 04-30-2015, 10:44 PM
RE: Tetris? - by Loïc - 04-30-2015, 11:03 PM
RE: Tetris? - by wiegraf - 05-02-2015, 01:38 PM
RE: Tetris? - by Loïc - 05-04-2015, 05:44 AM
RE: Tetris? - by sodthor - 05-05-2015, 12:48 AM
RE: Tetris? - by Loïc - 05-05-2015, 12:56 AM
RE: Tetris? - by sodthor - 05-05-2015, 07:38 PM
RE: Tetris? - by Loïc - 05-05-2015, 11:59 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)