Posts Tagged 'app'

Presentation: Play Testing a Space War App

I was the speaker at Tridroid, the Raleigh area Meetup group for Android, on February 7. I talked about play testing and we conducted a short play test session on a game app that I am working on. I hope everyone there enjoyed it as much as I did.

See my previous post for a longer description of the session.

The presentation is available on Google Drive. Click here: presentation on Play Testing a Space War App.

Play Testing a Space War App

I found a great blog post about game play testing: “Play testing a game design the low fidelity way“, written by Chris Khoo. It came at a good time for me because I was stuck last July, not making much progress on my Space War app. The reminder about play testing was good, but what helped me the most was the “low fidelity” part.

Chris Khoo’s situation was similar to mine. His goal was to “build a game which casual strategy fans could easily pick up”. The challenges he faced  included  a “cumbersome user interface” and  the problem of “too many commands available to a user at any one point in time”. In his blog post, he describes how he began a redesign and started it with paper and pencil prototypes and old board game pieces.

Since low fidelity seemed to work for him, I thought I’d try it too. I did a bit of work on a chalkboard and then I moved to paper prototyping. Where am I today? Well, still not finished, but I have made a lot of progress. I have, I hope, greatly simplified the user interface, particularly at the introductory (novice) level of the game. At this point, I am ready to hold my first play testing session. It’s now a working Android app, but still low fidelity. The graphics certainly show that. Still I want to test the game mechanics and get a sense of the overall playability of the game.

Screenshots for Starship app

If you are in the Raleigh, North Carolina area and would like to attend my presentation and play testing session on February 7, here is the link for the meetup: Play Testing session at Tridroid.

I will say more about the play testing session and my Space War app in future posts.

Gomoku League is now in the Amazon App Store

There are reaction games, and there are thinking games. Gomoku is definitely a thinking game. It is a two person strategy game with simple rules. The goal is to get five markers in a row before your opponent does.

In Gomoku League, the game itself  will definitely challenge you. There are four levels of AI play — from beginner to advanced. You will have no trouble finding an opponent that will test your skill.

What’s different about Gomoku League? It’s a league. You play games against the other players. But those players can play each other too. That’s a way for you to learn to play a better game. And oddly enough, it’s fascinating to watch two AI players battle it out — especially at high speed. Entire games unfold in under a minute. Turn two AI’s loose and let them play. Then go back and watch the replay to see how the winner did it.

So, in Gomoku League, it’s more than just the game of Gomoku. It’s a league. Your goal is first place. You’ve got to win games to do that, certainly. However, sometimes it’s what happens in the games you’re not in that’s important. If the league leader loses a tough match to another AI player, that’s good for you. That player’s rating and record take a hit, and you’re a little bit close to being the Gomoku master of your Android device.

You’ll keep coming back for more — for challenging games, and for the battle to the top of the league.

Free Download

Gomoku League is  a free Android app. It’s small and fast — and asks for no permissions. Download and enjoy.

Gomoku League available in the Android Market


I finished and released my first Android app. The app is  Gomoku League. Your objective is not simply to win a game of Gomoku, it is to win enough games to be first in the league. It’s a free app so give it a try.

For more information on Gomoku League, see the full description in the Android Market: https://market.android.com/details?id=com.wglxy.gomoku.a.

Gomoku League Presentation at Tridroid

I presented my Gomoku League app at the local Android Meetup group (Tridroid) last night. I talked about the game of Gomoku, the idea for a league app, how I built it, what I learned, and free versus paid apps. I also announced that a test version of the app was available for download.

The presentation link is here: Gomoku League Tridroid presentation.

If you’d like to try this Android app, you can download it here: Download test version of Gomoku League.

About TriDroid

The TriDroid Meetup group is located in North Carolina near Raleigh, Durham, Chapel Hill, and the Research Triangle Park. Visit the group’s home page for more information: TriDroid home.

Preview of Gomoku League Android App

(January 17 update: Gomoku League is now available in the Android Market.)

My first Android app is just about ready. It is called “Gomoku League”. I expect to release it to the Android Market in January.

Gomoku League is an app for the game of Gomoku. It’s more than just the game though. I have made it so that you are part of a league of Gomoku players. Your objective is not simply to win a game of Gomoku, it is to win enough games to be first in the league. Right now, in this initial version, the league consists of you and three AI players. My plan is to come out with additional apps to support online league play with people and AI players.

The Android Market page for Gomoku League is now available here: https://market.android.com/details?id=com.wglxy.gomoku.a.

 

Coming Soon

During December, I am conducting a beta test with a limited set of people. So far, it is going well and providing me with some very useful feedback. I’ll be distributing a beta test apk file here on this blog shortly.

I will also be writing more blog articles about how the Gomoku League app works and how I built it.

My Introduction To Android Activities

One good way to get started with Android is to find others also trying to learn. Here in the Triangle area of North Carolina, there is a Meetup group for Android developers. It is called Tridroid. It’s been a great source of Android tips and a good way to meet other developers.

There was a very good Tridroid meeting earlier this month. Luke Meyer walked us through a tutorial about the Android activity lifecycle. I picked up many really useful tips about getting starting in the Android development world. It’s the sort of thing you don’t get except by watching someone else type and think through whatever comes up on the screen.

I now have a basic understanding of Activity objects. That includes:
- how activities and views connect;
- what the activity lifecycle is;
- what states an activity can be in;
- how one activity can start another.

I took what we worked on in the group and fleshed it out a bit. I ended up with something that looks like Figure 1 and Figure 2.

Figures 1-2:

There’s a text box and two buttons. The first button starts a new activity that runs and takes the full screen. The second button starts a new activity that displays as a dialog box. The second activity is shown in Figure 2

Looking at the manifest file, you will see that there are three different activity definitions. Two are ordinary: Main and Sub1. DialogActivity is different. Note the theme attribute value “Theme.Dialog”. That says that it should start as a dialog activity.

<activity android:name=".Main" android:label="@string/app_name">            
 <intent-filter>
 <action android:name="android.intent.action.MAIN" />
 <category android:name="android.intent.category.LAUNCHER" />            
 </intent-filter>        
</activity>        
<activity android:name=".Sub1" android:label="Sub1 Activity"></activity>        
<activity android:name=".DialogActivity" android:label="Read This"
              android:theme="@android:style/Theme.Dialog">        
</activity>

As shown in Figure 2, the DialogActivity overlays the previous activity.

The next figure shows what the Main onCreate method looks like. After setting its content view, it locates the two buttons with findViewById and defines actions for the button clicks.  The two actions start activities in exactly the same way.  You see that it does not take much to start an activity, just a call to startActivity with the Activity class you want to run. As mentioned above, it is the theme attribute that makes the second one run as a dialog.

Figure 3: onCreate method of Main (click for larger image)

If you are new to Android, you will want to spend a bit of time understanding the call “setContentView (R.layout.main)”. There is quite a bit of Android magic there. Basically what it is saying is set the main view for this activity to a view defined by the main.xml file in the resources layout folder (/res/layout). You can define view objects in java code or in xml files. My sense so far is that most people find it more convenient to define the views in xml files. If you look in the resources folder of this app, you see three layout files. The main.xml file lays out the view with an EditText and two Button views.

Note the last line in the onCreate method. It is a call to a trace function. That is the thing that makes the activity lifecycle come alive. In each of the activity’s On methods (onCreate, onStart, onResume, etc.) there is a call to a trace method. The method makes an entry in a debugging log and also throws something up on the screen so you can see the transition.

Figure 4: Toast message

Those little messages help a lot. You can see what happens when you start another activity. You can see what happens when you stop an app. And for a little surprise, see what happens when you change the orientation of the device — the activity gets completely shut down and restarted. Knowing that should save a lot of time later in your real app. (By the way, to try that in the emulator, use CTRL-F12 and CTRL-F11 keys.)

The trace methods look like this:

public void toast (String msg) {  Toast.makeText (getApplicationContext(), msg, Toast.LENGTH_SHORT).show (); }
private void trace (String msg)
{
 Log.d("Demo", msg);
 toast (msg);
}

The Log.d call puts things into the Logcat part of the DDMS window. The toast call displays a short-lived message on the device screen. Both are those help a lot in debugging. If like me, you still use System.out.println, you should know that these messages end up in the Logcat area too.

Figure 5: Logcat within DDMS (click to see larger image)

Source Code

Source code is available in Google Docs. It is a zip of an Eclipse project. It was tested with version 2.2 of Android in the Android Emulator. My Eclipse version is 3.5.2.

If you find that the app does not build in Eclipse, be sure to do a clean build by using the “Clean” item on the Project menu.

References and Acknowledgements

If you have not already done so, read the Android Fundamentals article.

Thanks to Luke Meyer for a great code-and-tell session. Check out his blog at http://sosiouxme.wordpress.com/.



Follow

Get every new post delivered to your Inbox.

Join 73 other followers