Android Game 5 Java Programming tutorial
Top Comments
All Comments (26)
-
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;
its walking like micheal jockson haha good joke:))
by the way those tutorials are great.. thnxxxx..
gurkang1 10 months ago 5
This tutorial is Great!. there is typo error, the left (0,-1) in image and explanation should be (-1,0)
XDwinlabs 5 months ago