Android Studio 2D Game #2 - Basics of Draw + Update

Retro Chicken · 78K views · 2016 · 20:53

Open on YouTube

Indie game developmentGame programming & enginesSoftware (other)tutorialdated

Why Stack Overflow recommends it

Stack Overflow users cite it when asking why their canvas, draw method or touch dragging doesn't behave like the tutorial's after following it step by step.

Recommended by 2 people across 2 different months, 2016 to 2018.

What it is

Second episode of Retro Chicken's Android Studio 2D game tutorial series. It walks through the basics of the draw and update methods by building a simple player rectangle and obstacles on a canvas, with the player movable by touch.

What people said

Recommends user4505470 · 2016-11 · Stack Overflow · on “Cant draw rectangle on canvas [Android Studio Game]”

so i was following retro-chickens tutorial online on how to make a 2d game on android studio and i have run across a problem and i tried to figure it out but i just cant seemm to find a solution. The problem occured on his 2nd video ( [this video] ) where he runs his code and rectangle appears on the screen which he can move around. For me the rectangle doesnt appear on the canvas for some reason, it is just a blank canvas even though i have the exact same code as him (i have gone back and checked). At times my application sometimes doesnt even launch and gives me error like this (I have the latest sdk version and everything): Cold swapped changes. $ adb shell am start -n "com.example.ridhavraj.s

Recommends Drew Pesall · 2018-04 · Stack Overflow · on “Dragging an object across the screen not dragging consistently”

I'm working on an app in Android Studio where I am dragging a block around the screen, but for some reason the dragging does not function properly. Here's what it is supposed to look like: Video [this video] And here's what mine looks like: Video [LINK] For some reason, my dragging only seems to be dragging the box half the distance of the cursor. I'm not sure why this would be, since I followed the code in the tutorial exactly, but I'm hoping someone could point me in the right direction with making this fix. Here is my code of the class I believe needs to be adjusted somehow: public class GamePanel extends SurfaceView implements SurfaceHolder.Callback { private MainThread thread; private RectPl

Cites Ron Shloosh · 2018-02 · Stack Overflow · on “Draw method not working”

So i've started learnin android studio game development from this series: [this video] and i can't seem to find the reason why my draw method isn't working. i triple checked my code and the video and ran some tests to try and find my error but ended up blank. please keep in mind i'm new to stackoverflow and programming so if you see any ways i can improve on stuff like formatting i'd love to hear it MainActivity: import android.app.Activity; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.Window; import android.view.WindowManager; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreat