Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: I made a puzzle game with Three.js (thomasfriday.com)
82 points by thomasfriday 11 months ago | hide | past | favorite | 39 comments
A while ago I discovered three.js, a JavaScript library to manipulate 3D objects. It looked really interesting, but I had no real need for it...

To change that I recently challenged myself to make one 3D web game per month with three.js. And I just release game #2, a puzzle game called Cuboid, and you can try it here: https://www.thomasfriday.com/cuboid/

Please let me know if you have any questions or feedback. Thanks!




Nice, and about the right length for exploring the initial ruleset. (Except the red floor squares, which I saw on one level, didn't interact with, and then never saw again so I don't know what they actually do).

I think it desperately needs an undo on death, and ideally should have player-triggerable undo/restart.

Given the rest of the game, I was a bit dismayed at the end seeing that it had basically been a scored playthrough. If I'd known the moves were being counted, I would have played better! This won't apply to everyone, but there is a subset of players (like me) who really like knowing what to optimize for, so having a hidden scoring system be sprung on the player at the end is a bit of a betrayal.

+1 on the arrow direction vs. movement direction mapping being a problem on keyboard. 95% of the time I was in a flow state and it wasn't an issue, but if I made a mistake I'd immediately lose faith in having the right mapping, start second-guessing myself, and make follow-up mistakes.


The red squares kill you if you touch them.

I was curious.


Any chance the buttons could be angled to make it more clear which way they rotate?

Overall, this is great!


It's true that with the isometric view, what is "right" and "up" can be confusing. I could teak the buttons on mobile, but not sure how to solve this for desktop.


I mostly meant on mobile (edit: because the icons weren't angled).

On desktop, you could use keys other than the arrow keys (e.g. q/s for one direction and w/a for the other, since they're more diagonal, or even 1, 3, 7, 9 on the numpad). Edit: I had no trouble on desktop, for what it's worth.

Another option would be to change the view angle so that the directions more closely match the orientation of the arrow keys. It would throw off the nice isometric view a bit, but I assume it's real 3D, so this would be easy to change, right? :)


For the desktop just place an isometric upside-down-T-arrow-cluster next to the puzzle so you always see which way the arrow keys point towards. And maybe highlight them when pressed.


Fun! New to me mechanic. I wonder if a slightly different sound for the length of side hitting the surface would be interesting (or confusing?).


Awesome game!

Found a bug: https://ibb.co/WD6RF8f


Looks like the last row for level 3 doesn't have the correct number of elements:

https://www.thomasfriday.com/cuboid/levels.js


Really fun game, and very intuitive to play, could probably explode like 2048. Make more puzzles like that. Great work, thanks!

~455 moves


It's been 3 days, so not sure if you read this. You should have a contact in your HN profile. I don't want to have to subscribe to contact you, so a contact should be on your site as well.

A big but pretty simple request, both three.js and three-fiber (if you are using that) has "demand" rendering. Can you please look into that and use that? Your games are static like 99% of the time, so "demand" rendering really helps in not using 640% CPU (eg. on 2019 mac) at all times. It makes your game much "greener" and playable in more devices.


the levels are short enough that starting over on failure seems reasonable to me. many games work like that. counting the moves also came to mind right away. also many games do that. if the game didn't count my moves i would have wanted to do it myself.

i like that there is no time pressure. i can analyze the board and think before i move. in comparison your first game is frustrating. it makes sense of course, but it's way to fast for me, and not relaxing. this is a relaxing puzzle.

i would change the mechanic of the red squares. as it is they work just like no squares. as falling down kills you too. how about it kills you if you touch a red square and a white (or green) square together, or a red square and empty space? that means you could use a red square only if the block is safely placed over it.

then you could introduce multiple colors that do different things. say, yellow shifts your block by one square. blue rotates it, purple makes it jump to a another purple block, another doubles one or all dimensions of the block, making it faster to move or able to cross larger gaps, one color could add or remove squares, changing the layout of the board, or move the target. etc...

since your goal is to learn 3d, each of these could have a different kind of 3d effect.

(btw: i made it in 303 moves)


That was fun! I got it in 327 moves. I think the game would be epic if there was a mechanism to have multiple levels (floors/layers) and require the piece to go up and down in order to find the right configuration.... but that increases the scope significantly.

What's your strategy for designing levels? Is it all manual?


Beautiful in its simplicity.

I don't know why, but there's something satisfying in the way the cuboid rolls into its rightful place.


I love the simplicity of this game, very nicely done.

And I poked around your source, and it's nice to see how you've created the levels ( https://www.thomasfriday.com/cuboid/levels.js ).


It is so addictive, great game.

Another proof that what makes a game aren't photographic quality graphics.

Thanks for sharing.


Nice job! This reminds me of a game jam game from last year’s GMTK.

https://escapadegames.itch.io/roll-of-the-dice

Was this an inspiration?


Great game, but I was having difficulties with the controls. Even after a few levels I still got confused with the mapping of the arrow keys to the isometric view. Quite a few deaths happened because of that.


I played a game very similar to this where you had to move an odd shape without it falling off the ledges, it was on the iPad five or 10 years ago. Wish I could remember the name of it.


Bloxerz is one, it was a Flash game though, not sure if there was an iPad version.


I was wracking my brain trying to place where I'd seen this before — thanks!


Nicely done! Excellent challenge to yourself, and good implementation on both games -- thank you for sharing!


Did you play Bloxorz in the flash days?


I was going to post this. I used to love Bloxorz!


Fun way to decompress at the end of today. 788 moves. At least I didn’t give up :)


So simple and clean and very addictive - well done


Nice game, and a good length. (369)


Great job! Simple and executed well. Thank you!

~353


a simple idea executed very well makes for an all around satisfying experience


Really fun game, I like it


That was pleasant. Thanks!


Great job. Very satisfying

334 moves!


391


fun game, got to level 10.


How to pass the 8 though? I can't see any ways...


Passed yet?


No, didn't try it after that, have you?


Yeah, I played that day and solved it.


But how? I can't see a way to pass it...my stupid brain...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: