Settings

Theme

Show HN: Tetris, but silly

unit520.net

389 points by Unit520 4 years ago · 100 comments · 1 min read

Reader

Hello HN!

You can read this [1] blog post if you want to know more about some ideas that I have for this thing. This is just an experiment right now, there isn't any real game (yet). Any feedback would be appreciated, do you think this could become something that would be fun to play?

[1] https://unit520.net/posts/dead-trees-an-absurdist-block-layi...

dwringer 4 years ago

I think this is great and a lot of fun. The only improvement I could suggest is that it only seems to clear the bottom line. If I have an incomplete bottom line, but the row above it settles and fills up, it never clears and the rows just keep stacking higher.

  • gus_massa 4 years ago

    I agree. It's a fun game. My case with a second complete row https://imgur.com/a/sQEQPKM

    After a few games, it quite playable [without using the mouse, that I classify as cheating]. I cleared like 10 or 15 rows and then bad luck stuck :( .

    [spoiler alert] The trick is to try to almost complete the first row. And then aim the new pieces toward the bigger holes in the first row, and toward the inclined blocks in the second row so they open the hole. It's like using the new blocks as hammers. But after a while, if you are unlucky the second row is too even and has no inclined blocks and it's too difficult. Once the 2nd and 3rd row are complete, you are doomed.

    A row counter and detecting other complete rows would add a lot playability. [Fun game anyway, I'm going to play a few more games now.]

  • anyfoo 4 years ago

    Oh, so that's what it was.

    My bottom row was a lost cause, but when I managed to fill up some other rows, they didn't clear, and I thought clearing is not implemented at all and stopped playing...

  • graderjs 4 years ago

    My strategy was just keep cramming more blocks in and wait. Eventually the pressure at the top forces the bottom line to rearrange and clear.

    But I do think the threshold of complete line for the clearing of the bottom should be slightly lower to allow more frequent clearing. I think that would be an improvement that would also increase the playable fun duration.

    PS I love this game I think it's very fun and maybe the tongue-in-cheek bylines should be "physically realistic Tetris"

    I just noticed, as I think other commenters said, only the bottom line clears. I definitely think it would be an improvement, and I hope you consider, to allow other threshold complete lines to clear as well, as that would also I think increase the playable fun duration of the game.

    • yetihehe 4 years ago

      You can drag blocks. When you make some place on bottom and there is enough blocks touching bottom to fill a line (it doesn't need to be continuous) all bottom touching blocks disappear.

  • hermitcrab 4 years ago

    I had the same issue. Good fun though. I remember playing bouncy Tetris where all the blocks had a jelly like consistency.

  • etra0 4 years ago

    I had the same issue, but luckily, with your mouse you can move some of the blocks so you can adjust them to break the first line, and then everything collapses and it's kind of fun to see.

mrlonglong 4 years ago

If you hammer away at the boxes such that it fills up the entire screen the weight of all those boxes is enough to crush the ones at the bottom.

Coolness to the max!

  • kevincox 4 years ago

    Yeah, holding "Down" was an incredibly effective strategy at 5fps. At least until the tab crashed.

    • MauranKilom 4 years ago

      According to console, it gives up at 1 << 16 vertices for drawing, so something like 4000 squares or 1000 tetrominos.

  • _benj 4 years ago

    Nice! I tried it the patient way and, with enough luck, lines actually clear when they are completed!

  • jffhn 4 years ago

    This is how requirements are integrated into the codebase.

  • kazinator 4 years ago

    Reduce friction to minimum first.

bambax 4 years ago

This is an amazing idea. So original and yet so simple and "obvious" in a way... Excellent execution, too. Bravo.

(I didn't understand one could interact with the fallen pieces until I read the comments here. Maybe some hint somewhere would help...?)

(Also, parameters on the left are distracting; better have good defaults and let the user play. Being able to move the pieces with the gyro when on mobile (as suggested in another comment) would be great.)

  • Kiro 4 years ago

    I love it but I don't know how original it is. Tetris with physics like this is very common to implement as a project when learning Box2D.

  • code_runner 4 years ago

    I think goofing around the discovering stuff adds to the fun!

DrPhish 4 years ago

Love it. Tetris is such a well worn cultural institution that its ripe for parody.

Reminded me of this Japanese comedy routine involving Tetris[0]

Totally doesn't need any Japanese language skills to enjoy

[0]: https://www.youtube.com/watch?v=tXpi3JbQiWU

Unit520OP 4 years ago

Thank you all for your nice comments and suggestions, be assured that I read every comment even if I didn't reply to you personally!

I'm glad you liked it and will continue to work on it some more, you had some great suggestions that I certainly want to try out.

dotdi 4 years ago

A funny thing happens if you just press the down arrow and keep it pressed. The game area quickly fills up with squares, and then it just continues to add more shapes until, after a minute or so, the whole page turns black.

  • drdec 4 years ago

    Aborted(Assertion failed: draw_list->_VtxCurrentIdx < (1 << 16) && "Too many vertices in ImDrawList using 16-bit indices. Read comment above", at: ../extern/include/imgui/imgui.cpp,4269,AddDrawListToDrawData)

  • abathur 4 years ago

    I also used this to brute-force completion of lower levels :)

    • balaji1 4 years ago

      doesn't break for me. I am able to continuously clear lower rows. So now I finally feel good playing tetris.

  • colechristensen 4 years ago

    I likewise broke it, bravo!

hubblesticks 4 years ago

Love this! I tried this on my phone and instinctively tried to turn my phone to make the pieces slide around (after seeing the falling/sliding physics), expecting them to react to the gyro in the phone. Then realized, right, this is a web app!

Great work, fun!

  • Unit520OP 4 years ago

    Thanks for the feedback, using the phone's accelerometer is actually a great idea! As others mentioned, there are web APIs for that these days, I'll try to include something like that in the next version.

    • wanderingstan 4 years ago

      Seconding this. Would be great fun. Perhaps not for side to side, but allow for brief reversal of gravity by lurching the phone upwards?

  • stavros 4 years ago

    I'm confused by your comment, web apps can access the accelerometer fine.

dragontamer 4 years ago

Thoughts:

1. Tetris -- Obviously different than Tetris

2. Not Tetris -- https://stabyourself.net/nottetris2/ Similar, but less destructive. Not-Tetris is closer to the original Tetris.

3. Tricky Towers -- https://www.trickytowers.com/ . More similar to this game than Tetris. Tricky Towers blocks aren't destructable, but the physics and very "limited" platform space makes a real game. Special powers (ex: vines) to "solidify" some blocks together really make building higher-and-higher better. The "puzzle" mode of trying to get the most number of blocks with the least height is also very fun.

4. This game -- This is a sandbox for now, the unique part is "impact physics" which can break apart blocks if enough weight / damage were dealt to them. Not a real game yet, but clearly on the path to something fun here. Not sure what the gameplay loop should be, but Tricky Towers is the closest game to maybe draw inspiration from?

_Microft 4 years ago

I like it!

For other players: you can pull and push pieces around if they do not align into proper lines by themselves. Clearing lines works!

  • hermitcrab 4 years ago

    Moving blocks with the mouse feels a bit of a cheat!

  • shaunxcode 4 years ago

    nice. I figured out just holding down space eventually starts clearing a lot of lines until it crashes.

  • ninju 4 years ago

    Yeah...not clear in the instructions or the UI

    You can click and drag the fallen parts to complete a row

    Cool!!!

thematrixturtle 4 years ago

Is there a way to play this on mobile? Tapping makes the pieces drop, but I can't work out a way to control the pieces.

  • jader201 4 years ago

    Came here to ask this. Not sure why this isn’t mentioned more — or is it and I’m just overlooking it?

    Right now the only controls I can figure out on mobile is touch = drop. No way to move anything that I can tell.

aasasd 4 years ago

My favorite variation on ‘silly Tetris’ is Triptych: https://www.youtube.com/watch?v=mM4uZuA1_d0

Quite similar to the OP actually in terms of physics, but with three-in-a-row as the game mechanic.

The game can be found on Internet Archive, as usual with old-ass games: https://archive.org/details/trpsetup

BTW, the left panel in ‘Dead Trees’ seems to have some problem with Retina screens: I can barely discern anything on it. Perhaps the author would want to apply some kind of zoom to compensate.

plank 4 years ago

Funny, did not understand how up play on iPad (clicking only let the blocks go down). I think there are some small bugs in the code, see image (several rows full but not clearing, and there is a block on row 4+5 that overlaps with the full(!) row 4 and the (non-full) row 5. Link: https://www.dropbox.com/s/cm1qbow9h7fvsmw/20220507_093125.jp...

bee_rider 4 years ago

I enjoyed it.

It seems like only full rows in the bottom are counted or something? Or maybe I had a subtle alignment issue. But eventually I got a small gap at the bottom. I ended up with a bunch of full rows, all the way up. Eventually the blocks got over my "dropping point." So, I created a bunch of blocks all at once near the top, compressing all rows below. This caused something to squish into the bottom row, freeing up a little space. 10/10, best compressive tetris mechanism ever.

A shake button would be nice.

  • bee_rider 4 years ago

    If anyone gets in a jammed up position, try putting friction very low, and release velocity to -15, to slam some pieces into the stack and jumble them a bit (so they can relax into a full column).

    At first I thought only having the bottom row delete when filled was pretty annoying, but actually it might make the game, it really plays up the difference from normal Tetris.

    Some variance in the block weight might be nice (2x2 should obviously be heaviest, or you could make the individual... blockletts have different density. Maybe represented by their alpha or brightness or something?)

    I'd like the ability to launch a 2x2 block at a 45 degree angle.

lucb1e 4 years ago

This is fun! Creative idea and nicely made.

https://dro.pm/k.png -- Is this a bug, or are you basically game over once you have a gap in your bottom row and the rest will never line up perfectly enough to disappear?

Edit: resolved it by layering a third full row, then smashing it by luck in the right way to make something drop down to the bottom one. So yes, bottom row always just needs to be filled.

Edit2: Some tricks

- drag a block

- hold down the arrow down button (until the page goes completely blank and you get Aborted(Assertion failed: draw_list->_VtxCurrentIdx < (1 << 16) && "Too many vertices in ImDrawList using 16-bit indices. Read comment above", at: ../extern/include/imgui/imgui.cpp,4269,AddDrawListToDrawData))

- play with the controls on the left of course :)

Also loving that there is no loss condition. The game doesn't tell you when you've lost, you can decide that for yourself!

xigency 4 years ago

This is really cool but I have some feedback: being able to drag the pieces removed all of the challenge, so it wasn’t really fun; only the bottom row will clear - this kind of breaks the game when not “cheating” with manually dragging pieces.

Overall, I think if you fixed those two points this would be a great and challenging game.

utbabya 4 years ago

Feels like a real game to me, I spent good 15 minutes trying to clear the remaining 2 blocks, which is supposedly an impossible state. Turns out when you hold space you randomly lose blocks to the void so you can shift it back to multiplies of 12s by reoding it, meta! I did get the satisfaction of winning the level i created myself by cleaning up the mess back to blank state manually.

ineedasername 4 years ago

Pointless & frivolous. I love it.

There used to be some plugin where you could click a button & be shown a random site that someone had tagged as being interesting for some reason. It was a great way to find all sorts of stuff off the the beaten path like this, but for the life of me I can't remember what it was called to see if it still exists.

Does anyone remember it, or whether or not something similar exists today? I used it around the time Web 2.0 was just coalescing into a major thing.

EDIT: StumbleUpon! Unfortunately it seems a bit closed off, gated by a login & invite code. And the items on the public site look like they're just photos...

  • Hodglim 4 years ago

    You might be thinking of StumbleUpon? (https://www.stumbleupon.com) I used to spend hours on that site!

    • ineedasername 4 years ago

      Yes! That's it! I can't quite tell if their site now is defunct or simply broken.

      It used to be my go-to distraction when I had a job where there was literally nothing to do. (I had been hired into a group where the team lead had already automated everything. The one thing we had to do was bounce the servers every Friday & perform nationwide DB replication w/ local sites. The group was preserved because a of a pending transition that would eventually yield more work, but that was > 0.5 years in the future. The team lead was a good mentor though, and the person who taught me strategic laziness & the constant goal to automate yourself out of a job... Under the theory that you'd then find more interesting things to work on instead. But with an EOL'ed system there were no new projects that could be started)

  • travisdock 4 years ago

    Stumbleupon?

nyanpasu64 4 years ago

I didn't know how to trigger https://unit520.net/deadtrees/ at first (focus the page then use arrow keys). Oddly the first page load hung at a static canvas that stretched as I resized the window, while reloading worked. F12 showed a (false positive) warning:

> wasm streaming compile failed: TypeError: WebAssembly: Response has unsupported MIME type 'application/octet-stream' expected 'application/wasm'

Is this something you want to fix?

  • Unit520OP 4 years ago

    Thanks for reporting!

    Yeah, I'm aware of this error, it seems to be related to the shared hosting I'm using, I can't replicate it when serving locally. But as long as it is "falling back to ArrayBuffer instantiation" all is good, and I didn't investigate further because this fallback mechanism actually loads the WASM module faster than the "streaming compile" method (these things are provided by Emscripten).

    I have no idea why it didn't load on the first try for you though.

swah 4 years ago

I always loved this kind of game and playing with the libraries demos (IIRC box2d) back in the day.

Is this using a port of that? I wish there were more not gaming uses for these kinds of interfaces.

unnouinceput 4 years ago

Thank you for this, bookmarked this one. Going to be an awesome resource for slapping in the face to all those evangelists that chant "browser games are the future" because once you keep pressing down arrow and the screen is filled with rectangles it crawls to a stop at several thousand of them, while a similar implementation in native C++ using Unreal Engine 5 will not break a sweat even at dozens of millions on screen.

  • Unit520OP 4 years ago

    This is actually written in C++ and I compile it to a native executable during development, and yet it crawls to a stop exactly the same, so I'm afraid that that one's on me. :D (It's an inefficiency related to the breakage particles and waits patiently on a big pile of other code TODOs at the moment.)

    Nevertheless, I don't disagree with you on your general sentiment towards browser games, I like fast native executables as well.

daxaxelrod 4 years ago

This reinforces my core belief that people, if given the opportunity, love a good button mashing app.

  • greggsy 4 years ago

    There’s a game called Sand Balls that is incredibly therapeutic. It’s not hard, and doesn’t have too many annoying upsells. Just physics fun.

dugmartin 4 years ago

I had fun going "full auto" with the left, right, down keys. It fills up the screen with a bunch of exploding boxes at first and then alternates between stacking boxes up as it jitters and suddenly wiping out a bunch of rows on the bottom. Super fun.

rashkov 4 years ago

I keep wanting to tilt my phone to influence how the blocks shift around and fall. Very cool! Graphics and responsiveness are truly excellent. Impressive game code, especially on a mobile browser. Can you tell a little more about how this was made?

samadmin 4 years ago

I think this is pretty entertaining. Definitely a nice twist. I get the impression it might need to be made a bit harder somehow. I'm not having problems clearing levels (though I'm definitely enjoying doing it).

goodusername 4 years ago

It was pretty amusing to try and guess how to smash the pieces into order, thanks!

yencabulator 4 years ago

This reminds me of what I recall was called "analog tetris", where you had pixel perfect control of where you dropped the bricks. Aligning them to fill holes was really hard!

e-dt 4 years ago

This is fun. If you turn restitution all the way up and friction all the way down, you can get a passable simulation of a liquid, and then (when temperature is increased) a gas.

butz 4 years ago

This game reminds me of Triptych (http://chroniclogic.com/triptych.htm).

jhgb 4 years ago

> Any feedback would be appreciated, do you think this could become something that would be fun to play?

Combine this with Hatetris, perhaps? Oh, wait, you said "fun"...

WithinReason 4 years ago

Reminds me of the game Tryptich:

https://www.youtube.com/watch?v=mM4uZuA1_d0

lnyng 4 years ago

Is it possible to make use of gravity sensor on phones?

anoncow 4 years ago

Are directional controls possible on mobile?

stanislavb 4 years ago

Tetris, but good and old https://goodoldtetris.com

andrew_ 4 years ago

It's fun to just hold down the spacebar.

zydex 4 years ago

I have to admit I very quickly opted for the bruteforce method of "spam-and-compress" in order to clear rows.

braingenious 4 years ago

This is so fun! It kind of reminds me of Crayon Physics Deluxe, which I played obsessively when it came out.

PaulStatezny 4 years ago

Try sliding all the bars to the left (except sim time scale).

The blocks seem to try to clear themselves. :-)

nathell 4 years ago

Obligatory xkcd: https://xkcd.com/724/ ; there are implementations (google “Hell Tetris”).

aspyct 4 years ago

I wanted to shake things into place on my phone, but it didn't work. So broken :D

Jason_Protell 4 years ago

I love it. Thanks for sharing.

ronald_raygun 4 years ago

I think putting a grid on the background would help with alignment and such

7373737373 4 years ago

There needs to be an awesome-tetris that lists these variants :)

cpitman 4 years ago

This was fun! All I want is some music and sound effects!

dymk 4 years ago

I love seeing imgui in the wild used in stuff like this

Andrew_nenakhov 4 years ago

This is great. Add shaking, and it'll be perfect.

szundi 4 years ago

Just press and hold the down button if you are stuck.

therealmarv 4 years ago

One bug: Full rows above button row are not counted.

ge96 4 years ago

The colors of the tiles are satisfying

artur_makly 4 years ago

the grey beards use to call this… art. but that is just a legend.

UmYeahNo 4 years ago

Just hold space (on desktop anyway)

  • sethammons 4 years ago

    I slid the sliders to the extreme and held space bar and managed to crash it to a black screen :)

alana314 4 years ago

I think I won by not pressing down

joexuyi 4 years ago

Tetris, but mind-blowing.

thanatos519 4 years ago

Awesome!

mustafatorun 4 years ago

cool

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection