First Demo

My DS application has come a long way in the past few weeks, I think it is finally time to present the fruits of my labor. I made a video to show off the player movement, world movement, camera scrolling and some of the simple AI / world effects I have going. This is only the beginning though! Everything is now in place for me to build more cool things. There are a couple more things I would like to show off in the near term which I'll post here and on the YouTube channel so keep an eye out!



If you would like the demo shoot me an e-mail. Its not at the point where I'd like to publicly distribute it however.

Video Conversion - mencoder + ffmpeg

This is just a quick post. I am working on creating a video for YouTube to show off the current state of my project (see my prior post). Several challenges came up during this process, this is how I handled them:

1) I needed a desktop recording program to record the emulator.
This was easy, I installed a program called "gtk-recordmydesktop" and was able to figure everything out with no instructions. On Linux (Ubuntu) this is in the package manager so it was as easy as "sudo apt-get install gtk-recordmydesktop"

2) The resulting video is a non-standard resolution and format, in this case my video file is out.ogv with 272 x 432 resolution. My video editor wants a dv file with 4:3 aspect ratio and YouTube wants 640 x 480 resolution. Getting this to the necessary aspect ratio / resultion / file type required re-encoding / padding / scaling with mencoder, and a transcode with ffmpeg.

I found this command to do a straight conversion:
mencoder out.ogv -ovc xvid -xvidencopts pass=1 -o output.avi

The file was not the correct aspect ratio however, to get that I add expand=-304:0:152:0 to pad the video:
mencoder out-2.ogv -vf expand=-304:0:152:0 -ovc xvid -xvidencopts pass=1 -o output-padded.avi

This is great, but I still need 640 x 480 resolution, so I add scale=640:480 and have the final result:
mencoder out-2.ogv -vf expand=-304:0:152:0,scale=640:480 -ovc xvid -xvidencopts pass=1 -o output-padded-scaled.avi

All thats left now is to convert to DV with ffmpeg:
ffmpeg -threads 2 -i output-padded-scaled.avi -s pal -r pal -aspect 4:3 -ac 2 -ar 48000 -y output-padded-scaled.dv

3) Now to get back to editing my video for YouTube!

Small addendum:
I used my cell phone to record the audio, which saves in AMR format, which is proprietary and not easy to convert. I managed to get it with the following commands:
amrnb-decoder Input.amr audio.sw
sox -r 8000 audio.sw audio.wav


I used references:
google
http://forum.doom9.org/archive/index.php/t-1
31659.html
http://www.kinodv.org/dcforum/dcforum?az=show_topic&forum=103&topic_id=609
http://aldeby.org/blog/index.php/encodedecode-3gpp-amr-files.html

Side Tracked

I have a new addiction which has put all my other projects on hold. Nintendo DS Homebrew. A couple years ago I took a look at the homebrew development tools and libraries available for the DS and Wii, but didn't get much further than building and tweaking the example programs. Recently I took another look at the Nintendo DS homebrew devkit, devkitPRO. After a few hours I had myself a nice PONG clone, complete with touchpad control. Well, it was so easy to put together that I started working on something bigger.

That was all two weeks ago, and my bigger project is coming along nicely (5000 lines strong). At the core my "game" is an ant simulator, complete with randomly generated underground tunnels, a surface world with food spawns and multiple possible underground <-> surface links and a queen that lays eggs and soon breeders to move the eggs away from the queen, soldiers to fight spiders, spiders, etc. I'm nearing the point where I can stop with the ant simulation portion of the project and start with the game portion. The Nintendo DS can currently handle simple AI movement for thousands of ants without a hitch, but drawing more than 50-100 on the same screen becomes problematic.

I have several ideas kicking around including things like create a colony of 1,000 ants, ants-vs-humans and ant colony vs. ant colony. But those are still being designed.

I made a high level checklist for things I'd like the projects to have at a high level, and am making good progress on it. The asterisk indicates that the bullet has been completed:

*1. Create the 2D underground world.
* - 2d
* - destructable, player
* - basic types:
* -Dirt
* -Empty
* -Surface
* -Barrier

2. Create basics
* - Player
* - Ants
* - Basic AI
* - Camera following
- Player control
* - D-Pad
* - Touch, simple (broke this after I made the surface.
- Touch, dijkstra

*3. Create surface world
* - Link to underground
* - Objects (Rocks, Food), carryable by Player / Ants
* - Object spawns (food on surface).

4. Basic ant functions
* - hp / death
- extended statistics (not sure what these are)
* - Food / Eating
* - Pickup / Drop logic (i.e. stacks of food)
* - Queen / Egg production
- Egg / Hatch (i.e. Game loop that checks underground for growing eggs.)
- Collision detection
- Grid, patch knows when ant is on it
- Two ants per patch, if friendly + enemy ants, fight.

5. A.I.
- Ant action AI's:
* -Wander
* -Queen, egg production
-Forage
-Attack
-Defend
-???
- Base design
* -simple/random
-more interesting?

6. Gameplay,
- Enemies (Pincer pit, spider, foot, lawnmower)
- Workers / Breeders / Soldiers
- Scores
- Ant combat.
- Win conditions
- levels

7. Polish
- Terrain themes (outdoors, patio, kitchen, leg, etc)
- Object models:
-dirt
-barriers
-???
- Sound Effects
- Background Music