When I was a student there was this power-of-two game on my friend's iPhone that I was literally addicted to. I didn't have an iPhone and eventually the game even disappeared from the AppStore. I missed it very much and my friends jokingly mentioned building a copy just for me. They never got around to it but at some point I thought "maybe I should give it a try?". So I gave it a try with no game dev knowledge and the second iteration turned out just fine for my needs: https://kiryhas.github.io/memechain/
I've considered rewriting it to make the code better many times but every time I sit down to do that I think to myself "it works just fine, why touch it" and leave this idea for a while :)
BTW the idea of the game is to combine cubes with the same number and color until there are only 4 left.
2c of feedback - I'd love to have an unlimited undo to be able to backtrack and try different paths woth the same seed; sometimes the game doesn't end even if there are no moves left; and related to that it won't hurt to have a "hint" option to show a possible move.
Ps. Also the 2048 game was a blatant rip of "Threes", which would've been fine had the 2k guy not decided to monetize it.
Thank you for your feedback. The "Back" button allows you to go back to the initial state of the game so I'm not sure as to how I'd make it unlimited. Could you please elaborate? I'll consider adding a hint, just have to come up with the animation.
Never heard about the Threes game, that's very interesting. When 2048 went viral I remember it being promoted as a learning exercise from some book a student did while learning JavaScript.
Do you want a bug report? The lowest row doesn't fit into width of my phone's Chrome. I can only see few millimeters of the rightmost and leftmost cubies. Pinch zoom seems disabled so I cannot adjust. Tried switching to PC mode, but everything became too tiny. Rotating the phone also doesn't help. So for me it's unplayable.
Thank you, I'm aware that it sometimes looks off on certain Android phones, however I haven't had a case where it is unplayable. Could you tell me your phone model, what size/resolution is the screen?
I can't promise a speedy resolution since I don't have an Android but I'll definitely look into it when I get a chance. You can share your details here, send them to me by email or open an issue in the repo.
I've never had big hopes for the project but I feel incredibly happy that you like it!
The original I played on my friend's phone was just that -- a phone game, so making sure it works on my phone was a priority :)
I don't have an Android but last time I tested it was playable even though the cubes were bigger than I'd like them to be on some screens.
I've made an offline version for myself in the past to play while traveling by train. Copying the contents of the .js and .css file into the HTML file into <script> and <style> tags was enough. I wonder if I can make it easier for other people like you by storing it somewhere on git...
Yeah your game just scratches an itch I had for a long time. Mobile games are filled with ads and in-app purchases and I never found a simple game I could play and enjoy while waiting for public transport. Want to fully clear a seed now, haven't gotten that far yet ;)
Ahh, a single .html would probably work, too, sounds way easier!
I downloaded Termux, installed git and python3 and now your game is running locally on my phone with "python3 -m http.server --bind 127.0.0.1 9000" :)
Seeds are absolutely random and some of them can't be solved. I've had people complain about it but I consider it to be another aspect of the challenge of this game because there are cues you can notice that tell you if it's not possible to solve it.
Yeah, you went the extra mile spinning up a local server :)
If the trip you're taking is not a long one, you can just make sure to load the page while you still have reception. The game doesn't make any AJAX requests or load any resources after that and prevents the default 'pull-to-refresh' gesture so if you don't refresh the page accidentally, it'll stay available.
It's a difficult challenge I must say. Played about a dozen games now, furthest I've gotten is 4280 points. Have you ever cleared a full seed?
Yeah I looked at the files to see if you make any external requests. I guess I just found it entertaining that there's a web-game running locally on my phone :)
Wow, that's funny, that's my high score too. I guess there's a limited amount of possibilities, so it's probably not that unlikely. Seed was 5209605, if anyone wants to try it.
It took me several tries with many different seeds, but I made it at last. 8000 points on seed 5706121. I like the simple but cool rotating cubes at the end.
I also like the non-minimized source code. It makes it instantly discoverable without having to find your repository (https://github.com/Kiryhas/memechain).
Looks like you did it without any external libraries which is cool! It looks clean and readable, and proves that developers don't need to download huge dependencies to create these types of games.
I have one minor suggestion. It would be great if you made the highlight a bit clearer when you are hovering over a matching cube. Sometimes it can ba a bit difficult to hit the correct spot. Maybe you could highlight the hovering cube as well in addition to the outline?
Your suggestion makes a lot of sense, I think I'll add 0.5 transparency to the cube the player is dragging when it can be combined with the cube under it. It's late so I'll do that tomorrow, stay tuned :)
Sorry for the delay, I've been a bit busy recently.
I've just adjusted the highlighting of the cubes, give it a look. For feedback you can contact me here, by email or open an issue on GH. Hope you enjoy!
It definitely would benefit from that, people like to have success. (And know who they can blame in case of failure)
The easiest solution is probably brute force, have it try all the potential moves and see if it solves the game and if it does, make it a valid seed. Can be pregenerated, but should be doable in real time, also from a smartphone.
Also, I think I was just blocked from my first clearing, because I could not access all blocks.
Rotating the view and angle would be quite nice, but depending on your implementation, not trivial.
Maybe I implement it with babylonjs or threejs these days, it is a fun game.
Personally I am not sure if I like winning more than just combining the cubes together and moving onto the next seed if it can't solve the current one :)
Pre-generating seeds is a valid solution but since I don't want the game to make any network requests I don't think it would work for me. Brute forcing it makes me worried if it'd drain the battery.
I think I would rather add an opt-in (like a checkbox) option to make the game check fields for certain patterns that tell if a seed can't be solved and keep generating until there's a seed that passes that check. I think that way the game would still give you the occasional seed that can't be solved but statistically your chances would go up.
Regarding rotating the view, that would make it a different game and I'd like to keep it as it is. However, that sounds like it could be fun so please send me a link if you end up creating such a version! :)
Now I am interested to give it a try, because I really don't think brute forcing the solution would drain the battery. Likely it would be neglectible, compared to the power needed by the rendering.
Because there is a finite and small amount of legal steps, so it should not need too many iterations.
That is of course, if you only brute force the raw game logic. Simulating the steps with the UI would definitely drain the battery ;)
And yeah, if I get around to redo it in true 3D, I send you a link.
I think if done right, it provides the same experience, just a bit more overview.
Could you elaborate on 'start from a solution and keep expanding it'? I thought of it more like checking the field for certain patterns that tell if it can't be solved and generating fields until one passes that check.
Start with 4 different color cubes, each with the value of 128.
Then just keep splitting them until you have a full the game. You'll need some intelligence in deciding which cubes to split and where to stack the split cube.
But if you reach a state where you can't split anymore you can must backtrack and try again.
I've considered rewriting it to make the code better many times but every time I sit down to do that I think to myself "it works just fine, why touch it" and leave this idea for a while :)
BTW the idea of the game is to combine cubes with the same number and color until there are only 4 left.