Monthly Archive for January, 2008

GP2X Pattern Maker - two videos

gp2x-beta-01.jpg gp2x-beta-reduced.jpg

I have uploaded two new videos to my You Tube Channel showing the Pattern Maker application that I wrote for the GP2X.  This is pretty much the same version of the application used for Blipfestival 2007.

The application holds about 100 equations, each with several variables whose values are set with the joystick and buttons.

One video shows the application using an 8 bit surface and the other shows the same application but dividing the color values down, giving a reduced palette.

GBA video on You Tube

GBA screen shot (clip from video posted on you tube)

In a previous post, I mentioned an application that I wrote for the Gameboy Advance for Blipfestival 2007. As I mentioned in that post, it’s very similar to the applications that I’ve written for other platforms like the gp2x but found that at 16 MHz writing pixels to the screen is a little crazy.

Anyway… I’ve posted a video of this and plan to get back to other GBA experiments in the not too distant future.

GBA visuals

GBA screen shot GBA screen shot GBA screen shot

(more screen shots here)

For Blip Festival 2007, I was determined to do all of my visuals on game systems rather than using a laptop. My gp2x applications were ready but I wanted to try another platform. Dusted off my Gameboy Advance and thought that due to the fact that just about everyone can get there hands on one of these, it would be a great platform to write some video applications for. I spent the next few weeks reading everything that I could find on the web about GBA programming.

I ended up having several small applications written in time for Blipfestival. They were all written in C. A few use images as sprites but most are my usual style - math. Basically, I write a bunch of equations and map them to a button so that the user can push and choose (or get a random one). Each equation has some variables which are mapped to the D-Pad (Joystick) so that the values change with up/down, right/left.

The GBA uses a 16.78 MHz ARM processor and at that speed it’s kind of crazy to be writing individual pixels to the screen, but something that I wanted to try after doing it with success on the GP2X. I plan to revisit the code for these and see if they can be optimized to the point where others might like playing with them. If not, I’ll try other approaches.

I finally got around to doing some video captures of what I’ve done so far - thanks to Bitshifter for loaning me his TV out adapter. I’ll put them together with some music and post on You Tube later this month.

For now I’ve posted more screen shots on this page.

Seagate FreeAgent on Linux

FreeAgent

So maybe I’m the last person on the block to have to figure this out but… if you get a Seagate FreeAgent and use Linux you might have a surprise. Mine was that the file system would periodically become readonly. It turns out that this problem has to do with the fact that the drive spins down after 15 minutes and doesn’t wake up correctly under Linux. There are a number of workarounds and solutions that I’ve seen on the web (including someone who uses a cron job to write to the disk every 13 minutes to keep it awake).

Here’s what worked for me.

First, you’ll need to install sdparm and note where your drive is mounted, for me it was /dev/sdc4 yours will likely be different. Then do the following (again using YOUR /dev path not mine) as root:

# sdparm -al /dev/sdc4
# sdparm –clear STANDBY -6 /dev/sdc4
# sdparm -al /dev/sdc4

NOTE there are TWO dashes before “clear” on the second line.

This worked for me and when I get time, I’ll go over the other things that can be set with sdparm.

Pygame Book

I recently Beginning Game Development with Python and Pygame: From Novice to Professional (Beginning from Novice to Professional)reviewed the book “Beginning Game Development with Python and Pygame: From Novice to Professional (Beginning from Novice to Professional)” by Will McGugan at Amazon. If you read my review you’ll see it was somewhat a mixed reaction. I was really hoping to find the perfect book for teaching game programming and while this one is good and covers some interesting topics, I think it may not be as hands on as most students would like. As some of the other reviewers mentioned, they would have liked to see a full working game.

That being said, I was cleaning up my desktop in preparation for going to CA next week and found some code that I was playing with while reading this book. This code comes from Chapter 4 of the book where the author is discussing the pygame.draw functions. Since I’m always playing around with math based visuals, I decided to tweak the examples a bit. These aren’t rocket science or even useful for a game, but give an idea of how you could do visuals with pygame.draw

pygame circles

circleTest.py draws circles across the screen in different directions.

pygame lines

drawingLinesMOD.py draws perspective lines across the screen bobbing to a sine wave.

polygons

polytestRAND.py draws random polygons on the screen - kind of screen saver-ish

So while none of this is ground breaking, I think it shows how you could use Pygame for doing visuals. In fact, about a year ago I was doing that. Dots, Plasmas, Blurs, Rotozooms, etc. but decided to go with C/C++ instead because it was considerably faster on the GP2X which was my target platform. Still, if I can find any of those Pygame demos I’ll post them. Or you can search and find some other ones on the web.