Log In  


Classic Picotris

A (mostly) accurate NES Tetris clone

Cart #classicpicotris-8 | 2024-06-26 | Code ▽ | Embed ▽ | No License
22


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.
  • Fully working replay system: after each game a "replay.txt" file is created, simply drag&drop that file into the replay menu to load it. Alternatively, a replay string is copied to your system's clipboard for quick sharing. A Ctrl+V on the replays menu will load the replay currently in your clipboard.

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 when pressing the button as soon as it was locking in place.
  • v1.11
    • Fixed tetris rate calculation.
  • v1.2
    • Fully working replay system.
    • Buttons overlay, useful for viewers to see inputs during a live stream, and during a replay.
  • v1.21
    • Added an option to swap face buttons (Z and X) to the customize menu, useful for controller players.

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 :).

22


Good but where's the music?


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.


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.


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


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?


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:


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!


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.


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


1

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


Yay! Thank you!


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.)


1

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


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?


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



2

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


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.


Oh wow, that's a bizarre bug!

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


2

Sneak peek at version 1.2, currently work in progress:

I updated the changelog on the main post with a summary of all the new features that I'm currently working on.


3

v1.2 released!


Hi,
Could you add an optional blink effect when we clear 4 lines?



[Please log in to post a comment]