Added: 10 months ago
From: edu4java
Views: 7,258
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

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! :)

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

  • Comment removed

  • 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

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

  • 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;

  • Comment removed

  • Comment removed

  • Comment removed

  • Comment removed

  • Comment removed

  • Comment removed

  • Comment removed

  • Thanks for going to the trouble of explaining why you do things in programming. most tutorials on youTube just teach parrot fashion. TYour tutorials provide students a chance to actually learn some principles which will allow them to write code for themselves.

  • meh, I dont think the math here is that bad, thanks for the tutorial!

  • FUck the math.

    I HAT MATHHHHHHHHHHHHHHHHHHHHHHHHHHH

  • @HACKERMAN24 Math is your best friend in programming.

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

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

  • Sensacional, parabéns, seus tutoriais são perfeitos, muito, muito, muito obrigado!

  • Wrong link on the site. The English version is linked to the Spanish tutorial.

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