Log In  

Classic Picotris

A (mostly) accurate NES Tetris clone

Cart #classicpicotris-6 | 2024-04-09 | Code ▽ | Embed ▽ | No License
18


Features:

  • NES Tetris scoring, speed, DAS behavior, blocks rotation and spawn.
  • On screen DAS gauge.
  • Four different themes to choose from.
  • A "Customize" screen with some gui options, like showing/hiding the DAS gauge and stats.

Known problems:

  • The left/right block movement sfx is not perfectly synced to the actual movement of the block. I tried to understand the problem but to no avail, so a help here is highly appreciated.

Changelog:

  • v1.0 Release version.
  • v1.01 Current level and lines cleared don't reset after you start a new game, making them easier to be read after the game ends.
  • v1.02 Fixed a bug that was causing a crash when trying to rotate a piece at the bottom of the board.
  • v1.03 Fixed score overflowing and crashing the game when scoring a tetris on levels >27.
  • v1.04 Fixed game crashing when locking a piece on the board while it was partly hidden by the top of the field. (Thanks @packbat!)

  • v1.1
    • Added Tetris Rate counter.
    • Added Drought counter. Default behavior is "dynamic", only appearing when the drought value is >= 15.
    • Added settings for tetris rate and drought.
    • Fixed the tetromino rotating if pressing the button as it was locking in place.
  • v1.11
    • Fixed tetris rate calculation.

Tested extensively on levels 18 and 19~28.


As always, here's another project that I started because I was bored and I just wanted to put down some code.
Since I love Tetris, I wanted to understand how Tetris is made "under the hood", so making a Tetris clone looked like good enough challenge. I decided to make a clone of NES Tetris since it's the one that I like the most and I'm most accustomed to (NES Tetris is the Tetris used during CTWC, the Classic Tetris World Championships), so I already had a pretty good grasp of how it feels to play.

I wanted to make a minimal, functional game, with no frills or super amazing graphic effects, just something that I can use to train and to play Tetris using Pico-8, instead of having to rely on often laggy NES emulators.

I really learned a lot while making this, trying to overcome difficulties and studying how NES Tetris is working.
In the current state, I'm confident the game is pretty much done, with just a handful of (really minor) bugs, and I know it because it's been in this state for at least two months, but I always played the game instead of completing the final touches needed for submitting it. That, in my book, is a good sign of a game that works.

Please let me know if you find some bugs, if you want additional features to be added (for example, I'm thinking about a drought counter and Tetris rate counter like in the CTWC hud), and have fun :).

P#136143 2023-10-20 15:47 ( Edited 2024-04-09 11:01)

Good but where's the music?

P#136202 2023-10-21 23:32
2

@Leandro
Music was not something that I felt it was needed, not for me at least. I usually play Tetris when I’m watching something on Youtube or when I’m listening to other music, so, even with the NES version, it’s always sfx only or straight up muted.

P#136204 2023-10-22 00:17
1

This is a very enjoyable version of Tetris - much appreciated! I don't know much about Tetris but the I have also heard of the CTWC, and playing this I've started remembering bits of the video where the late Jonas Neubauer taught Rob Scallon some basics.

Separate from all that, I did stumble over a bug tonight - I would call it minor but it did crash the game. I'm not certain how it works, but I was able to capture a gif of the final seconds of the game so hopefully that should help with debugging:

Other than that? I'd like to be able to skip the delay after losing and start another game right away, but that might be just me being impatient. It's a very fun port and I've been playing way more Tetris since I came across it.

P#138885 2023-12-19 03:50

I feel like Tetris only needs a sound when I clear a certain line Fnaf

P#138927 2023-12-20 07:01
1

what a coincidence. the project I picked for learning Pico-8. I even named it Picotris as well. Also learned a lot about different Tetris implementations in the recent weeks. I think my version is some bastard version of all the information I found so far. But definitely with the classic rotation system because that seemed easier to implement. will post it once it's fully done. will definitely pick your version apart to see how you approached the implementation.

I see that you are not using the Pico standard font. is this a custom font? or is there a small font mode available in Pico?

P#138934 2023-12-20 13:52 ( Edited 2023-12-20 15:31)
2

@packbat
Glad you're enjoying it. Thanks for the GIF, it's super useful and I'm gonna try to fix the bug soon.

@bernardo
Your version looks good too! Be prepared for lots of spaghetti code and weird hacks if you decide to watch my code, as I too worked on the game by studying the wikis and going "by feel" playing the NES version side by side a lot.

The font is a "secret" pico-8 small font. To use it, print your string in all caps, using an external editor, like this:

P#139989 2024-01-11 15:30 ( Edited 2024-01-11 15:41)
1

Aha!

It's hard to see here because I was holding a key so the cart instantly closed back to Splore when it crashed - Here's the exact frame with the error message:

...but I think when it crashes might be as simple as a piece sticking off the top of the screen when it lands.

Also, I need to be less greedy and stop building to the moon waiting for the I piece. But more importantly, bug info!

P#140383 2024-01-21 01:02

Oh, that's a funny little bug!

I'm guessing it has to do with rotating on the exact frame it would have landed or something.

P#140589 2024-01-25 04:09

if you put the tetrominos offscreen, the game gets an error message for a nil. value. Pls fix it.

P#140702 2024-01-27 14:41
1

@packbat @fnf_pro Fixed the bug crashing the game when locking a tetromino offscreen.

P#140889 2024-01-30 19:56

Yay! Thank you!

P#140903 2024-01-31 00:00
1

Oh my gosh, what just happened there?

(Besides me still building too high, obviously.)

(Also, thanks again for making this! It's kind of become my go-to thing to do while listening to a YouTube video.)

P#142076 2024-02-27 21:37
1

@packbat cool bug, that should have been a game over

P#142088 2024-02-27 22:47
2

New best score tonight 😊

I really enjoy your game on my Miyoo Mini Plus.
It’s the most responsive version of classic I have found !
I still struggle at lvl 16 but doesn’t seems like it’s the game’s fault 😅

Thanks for your amazing game 😊
Adding a Tetris pourcentage would be really nice.

Any other players on MM+ with native Pico-8?

P#145597 2024-04-03 19:00 ( Edited 2024-04-03 19:01)

@titousky Amazing, looks like the perfect Pico-8 portable machine

P#145598 2024-04-03 19:04
2

@fnf_pro @packbat @titousky
New version uploaded, which fixes the rotating-while-landing bug, and adds a tetris rate and drought counter. Enjoy!

P#146146 2024-04-09 10:07 ( Edited 2024-04-09 10:08)

FYI sometimes I randomly get 0.5 or 1 second freeze on the latest version, playing on the Miyoo Mini Plus.
It's very rare (sometimes doesnt happen for 2 hours) but it never occured on the previous version.

P#146899 2024-04-18 20:15

Oh wow, that's a bizarre bug!

Thanks again for making this - I have no idea how this one happened...

P#147211 2024-04-23 21:10

[Please log in to post a comment]