Monday, October 6, 2014

Highscore and fish angled jumps!

So I spent some time implementing a Json highscore into our game, there is now a helper class JsonHelper which can save and load our highscore. It saves it locally to a file called game.sav. It is encrypted with BaseCoder64, with means that the score value is hashed and looks something like eushDUSDhuwhdusdh== this. It is not that hard to crack, but it puts an extra layer of protection against people that just want to open the file and write in a new highscore. If we ever implement global highscore this file would be stored on a remote server away from the users access anyway.

I also did some experimentation with the fish angled jump, for now I just increased the scoll speed of the fish, which means that they will have to jump much sooner and at a lower angle towards the frog. I then fixed the rotation algorithm to give it a more smooth jump. To solve the problem of frogs just jumping all the time, I increased the gap between every fish, giving the player time to land and power up for the next jump. As for now I just draw the ghostfish 300 pixels left of the real position of the fish, so that you actually see a little sooner where the fish is going to be. This needs to be calculated so that the fish ghost travels slower than the real fish, making them line up at the frogs x position, and have the ghost fish disapear after the frogs x position.