2048 remake
-
Some of the controls that may or may not be obvious:
- Press left or right joycon stick during the game will rotate the background color
- You can use either the controls, or the touch screen (by swiping in the direction you want to move)
- You can also use ASDW keys on the keyboard to play the game.
- The screensaver ball responds a little to the controller velocity, so you can let it fall rapidly by turning your controller 90 degrees
- If you want to reset the game, press one of the controls on top ( L, R ZL, ZR )
- In the botton left, you see "{n} score {x}", where
{n}
is a score based on your moves (same point system as the original 2048 game), and{x}
is based on the current value of the tiles.
-
I felt a little bad for not joining the Game JAM, so I've added a start for an AI to my game in stead. So far it only sometimes reaches 1024, so it's not a good AI at all, but it's just a start... (pending approval)
-
did a re-upload to fix a little bug (touch input didn't work on buttons anymore).
The cause was this:
I had introducedvar
to declare all my variables at their function scope (so I did some minor refactoring).
However, I had accidentally usedvar
once too often, causing me to redeclare the same variable within it's function, like so:function example() var previousTouch = touch() loop compareTouch(previousTouch, touch()) var previousTouch = touch() // using `var` again here: oops update() repeat return void
Did some little tweaks to the AI, but it's still stupid (only reaches 1024 some times at best)
-
@PB____ Hey,
I didn't know
var
is a thing!! I got to try it out once back at my switch... Thanks for sharing! ♥️ -
@mario-bodemann It isn't really in that it's not an actual keyword but it does seem act like an anonymous type because F4NS is so relaxed about the types of variables. Behind the scenes I think that it is treating it as a struct but one that is undefined. You can put anything before a variable: try wibble!
I am going to suggest that var is added to the language
-
@mario-bodemann this is fruit of the discussion you can find at https://fuzearena.com/forum/topic/692/instant-karma-on-misplaced-for-loop/6
@pianofire that would be nice. I was aware that
var
isn't an official keyword, but it gives the behavior that I want, and from my discussion with Mike on Discord I understood that I wouldn't need to be afraid about updates breaking this behavior. But havingvar
as an official keyword would be really nice, and more fitting to how Fuze handles types :) -
To keep people updated: I'm still working on this project (though my time is limited of course).
What I have done, is integrated the Persistent Data solution by @pianofire into my project, rewrote some of that, to fit my preferences, and using that to store the AI configuration (how much should it weigh if the highest number is in a corner for example).
Now I still want to write an algorithm that will systematically try to tune these settings, in order to get a better performing AI.
So these are mainly technical changes, so not worth sharing yet. But I thought it's interesting enough to share with you guys what's coming up.
Don't expect a high standard solution for AI though. Although I'm a professional software developer, code quality wise my 2048 project is just an experiment. And I never needed to do anything with AI at this level (you wouldn't need to write these type of algorithms yourself for that). My goal for this project is, to end up with an AI that can at least sometimes reach the 2048 tile automatically.
-
I've shared an update of my game (also to back-up some progress). For playing the game, the main difference is, that the game now has better menu's, and it has my profile picture as a logo in it.
-
This is a great game! Thanks for sharing it, @PB____ !
-
Thank you @vinicity. since it was my first project that I created (before the whole showcase gallery came up), I kind of parked this since I wasn't happy with the technical implementation. So it's nice to hear that it still gets appreciated, maybe I should give it an update to just dump the AI idea and properly implement the rest :)