Android Game 5 Java Programming tutorial

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
7,441
Loading...
Alert icon
Sign in or sign up now!
Alert icon
There is no Interactive Transcript.

Uploaded by on Apr 10, 2011

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:

Top Comments

  • its walking like micheal jockson haha good joke:))

    by the way those tutorials are great.. thnxxxx..

  • This tutorial is Great!. there is typo error, the left (0,-1) in image and explanation should be (-1,0)

see all

All Comments (26)

Sign In or Sign Up now to post a comment!
  • A lot of this tutorial is unnecessarily complicated. Just notice that the plane is divided into 4 parts by lines x + y = 0 and x - y = 0. So just compute x + y and x - y, and depending on weather those values are negative or nonegative you will know which animation to use.

  • This is by far the most elaborated tutorial i've ever seen. Nice job with the math function... the way you explained it. ITS AWESOME !!!

  • Thanks Edu, enjoyed your tutorials.

  • super cool! :)

  • @maradona640 there is less math involved so it might be easier to understand for some

  • i found it easier to understand if you use variables for the currentRow and column and then depending on the wall that was hit, to change the current column accordingly

  • I used absolute value instead of arctan. Im only showing code for the left/right check. But I also have code for the up/down check but youtube wont let me put it.

    if(Math.abs(xSpeed)>Math.abs(y­Speed)){//moving sideways

    if(xSpeed>0)//moving positive--RIGHT

    currentDirection=2;//RIGHT-fro­m sprite sheet

    else

    currentDirection=1;//LEFT-from sprite sheet

    then in onDraw...int srcY = currentDirection * height;

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more