Thursday, December 27, 2012

Increment certain values in an ArrayList.

I needed to add 1 to certain values in an ArrayList and this was the only way I could figure it out easily.

It is basically calling to set q3 at location 1 with the former q3 value +1.  IN this case 6+1=7;

Sunday, December 23, 2012

SQLite Android and Variables

While working on a project I recently realized I was going to have to learn, or try, to save to a database.  I trolled hundreds of samples and examples and after a while got a grasp.  The thing that stumped me hard was if I wanted to implement a variable in the mix, or two, or an ArrayList.

Here is a brief synopsis should you encounter it.

Here  is the easy way to iterate some of a db with a ListArray.  Notice the "  These are the crucial differences from being in sql and not.

Here is the way to update something with a variable.  BOTH ways work, just showing them.  I am basically adding a certain id # and location with the variable and updating it.  In this case TWOS is an integer.

Sunday, December 2, 2012

Vector Candle Flame Tutorial (sort of)

Today while tinkering with an app, I really needed a flame with alpha. After snapping a suitable picture I decided to use Fireworks to make one. After the fact I realized it was really very simple. 

 STEP 1: Take 2 circles and draw them. Next shape one like an oblong oval for the main part of the flame. Next, form the bottom to an oval and use the subselection tool form the top of that oval to match the bottom of the top oval.  

STEP 2: Carefully place them together and adjust the gradient and alpha accordingly. 

STEP 3I placed a white square around the wick so you could see the detail.  I basically drew a square and used the reshape area tool to make it kind of rough.  I also added a little texture and adjusted the gradient.  The sort of ember on the top is just a distorted shape I used and added a circle gradient in the center of it.  When you place them all together you have the final product above!

Saturday, November 3, 2012

As a rookie developer I find nothing more frustrating than useless comments on Google Play. Recently I got one that says "This Sucks, this app sucks bad" If it's not a good experience feel free to let me know why. I mean I'd prefer you not write a book, but emailing long suggestions would be fine too. It's not like I have 30 people working with me to make things happen, it's only one person. So Google Play, why can only the elitist developers reply to comments on Google Play? Are we not good enough for it yet? What gives, commenting started in July for some, it is November. That trial is long enough, let us in too so we can advance our business and customer relations!!!!

Friday, October 12, 2012

Android scrolling background

OK, here we are.  This is how I implemented the scrolling background in Spy Jumper.  Pretty simple.  Basically it takes images that are width by (width/2).  They are stacked on top of each other.  It basically recycles one of 6 sections (or however many you want to set) to the top of the screen.  Speed can be adjusted for the scrolling and I use a formula to calculate for screen densities. In the below image is 4 different sections of background being called. 0,0,1,2,3,0

Saturday, September 1, 2012

I started last year when I got reeled in by App Inventor.  I spent months learning the ropes and getting the hang of how it worked only to find out the games I was intending to make would make it crash due to their size.....SO, I put on my big boy pants and downloaded Eclipse and the android SDK.  Having originally put a less than adequate game on the market that I stripped down to make work in AI, I started learning.  I now have a HUGE new respect for the most simple games if they are executed well.  I've been working hard trying to polish my code and user interfaces.  I am going to start posting some code for anyone who may need it because I have learned so much from others doing it also.  

Do away with collision double checking on android!


 While working on a game, I realized I have been double checking for collisions against each other for some.  This way is hashed out where they won't double check.
int c=0;

for (int i = 0; i < enumbers; i++) {
for (int e = c; e < enumbers; e++) {blah,blah,}