American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

9 AM – Android Game Development – Gamas

November 13, 2021 @ 9:00 am - 10:00 am

Today We Do:
  1. We made 3 birds appear on the screen moving to the left.
  2. We created bird to appear periodically using timer.
  3. We organized our codes so codes that belong to sprite was moved to its sprite class. For example, the code that is responsible to rotate the background x coordinate was moved from GameView.java into Background.update() method.
  4. For Bird.java, Player.java and Background.java, we added a new method draw(Canvas) which will be responsible to draw these characters. We moved some of the codes from GameView.draw() into each of these sprite.draw(canvas).
Homework
  1. Inside GameView.createBird() method, make the bird y coordinate random from 0 to screenHeight.
  2. Create a new class Bullet.java. This will be a new sprite for bullet/fireball. Use R.drawable.bullet for the image. Look at how we did Player.java and Bird.java to do this one.
  3. Make the size about 1/5 of the original size.
  4. Add the update() and draw(Canvas canvas) accordingly. Just like how we did in Bird.java, Player.java and Background.java. Review the class recording if you did not attend the class.
  5. Inside Bullet.update(), move the bullet to the right.
  6. Add the Bullet into GameView and make it appear on the screen.

Details

Date:
November 13, 2021
Time:
9:00 am - 10:00 am
Event Categories:
,
Verified by MonsterInsights