top | item 47145082

Show HN: Linex – A daily challenge: placing pieces on a board that fights back

82 points| Humanista75 | 5 days ago |playlinex.com

Hi HN,

I wanted to share a web game I’ve been building in HTML, JavaScript, MySQL, and PHP called LINEX.

It is primarily designed and optimized to be played in the mobile browser.

The idea is simple: you have an 8x8 board where you must place pieces (Tetris-style and some custom shapes) to clear horizontal and vertical lines.

Yes, someone might think this has already been done, but let me explain.

You choose where to place the piece and how to rotate it. The core interaction consists of "drawing" the piece tap-by-tap on the grid, which provides a very satisfying tactile sense of control and requires a much more thoughtful strategy.

To avoid the flat difficulty curve typical of games in this genre, I’ve implemented a couple of twists:

1. Progressive difficulty (The board fights back): As you progress and clear lines, permanently blocked cells randomly appear on the board. This forces you to constantly adapt your spatial vision.

2. Tools to defend yourself: To counter frustration, you have a very limited number of aids (skip the piece, choose another one, or use a special 1x1 piece). These resources increase slightly as the board fills up with blocked cells, forcing you to decide the exact right moment to use them.

The game features a daily challenge driven by a date-based random seed (PRNG). Everyone gets exactly the same sequence of pieces and blockers. Furthermore, the base difficulty scales throughout the week: on Mondays you start with a clean board (0 initial blocked cells, although several will appear as the game progresses), and the difficulty ramps up until Sunday, where you start the game with 3 obstacles already in place.

In addition to the global medal leaderboard, you can add other users to your profile to create a private leaderboard and compete head-to-head just with your friends.

Time is also an important factor, as in the event of a tie in cleared lines, the player who completed them faster will rank higher on the leaderboard.

I would love for you to check it out. I'm especially looking for honest feedback on the difficulty curve, the piece-placement interaction (UI/UX), or the balancing of obstacles/tools, although any other ideas, critiques, or suggestions are welcome.

https://www.playlinex.com/

Thanks!

38 comments

order

vunderba|5 days ago

As a fellow amateur game dev, nice job!

Unfortunately, I (and likely many others on HN) am pretty sign-up adverse, and since this game seems like it should be perfectly playable 100% client-side, I think this is going to really hurt adoption.

unsnap_biceps|4 days ago

Yeah, I was excited to give it a try but I won't sign up without at least trying a few puzzles first.

unholiness|3 days ago

I like it!

One big annoyance with the power-ups is that the failure condition is checked before you can use them. It's particularly painful since they all replace the current piece, so they seem tailor-made to get rid of a nasty piece that would cause you to lose... but then they have to be used before you get to that piece that would cause you to lose!

Anyway, both times I played I got in the 40s without any power-ups used, then saw that the next piece would cause me to lose but none of the powers could save me. Probably the ideal fix is just to not trigger a loss while you still have powers?

Humanista75|3 days ago

Yes, exactly, good idea! I have this on my mind, and now I'm thinking about the best way to adopt it.

Humanista75|4 days ago

Thank you all so much for your comments. Regarding the possibility of playing without logging in, I've modified the code to allow it. You can now try my game without logging in ;)

nhhvhy|3 days ago

Thanks! Fun game.

c0balt|4 days ago

This looks nice but the initial sign-up barrier seems unnecessary. I don't want to create an account and validate my e-mail address before knowing what the challenges and the app actually are. This also introduces a 30s to 2m window until the confirmation e-mail is delivered.

It might improve the flow to first letting them play a challenge (does not have to be daily challenge, e.g., just the demo tetris-like game from the starting page) and then introduce the account sign up afterward.

c0balt|4 days ago

To comment on the actual game (tested on Firefox desktop):

- The yellow box with hints overflows (and is cut off) in the middle of the second paragraph

- The site layout appears to be optimized for mobile (portrait) screens. But the actual interactive elements look to small for touch targets. For desktops (if that is a target), consider using the horizontal space more (e.g., for the box with hints or the leaderboard(s))

- The tooltips on the actions at the top of the lines games board were not in English (appear to be maybe Spanish/Portuguese). Seems like a missing translation (my language preferences are en;de).

- the lines game itself was fine, the idea is okay but I don't think I want to play more than 2-3 rounds of it (which is okay for a daily challenge-ish game). An improvement might be to highlight (with a light background on the board) what combinations of piece layouts are possible after placing the first block (e.g., the straight piece only has 4 possible layouts after the first block and one after the second).

acomjean|2 days ago

Nice job.

Maybe put the instructions you listed here on the site. I tried before reading the comments and got nowhere.

(Edit:I just noticed the instructions on the page bottom… move them up)

For me the symmetric pieces and the ability to just draw on any square on the grid to highlight it (even those that aren’t part of the shape you have to draw) was at first confusing (some Tetris pieces are symmetrical and you can’t flip)

it took some getting used too but it is oddly satisfying.

That’s my feed back. Well done.

Humanista75|2 days ago

Hi acomjean!,

about your suggestions:

1. Instructions: You're absolutely right. I'll think of a way to make them more visible for new players. Great catch!

2. Flipping pieces (Mirroring): I have to respectfully disagree on this one. It would fundamentally change the essence of the game, which is exactly about making that small mental effort to rotate the piece in your mind before placing it. I believe it's better as it is now.

3. Drawing pieces: Limiting the selection so you can't highlight a square that isn't part of the piece you're drawing is a fantastic idea. I'll look into how to implement that.

Thank you so much for all your suggestions!

Wowfunhappy|2 days ago

I know it would be a significant game balance change, but I think maybe you should be able to flip the pieces.

kqr|3 days ago

Thanks for accommodating for unregistered play. This was fun!

It took me a surprisingly long time to break out of the tetris gravity mindset and start attaching pieces to the bottom of existing blobs, rather than on the lowest possible position on the board!

rkagerer|3 days ago

Swipe-draw would be nice (i.e. mouse down/tap, sweep cursor/finger through the squares of the shape, mouseup/lift). Also, tapping the red shape in the top right corner to rotate would help for those of us who need help visualizing which orientation that L or Z piece you gave us is in.

Humanista75|3 days ago

Thanks for the suggestions!

Regarding the swipe-to-draw mechanic, I really believe that drawing the piece cell-by-cell on the board has a few intentional advantages:

1. It gives the player a sense of absolute control over the game and their placements.

2. It provides a sequence of 'micro-pleasures' or tactile feedback with each tap. It acts as a series of tiny micro-goals you achieve as you slowly build the piece.

3. It intentionally slows down the gameplay. Since this is a strategy puzzle, slowing the pace down is ideal because thinking mid-to-long term is absolutely crucial.

As for tapping the red piece to pre-rotate it... well, that’s exactly where the added difficulty lies! It’s a specific mental challenge that few games force you into. You have to make that little extra cognitive effort to visualize the piece on the board. I like to think it definitely helps improve your spatial awareness over time! ;)

bubblesorting|3 days ago

I enjoyed playing Linex! It reminds me of doing perfect clear solves in Tetris, but without the stress :) I appreciate the skip, next, and hole-fill power ups.

If you don't mind me asking, how are you doing piece generation? Is it random%7, drawing from a bag, or something else?

Humanista75|3 days ago

It's neither purely random 7 nor like drawing from a bag. It's a little bit more complex.

If I were to explain it the technical way: I use a custom Linear Congruential Generator (LCG) seeded by the current date (YYYYMMDD) to ensure deterministic gameplay—everyone gets the exact same piece sequence every day. I don't use flat probabilities; instead, I run the LCG output through a weighted roulette that changes based on the day of the week (e.g., higher probability for 'I' pieces on Mondays, higher for 'S' and 'Z' pieces on Sundays). Lastly, there's a system to mitigate consecutive identical pieces.

In simpler terms: I use a formula based on the current date to generate a different sequence of pieces every day, guaranteeing it's exactly the same for all users on that specific day. Then, I adjust this sequence using a probability matrix so that on Mondays you get more of the easy pieces (like the line or square), and on Sundays you get more of the hard ones (like S or Z).

This is the probability matrix:

const pieceProbabilities = { 1: [0.20, 0.18, 0.16, 0.14, 0.14, 0.09, 0.09], // Monday 2: [0.18, 0.17, 0.15, 0.14, 0.14, 0.11, 0.11], // Tuesday 3: [0.16, 0.15, 0.15, 0.14, 0.14, 0.13, 0.13], // Wednesday 4: [0.14, 0.14, 0.14, 0.14, 0.14, 0.15, 0.15], // Thursday 5: [0.12, 0.12, 0.12, 0.15, 0.15, 0.17, 0.17], // Friday 6: [0.10, 0.12, 0.12, 0.15, 0.15, 0.18, 0.18], // Saturday 7: [0.09, 0.10, 0.13, 0.15, 0.15, 0.19, 0.19] // Sunday };

I hope this explains it well!

TruthSHIFT|3 days ago

This is a lovely game. It's simple, and clever, and you have no one to blame but yourself when you lose. Thank you!

I'd love to be able to play by dragging. On mobile it would be really nice if I could draw the shapes with my finger

Humanista75|3 days ago

I’m so glad you like it! Regarding what you said about dragging the piece... I get how convenient that is, but I don’t know, I feel these 'micro-pleasures' every time I draw the piece with my finger. It’s like you have more control over the game, and it also slows down the pace a bit, which makes you think more about your next move. I feel like those few seconds you spend drawing the piece make the gameplay more thoughtful and strategic. Don’t you think?

litenboll|2 days ago

Very nice job, got hooked immediately!

Some feedback/thoughts:

1. I don't think the current approach to difficulty is fun, its just feels limiting without any interaction or ways to turn it into an advantage. Some other ideas would be to have non-tetris pieces that are more difficult to place (but might be very good if you find agood placement), or temporary board obstacles that you can work around until they are gone/removed. Or pieces that do something else when placed like become obstacles until adjacent pieces are cleared. There are many ways to find a more fun difficulty approach :)

2. As others have pointed out it's frustrating to lose when you have "powers" left

3. The difficulty progression vs leaderboards are not clear to me. Am I only competing against players in the same difficulty? Can I choose a lower difficulty? (I would rather get the difficulty from competition than the fixed blocks on board)

4. Getting "holes" in normal tetris feels a lot less punishing than in your game. Here it almost feels unrecoverable at times. I don't have suggestion, and maybe it's not even a problem. Just wanted to mention it.

5. The powers feel a bit "meh". They are useful sure, but seem pretty similar in a way.

Humanista75|2 days ago

Hi litenboll!,

Your comments are very interesting and insightful.

1. Difficulty: You're right—making obstacles dynamic or even destructible is a powerful idea and could be a lot of fun. I’m definitely taking note of that.

2. Powers & Losing: This makes total sense. Other users have mentioned this as well, and it’s a very reasonable point. I’ll look for the best way to implement a reminder or alert.

3. Leaderboards & Competition: This is a great point, and I should make it clearer on my end. You only play one daily game, but your records are compared in two ways:

a. Global: Your score is automatically compared against the rest of the world.

b. Personalized Competition: You can choose specific competitors to follow. This is similar to followers on X; you follow whoever you want, and they are added to your personal board (called 'My competition today'). Your game is then automatically compared just with them.

Imagine you want to compete with your family. You can create a board just for them by adding their profiles using the 'Add competitors here' option. Your daily game will then show up specifically against theirs in 'My competition today.' I think this feature has huge potential, even if many people haven't discovered it yet.

4. Holes: Try using the 'One Cell' power; it's designed to solve exactly that problem! ;)

5. Powers: A power that 'clears' or 'cleans' parts of the board sounds very interesting...

Thank you again for your feedback, it was very useful!

Cheyana|2 days ago

Just one question. How do we pronounce “Linex”?

Humanista75|2 days ago

That’s a great question! :) It is pronounced exactly like the English word 'line' but with an 'x' at the end (like Line-x).