So earlier I came up with an idea for saving high scores in my game. With my previous game, the high scores, data, etc. would be saved directly into a text file, making it far too accessible. I had a ton of problems with cheaters modifying the high scores within the file. My idea for this next game is to encode the high score and data into something that only the game would know how to decode. So it’s like this: Imagine the high score is..3,000.
Highscore = 3000 // unencoded
Highscore = ((3000 - 20) * 1.65) + 829 // encoded to 5,746
So you see the “Highscore” is mathematically encoded/decoded and only the game knows the values to decode it. The value of the highscore encoded = 5746. This is not the actual value of the score but the game can figure it out by doing the encode math in reverse.
Highscore = ((5746 - 829) / 1.65) + 20 // decoded back to 3,000
As long as you do not know the mathematical values used to encode/decode the highscore, I think it’s almost impossible to hack the game highscore.
Just my idea ;D let me know what you think.
Found this article extremely useful when I was fixing memory errors in my iPhone game.
I hear a lot about programmers not being creative enough to create their own video game art. I used to be in the same boat when I first started out developing games but honestly now I think it’s a load of bull crap. I say if you get frustrated with your art skills just keep at it until you get the hang of it. Also when you find a tool to create your art, stick with it. Spend some time familiarizing yourself with it and when you feel like you know your tool extremely well then everything will seem so simple. I also took a drawing class which really helped bring out that creative side.
Just my advice. ;D
tumblrbot asked: WHERE WOULD YOU MOST LIKE TO VISIT ON YOUR PLANET?
Wait..on my planet? probably burger king.
Often I find myself placing labels in certain points on of the screen where there isn’t much space. The problem with not having much space is for example when you have a label that displays your current game score. If your game score gets very large like “1,002,349,” then the label might begin overlapping other elements in your game such as the HUD (heads-up-display). So here is my solution to the problem:
float maximumLabelWidth = 192; //the maximum width (in pixels) that the label can reach. Set this to whatever works for you.
if (scoreLabel.contentSize.width > maximumLabelWidth)
scoreLabel.scale = maximumLabelWidth / scoreLabel.contentSize.width;
Of course, “scoreLabel” is a CCBitmapFontAtlas FYI. Simple enough right? Using this method, the label will shrink itself so that the width never exceeds the maximumLabelWidth variable.