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.
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.
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().isValid()){ }" 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.
@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
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 1 month ago
@bakeandmakeacake If you look at the next tutorial, it shows how to use bitmaps. You can use bitmaps for backgrounds as well.
TheNinjinx 4 weeks ago
@TheNinjinx Thanks :)
bakeandmakeacake 4 weeks ago
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.
baruchadichen 4 months ago
@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.
N3r0ify 5 months ago
This has been flagged as spam show
Hey, sorry I'm late in replying, but can you do
if(x <y)
return; ?
if so then whats the difference between that and
if(x<y)
continue; ?
DOfficial100 5 months ago
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.
vvvexor 5 months ago
i miss cornboyz :(
zealscar 6 months ago
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
Ho11ow661 6 months ago
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.
mikeportnoyfan1 6 months ago
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().isValid()){ }" 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.
andreim2203 6 months ago
I have one question. What is the difference between return and continue?
DOfficial100 6 months ago
@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?
mybringback 6 months ago