Saturday, April 10, 2010

Triton Rover

I gave the game a name, a storyline,  and outlined the lessons.

It's all in a Google doc that I link to from the project's home page.

http://code.google.com/p/android-opengl-dbtb/

Each lesson will build on the previous one, and all will be contained in one project.  We'll probably need to breakout some lessons and add others.

Thursday, April 8, 2010

The Android OpenGL Skunkworks Project

Tonight I created a project in Google Code called android-opengl-dtdb.

This project is meant to be a skunkworks project to facilitate learning Android OpenGL programming. We're (ie. me and any volunteers -- all are welcome) going to build a 2d OpenGL game from scratch.

Preliminary Setup (Mac)

I normally use Git these days but since we're using Google Code, I set up the project to use Mercurial.

Here's the command to install Mercurial on the Mac, if you use MacPorts:

% port -v install mercurial; # Install mercurial if you have MacPorts installed


Creating the Android Project

Create a new Android project using the android command:

% android create project --target 1 --name chaos --path ~/dev/android/android-opengl-dbtb --activity GameActivity --package org.chaos

I use the IntelliJ Java IDE so I might be including some of its specific files if don't get the .hgignore configured properly.

There's a git/hg Rosetta Stone that I'm using as my guide.

Create .hgignore file:

% cat > .hgignore
bin/*
.idea
out/*

Add files to hg:


% hg add .

Commit files:

% hg commit -m "First commit "; # Ugh, this will fail!!

The commit doesn't work because I need to set up my username in my .hgrc file.

Here are the instructions for all platforms: http://www.selenic.com/mercurial/hgrc.5.html

And here's what I had to do:

cat > ~/.hgrc
[ui]
username = mmellinger66@gmail.com

Now I can perform the commit:


% hg commit -m "First commit "

Next I push my changes to the Google server:

% hg push

You'll be prompted for your username and GoogleCode.com password (different than regular Google) which should be found here: https://code.google.com/hosting/settings

Success!  The code is checked in (yes I peeked).

Now where do we go from here?   Any ideas?  The only rule that we have is "Don't break the build".  That the -dbtb in the project name.  I expect that the project will get messy and be chaotic.

One of my favorite programming quotes is something I read in Jon Bently's  Programming Pearls books many years ago:

Thomson's Rule for First-Time Telescope Makers: "It is faster to make a four-inch mirror then a six-inch mirror than to make a six-inch mirror."





Friday, April 2, 2010

An Android OpenGL Deep Dive

I'm doing a deep dive to learn OpenGL on Android. Here are a few of the resources that I found in the past few days. First, if you don't know OpenGL, I'd start with Erik Bergman's Android OpenGL
Tutorials. These seem to be based on the NeHe Android ports.

From there I would look at few sample projects. I found these to be helpful:


http://code.google.com/p/akjava-android-project/
http://code.google.com/p/android-gamedev/

This project includes a Space Invaders clone.

As well as sample code to load .obj and .md2  files.

http://code.google.com/p/android-gl/
These 14 tutorials are based on this C++ tutorial, which have been rewritten in Java for Android.
http://www.zeuscmd.com/tutorials/opengles/index.php


http://code.google.com/p/nehe-android/


Finally, here's a Tetris clone:

http://code.google.com/p/monolithandroid/


Let's not forget Replica Island, a complete 2D side-scrolling  game.


The complete source can be found on Google Code.