Yet another Tetris

new games to be launched and discussed here
Post Reply
User avatar
ctr
Posts: 140
Joined: Wed Jul 16, 2014 2:53 pm
Contact:

Yet another Tetris

Post by ctr » Sun Feb 12, 2017 5:26 pm

A couple of threads about Tetris reminded me that I wrote one for the BBC Model B many years ago. Screenshots and ssd are attached.

My impressions after more than a quarter of a century:

Pros
  • * Responsive
    * Smooth animation of falling pieces
    * Fast loading
    * Patterns on blocks rotate with blocks
    * Key selection
    * No sound
Cons
  • * No preview of next piece
    * No pause
    * Boring scoring
    * Acceleration is too slow
    * Clearance bonus causes sudden acceleration
    * Playing area too tall
    * American spelling of preferred
    * No sound
Despite these flaws I think it's quite playable. Give it a whirl!

EDIT: This is the latest version: tetris.ssd.zip

The original version is below.
Attachments
tetris.ssd.zip
The original version from 1991
(2.95 KiB) Downloaded 76 times
tetris2.png
tetris.png
Last edited by ctr on Sat Jul 15, 2017 11:35 pm, edited 1 time in total.

User avatar
pixelblip
Posts: 665
Joined: Wed Feb 04, 2015 7:19 pm
Contact:

Re: Yet another Tetris

Post by pixelblip » Sun Feb 12, 2017 8:03 pm

I just played your game........very good.........can't be easy writing a game like Tetris. The colours are tasteful. Always liked magenta and yellow!
It's an infuriating game to play isn't it :D
I like the shading you did on the tiles as well...........thanks for posting it up. =D>

User avatar
ctr
Posts: 140
Joined: Wed Jul 16, 2014 2:53 pm
Contact:

Re: Yet another Tetris

Post by ctr » Mon Feb 13, 2017 12:46 pm

Cheers, I'm glad you liked it. It is infuriating, I wasted most of Sunday trying to get a good score. I seem to recall young me being much better at it. :-)

User avatar
FourthStone
Posts: 517
Joined: Thu Nov 17, 2016 2:29 am
Location: Melbourne, Australia
Contact:

Re: Yet another Tetris

Post by FourthStone » Tue Feb 14, 2017 7:18 am

Great effort!

Like that no sound is a pro and con haha :lol: Animation is nice and smooth although I did have a few pieces drop 2 in a row at times, might just be a timing thing or my fat fingers but it happened semi regularly.

Love that you can choose your own keys!

Planning to do any further dev work on it?

User avatar
ctr
Posts: 140
Joined: Wed Jul 16, 2014 2:53 pm
Contact:

Re: Yet another Tetris

Post by ctr » Wed Feb 15, 2017 4:57 pm

Are you tapping or holding the drop key? You only need to tap it once. If you hold it for the duration of the drop it is quite hard to time the release to avoid a second drop.

I hadn't planned to do any further work on it but I did want to have a look at the code. Doing that on the BBC was painful so I moved it to the PC, and then I made it build in beebasm and then I starting adding a few comments... So I'll see where it goes.

User avatar
FourthStone
Posts: 517
Joined: Thu Nov 17, 2016 2:29 am
Location: Melbourne, Australia
Contact:

Re: Yet another Tetris

Post by FourthStone » Thu Feb 16, 2017 7:22 am

Are you tapping or holding the drop key?
I had another play and couldn't get it to happen if I was careful about not holding the tap button so must of just been the timing thing... something to look at for a future release if you decide develop further, maybe allow a drop only if previous drop key press is released.

Development has become a joy again now that tools like beebasm are available, I love being able to throw code together using modern tools, compile, boot beebem and try it out immediately.

User avatar
dgrubb
Posts: 142
Joined: Thu Jun 02, 2016 8:36 pm
Contact:

Re: Yet another Tetris

Post by dgrubb » Thu Feb 16, 2017 7:01 pm

ctr wrote:Despite these flaws I think it's quite playable. Give it a whirl!
It's really great. Thanks!

User avatar
ctr
Posts: 140
Joined: Wed Jul 16, 2014 2:53 pm
Contact:

Re: Yet another Tetris

Post by ctr » Fri Feb 17, 2017 6:46 pm

dgrubb wrote:It's really great. Thanks!
Thank you!
FourthStone wrote:Development has become a joy again now that tools like beebasm are available, I love being able to throw code together using modern tools, compile, boot beebem and try it out immediately
This is so true. I can hit F5 in notepad++ and in less than two seconds the code is compiled and running in beebem!

So I fixed a few of the issues. A new version is attached.
  • * Clear the keyboard buffer when starting a new piece. I hope this will fix the double-dropping.
    * The (extremely rare) clearance bonus no longer affects the speed.
    * Escape now pauses with an option to quit.
    * Correct spelling of "preferred".
Attachments
tetris.ssd.zip
(2.65 KiB) Downloaded 29 times
tetris3.png

User avatar
MartinB
Posts: 4708
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity
Contact:

Re: Yet another Tetris

Post by MartinB » Fri Feb 17, 2017 8:49 pm

Just had a play - it's really good, well done! =D> 8)

Have to report though that I did have about three 'double drops' in the game below...
ctr's tetris 001.png

User avatar
ctr
Posts: 140
Joined: Wed Jul 16, 2014 2:53 pm
Contact:

Re: Yet another Tetris

Post by ctr » Sun Feb 19, 2017 6:23 pm

MartinB wrote:Just had a play - it's really good, well done! =D> 8)

Have to report though that I did have about three 'double drops' in the game below...
Thank you!

I'm nearly certain that running on a real beeb a second piece won't drop unless the drop key is still physically pressed.

I think the problem is possibly the latency of a modern keyboard communicating through (possibly congested) airwaves or USB, the OS driver stack, the window manager and the emulator. There could be quite a sizeable delay between a key release and the emulated code becoming aware of it.
FourthStone wrote:maybe allow a drop only if previous drop key press is released
This seems like the right fix. It's a shame I need to alter my code to work around what is most likely an emulation issue, but it's not something the emulator can fix in software.

New version attached.
Attachments
tetris.ssd.zip
(2.67 KiB) Downloaded 37 times

Michael Brown
Posts: 2004
Joined: Sat Apr 03, 2010 12:54 pm
Location: Nottingham
Contact:

Re: Yet another Tetris

Post by Michael Brown » Sun Feb 19, 2017 7:54 pm

Great to see another game for the Beeb!

The fix you did for the drop is great but could you do the same for the rotate key as under BeebEm your tile spins around mega fast if you keep your finger on the key.

regards,
Mick.

PS Would you mind if I included this game on one of my future games disc compilations?

User avatar
ctr
Posts: 140
Joined: Wed Jul 16, 2014 2:53 pm
Contact:

Re: Yet another Tetris

Post by ctr » Mon Feb 20, 2017 8:27 pm

Michael Brown wrote:Great to see another game for the Beeb!

The fix you did for the drop is great but could you do the same for the rotate key as under BeebEm your tile spins around mega fast if you keep your finger on the key.
Cheers. I always regarded the rotation as harmless, but if it's giving people trouble I'm happy to stop it. A new version is attached.
Michael Brown wrote:PS Would you mind if I included this game on one of my future games disc compilations?
Not at all, go ahead. Assuming you're not making a fortune from them! :-)
Attachments
tetris.ssd.zip
(2.67 KiB) Downloaded 89 times

Post Reply