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."





No comments:

Post a Comment