The Vanguard Power Calculator

Click the image above to go to the download.

Click the image above to go to the download.

I know it's been a while, but today I made an app from start to finish.

I've had the urge to work on something lately but haven't wanted the insane time commitment that working on games required. I decided that an Android app would be a good way to feel like I've done something and have a finished product in a few hours.

The app that I decided to create was a Cardfight!! Vanguard power calculator. A calculator....groundbreaking! It's basically a fancy, more limited....calculator. 

Vanguard is a card game played by 2 players. There is also an anime for the game that has had around 200 episodes aired. In Vanguard, you are attacking the opponent with your monsters and are often adding modifiers to your attack power. It's all just basic math, but time could still be saved if you just pressed a number when an effect resolves that boosts your attack and poof....there's your current attack power. That's basically what I did. The main difference between this and a normal calculator is that it automatically ads when you press a number, it has no other mathematical functions, and it has common numbers used in Vanguard including 10, 11, and 15. It also displays the same animation as on the show when the power is boosted. You have the option to press 1 of 3 buttons that give you a sound clip that is commonly used in the show as well. 

It's a geeky fanboy app, but it's pretty cool. 

I will likely not be able to monetize it due to 2 of the sound clips coming directly from the show and the power icon looking very similar to the one used in the show. I'm not really concerned with money with this project though. It was just something that I thought would be cool. It's pretty cool.

Anyway, the logistics of getting it to work were pretty simple. It's basically just a 1 image menu system. The number buttons do have a secondary image which becomes visible and fades when you press the button. It's to give the user feedback on what they have just pressed.

The ascending number animation was created by a sort of interesting method. I took the time of the number ascending sound and made it sync up with the length of the animation. Since the difference between numbers is not the same (ie 1+2 is not the same as 1+10), I had to figure out a way to make the animation not run as long but still show basically the same info (ascending numbers from the base number to the new number). 

I created 4 variables for this effect:
total, new_total, ascend, lock

The formula used to make the numbers ascend for the same amount of time with different values was done in the step event as follows:
if(total < new_total && lock == false)
{
    ascend = round((new_total-total)/30);
    lock = true;
}

if(total > new_total)
{
    total = new_total;
    ascend = 0;
    lock = false;
}

total += ascend;

The app is set to run at 30fps. The lock variable was created to not continuously reset the ascend variable until the total is correctly displayed on the screen. When you press a button to add it to the total, the button adds its amount to the variable new_total. new_total then subtracts "total" (what the number was previous to pressing the button) and divides the result by 30 (the number of steps per second). Conveniently, the sound is insanely close to exactly 1 second so I didn't have to fiddle with the number that new_total-total was divided by. The round function was used to make sure it does not display decimals as well.

Aside from some checks to make sure that sounds do not overlap, that's pretty much the whole thing. 

I spent most of my time looking for the sound effects. :P

You can download this app on itch.io. I will likely post it up on this website soon as well.

Until next time.

_Doombrowski