Sunday, June 26, 2016

The Rock, the Paper, and the Scissors

Four months and seven(ish) days ago, I started working on my first Android app. It was to be a rock paper scissors game, including a Lizard-Spock bonus feature (In a separate $0.99 version), and bluetooth phone-to-phone functionality. On June 19th, I uploaded it to the Google Play store.

It had humble beginnings: Solid color background, placeholder textures, hard-coded strings... Kind of like this:
Before

The animations were made slowly: Trying out a series of commands based on the current tick, and then compiling it to see what happens. If I didn't like it, I would have to make changes and re-compile.

I found free images from the internet (Who can copyright a digital piece of lined paper?), and modified them in GIMP to look right. Some modifications were simply removal of color, and others were all-out remakes.

Finding sound clips was one of the harder parts. A good 90% of the sound effects that I found weren't what I was looking for, and usually I would have to edit the pitch, speed, and volume of the clips in Audacity.

No points for guessing where the sound for the baby scissors army came from.

The Bluetooth feature still isn't ready. It's a very complex system and I've been doing research, learning, and planning on how to implement it. It will be on both the free and paid versions of the app, and they will even (hopefully) be compatible.

Coding the physics simulations weren't the easiest things either. I had to invent gravity, make the confetti descent look realistic, build a function for detecting collisions... One of the more interesting aspects of this was developing a mathematical formula to get the upwards velocity x needed to get up to y height with a gravity of 2 pixels/second/second. I'll share this particular one with you:
x = -2√y + 1
Or as it appears in my code:
plyr2XSpeed = (byte) (2*Math.sqrt((player2.getY() + player2.getHeight())) + 1);
The +1 is margin for inaccuracy.

Stay in school, because the engineers (Specifically those who work hard in math) are going to rule the world! (Bwa ha ha-COUGH!  COUgh! Cough! ha ha...)

After

If you have an Android device that is part of the 89.2% of Androids that *should* (Please tell me about bugs) be compatible with my app, you can download and start playing the free version TODAY! Just go to this link and click on the green install button (Google Play is probably the only place where this is safe to do... Everywhere else, the green buttons are probably deceptive ads.):
https://play.google.com/store/apps/details?id=g3ckobot.therockthepaperandthescissorsfree

Again, the bluetooth mode is not ready yet. It will be made available for both the free and full versions of the game.

Downloads and positive reviews on the store are really helpful to apps. They are the primary thing to boost their position in searches, and give a readily available average to users contemplating the use of their 19 MB.

Thank you for taking the time to read this. I hope you find this post and my app entertaining.

1 comment:

  1. We haven't yet swiched back to Samsung on our phones and our tablets are still Apples so we cant download the app. But will when we finally switch.
    Looks like fun!
    Don CmfgE

    ReplyDelete

I've been forced to enable comment moderation. Your comment will now have to be looked over before it's allowed.

I'd love to hear from you, but unfortunately, jerk spammers have been taking advantage of commenting. They've been using it as advertising for BAD stuff.

Spammers, please don't make me get out the ban-hammer.
This is why we can't have nice things.