There are many ways to build mobile games, but for most projects you'll find everything you need in the core SDK. Practice Android programming while you learn to build a simple game app with the Android SDK and Java—no C++ or gaming engine required! This project showcases all of the SDK's strengths, including clean, fluid motion; complex game mechanics; and persistent scoring. David Gassner shows how to build the visuals, including the background, menus, and controls, and add animation with the built-in classes in Android. Then he helps you program the game logic. Learn how to define different levels, increment and display scores, manage game resources, and add audio effects—both longer music files with the MediaPlayer component and shorter sound effects with Android's SoundPool class. This project is a fun and rewarding way to learn Android programming, and can be used as a template for your own game apps.Topics include:
- Working with Java vs. C++
- Creating a new Android project
- Defining the visuals: background, menus, and animation
- Defining and managing levels
- Displaying scores
- Managing limited gaming resources
- Completing the game logic
- Adding audio effects
- [David] My name is David Gassner. Welcome to this course on building a game app for mobile devices with the Android SDK. There are many ways to build game apps, but for many types of games, you'll find everything you need in the core SDK. I'll start by showing you how to display a colorful background and how to define visual objects using graphic files and a bit of Java code. Then I'll show you how to use animation classes from the Android SDK to move objects on the screen, creating clean fluid motion.
I'll show you how I implemented my game's mechanics, the rules of the game using Java code, and how I keep score, storing the player's high score persistently with shared preferences. And finally, I'll play some audio, both longer music files with the media player component and shorter sound effects with Android's sound pool class. I hope the techniques I demonstrated in this course will be helpful as you build your own game apps for Android devices.