Becloned 2

game thumbnailFinally finished the game last night. Now it pretty much plays like the original game, other than the special gems. This feature wouldn’t be difficult to add because of the use of bit masks to represent the board and moves. But since I don’t have appropriate animations for each special gem, I won’t be adding this feature. Furthermore, I couldn’t find any good, free sound effects for my game which I think would really bring everything together. When playing the original game, it is quite satisfying to hear the gems disappear. If anyone knows a good source of free game sound effects, please let me know.

To manage the complexity of this game, I designed a condensed finite state machine. There are four states in the FSM, though there are many more states in the actual game. I used the current state along with other game information to transition to other states. I played the game for a little while and didn’t find any bugs, though I’m sure I probably missed something. To move a gem, you can click on it and then click on the destination, or you can simply drag the gem to it’s destination. If you don’t make a legal move in a certain amount of time, you will be given a hint but will be penalized 10% of your score. If you reach a position where there are no legal moves, then you are penalized 50 points and a new board is generated. I managed to get a score of around 450 but only played a few times, so I’m sure you guys will do much better.

Play Gem Swapper.

Source: GemSwapper.java, Game.java, Gem.java, Move.java, FPS.java

Note that the source isn’t commented yet as I am tired and a lot of the code is quite complex so there will be tons to comment. I will be glad to comment if anyone requests I do so or answer any specific questions about the code.

 

Leave a Reply