Tuesday, May 08, 2007

Programming 2D Games

Are you interested in programming 2d games? Got a PC, Mac, or linux box? That all you need with the new SwinGame API.

The SwinGame API was developed initially by Daniel Chambers as a Windows API for developing small games. Over the last few weeks I have been modifying the code to extend its features, and to make it cross platform. The latest version is still in testing, but is worth looking at if you are interested in creating a 2D game.

SwinGame features:

  • Window drawing is double buffered
  • Create a Window of any size
  • Load and display images of various formats including bmp, png, and jpg
  • Works with 32 bit images, including alpha blending
  • Load true type fonts
  • Read and write text
  • Draw lines, and shapes
  • Sprite management routines
  • Load and play sounds in various formats including wav, ogg, and mp3
  • Detect collisions between sprites, bitmaps, and areas of the screen
  • Perform pixel level collision detection
  • Vector manipulation routines
  • Use matrices to manipulate game vectors
There are a couple of games in the process of being built by the 1st year PSD students at the moment, and I will make these available for download from SwinBrain as soon as they are complete.

2 comments:

Anonymous said...

Sweet, can't wait to see how you've extended what I wrote.

Anonymous said...

that's so awesome, props to DC.
any chance of enabling the playback of MID files though? ^_^