A 2048 game using java Swing with powerful magic items!
Magic 2048 is very similar to the original 2048 game. The goal of this game is to get the final 2048 block with the addition of "Magic Items" in the game that will help the user get the final 2048 easier with more fun.
The user can use either WASD or the arrow keys to move the tiles.
Tokens is the currency of the game that is rewarded to the user based on their progression in the game. The amount that is given every game is based on this formula: Progression% * 100 = Tokens.
Magic Items are powerful items that can be purchased using tokens in the shop. However, using Magic Items will increase the # of moves of the user depending on the ablity of the Magic item.
Magic Item | Description | Cost in Tokens | Increase in Moves |
---|---|---|---|
The Lightning | Remove A Tile Instantly | 10 | 25 |
Book Of Double | Double A Tile's Value | 30 | Value Of THe Doubled Tile |
Control Z | Undo The Last Step | 15 | 40 |
This is one of the earliest strategies that player discovered of beating 2048 is to keep your highest-value tile in one corner for the entire game and slowly build it up.
For example, I keep my highest value tiles in one column.
The game will spawn tiles randomly at empty tiles and it can often spell the end of your game when a tile suddenly spawns at an unfortunate place. An interesting strategy that AI seem to adopt is to keep most of the tiles occupied so they can control where new tiles can be spawned.
The magic items are built to make your gameplay easier! For example, when an unfortunate random tile spawn in between two tiles you want to merge, Strike The Lightning! When you accidently press the wrong key, Undo it!. When you have a 1024 and the grid is about to be full, Double it!
The Leaderboard in the game ranks the players based on their Max Tiles. When two or more players have the same Max Tiles, players with less # of moves will have a higher rank.
There is a chance that the gamegrid will lose its focus during gameplay, the program itself request refocus everytime when other buttons on the frame is being clicked. You can use your mouse to click on the game grid to reset its focus.
In the algorithm, the movecount depends on the user Keyboard input and when the gamegrid does not move, it will count as moves since the user is still trying to move by pressing the keyboard.