GoldRush: Android App Development

This is my first post! I'm going to talk about Java programming on Android devices. I got a 7 inch Samsung Galaxy Tab from DigiPen's summer camp. I have always been an iPad user, so using the Android device was a new experience. While the Galaxy Tab is similar to the iPad in many ways, it had some nice features the iPad did not have. The live wallpapers I downloaded were fun - I enjoyed touching the screen and seeing the water ripple, and occasionally poking at the fish in the "koi pond". The widgets turned out to be very useful because they quickly gave me information like weather, emails, and the news. I also liked the Google keyboard, which helped me to type faster and more accurately by sliding between letters. Android allows for more customization than iOS and has a lot of potential to be a mobile information dashboard. 

GoldRush is my first Android app. I have done Java programming for a few years but have never programmed for Android before this. As part of learning the platform, I planned to build a game that would incorporate sound, graphics, and touch. I used Eclipse, but in the future I would like to use Android Studio, which came out recently. The first concept in Android programming is an Activity. The OnCreate method is called when we create the Activity. It lets you setup your UI (specifically, Views/widgets), and prepare resources. Next, is the OnStart method. This is showtime (when the user sees the activity)! In this method, I locked the screen to landscape mode, set the first layout, and started the game. I used buttons to allow players to switch from layout to layout. The OnStop method allowed the app state to be persistent, which can be reloaded on OnRestart. Even if a user stopped GoldRush via TaskManager, the game could resume from where it was last time. 

Within the IDE, it was a lot of fun to develop the UI code (I am an Emacs user). I could easily create colorful buttons by adding a behavior to an ImageView. It was also very easy to build the program inside the Eclipse IDE and deploy it on the device - just click the run button and wait for a couple seconds for the app to appear on the screen. I used LogCat to debug and catch errors. After finding bugs or finding a feature I wanted to change, I could go back quickly and change my program. The whole program-build-test process was interactive and smooth. 

Here's a peek at my game: 

After beginning the game...you can see your level, and how much money and energy you have.
Occasionally, you'll meet the Cave Monster while mining!
You can buy tools and food at the General Store.
I enclosed my project here

I'm excited to work with the Galaxy Tab to do data visualization. I'll try network programming and server side data preparation. This also means I will do Java server side programming.   

P.S. I would like to thank DigiPen, and in particular my adviser Luke Powell, who made the camp a great experience! 























Popular posts from this blog

Building A Toy Language Interpreter in Go

Space Race: a simple Rust game built on the Bevy framework

Building a Toy Language Compiler in Go