Added: 6 months ago
From: mybringback
Views: 5,853
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (13)

Sign In or Sign Up now to post a comment!
  • Hi man!

    Thanks for your tutorials!

    I've just got one question:

    How do you set a image as background in the canvas? You show how to set a color but can I have a image as background?

    Thank you!

  • @bakeandmakeacake If you look at the next tutorial, it shows how to use bitmaps. You can use bitmaps for backgrounds as well.

  • @TheNinjinx Thanks :)

  • Thanks! your tutorials really help me as an android games developer. I would really appreciate it if you could make a sprite sheet animation tutorial because all the others that I found were hard to understand. I hope that you read my comment. Thank you.

  • @mybringback i don't understand how your code works.

    onCreate() calls OnResume() that starts your Thread and then in the run method you have while(isItOK == true) so that's an infinite loop because isItOK will turn false only in the OnPause() method that will be called when another Activity comes in front and that never happens, therefore the OnTouch() method isn't supposed to work.

    please explain.

  • You use isOk variable in multithreaded environment. In this case you must delcare it volatile or make everything syncronized. Otherwise you might get into interesting situation when like pause will do nothing, because thread A changed value for isOk, and thread B has cached value for isOk and keep running.

  • i miss cornboyz :(

  • Just wondering whats the difference between these videos and the videos you posted on thenewboston? Thanks for the Awesome work, would be cool to see some android game dev :D

  • Hey Travis, I have a quick request. By the way I started knowing nothing about Android and I love these tutorials, now I can create so much more. haha. But if you find time I was woundering if you could go over one of the Android samples like the ones within the Android developer web page(s)... The one I would like to see most is Accelerometer Play, or if you could make an app using the Accelerometer! Please I am working on a app and would like to learn how to use the Accelerometer. Thanks.

  • Hi Travis! I watched your tutorials since you had that channel called CornBoyz, and they've been very helpful. There's something i wanted to ask you. Isn't it more simple to put an "if(holder.getSurface().isVali­d()){ }" inside the while and write our code between the brackets instead of writing continue; and then the code outside the brackets? we are in a while loop after all. if the holder is not valid it will continue evaluating the expression "isItOK==true" after all.

  • I have one question. What is the difference between return and continue?

  • @DOfficial100 continue will skip whatever is below it and start at the beginning line in the while loop, and return will return some sort of information. for a return example lets say we want a response to a question, so we create a method that returns a string, we will call this method

    doesThisResponseHelpAtAll(){

    return "I hope so";

    }

    so now we can set up a string,

    String s = doesThisResponseHelpAtAll();

    which is the same as saying

    String s = "I hope so";

    does that make sense?

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