Compact Pong - game in C# for the Pocket PC (Windows Mobile 2003)
Last updated on December 3, 2016, 15:07 by Sebastian Mihai
Some years ago, before smart phones were common, Pocket PCs were available. They were small devices which offered watered-down office applications, as well as organizer/calendar type functionality.

My Pocket PC is an HP iPAQ, running Windows Mobile 2003. The cool thing about these devices is that they can run programs written for .NET Compact Framework 2.0, a version of .NET which targets resource-limited devices.


Compact Pong is different from regular Pong in that it's a single player game, where the player controls 4 paddles (top, bottom, left, and right of screen), trying to not miss any of the balls which periodically increase in quantity.

Developing an application in .NET CF for Pocket PC is similar to developing a Winforms application for Windows. Having worked extensively with .NET 4.0+, I found dropping down to .NET CF 2.0 constricting. Not to mention that the device was low on horsepower, and everything lagged. However, the tool chain was very easy to install.

One hurdle I had to overcome was the flicker caused by screen updates. I accomplished this by performing the heavy bitmap rendering operations to a back buffer, and then dumping the buffer to the screen.

Another challenge was being unable to rely on a simple "main game loop", like some of my other games on older platforms. Compact Pong is entirely event-driven.

Finally, Pocket PCs have slow CPUs, which, coupled with the overhead of the .NET CLR, meant that video frames had to be skipped in order to maintain a decent game play speed. This also influenced the game design of Compact Pong: I opted for multiple, slow moving balls, rather than one fast ball.

Downloads


Executable - copy this to your Pocket PC, and then run it to play the game

Source code package - Use the following development environment to build and run the game:
  • Windows XP
  • Visual Studio 2005
  • ActiveSync 4.5
  • Windows Mobile 5.0 Pocket PC SDK
Other setups might work, as well. I'm suggesting the above because that's what I used. With the above tools, I could use either an emulator, or real hardware to test my code.

Screenshots




If you use the materials on this page, or any other page on this web site, you do so at your own risk. They are provided "as is". No warranty is provided or implied. I neither guarantee that the materials will work, nor that they will not be harmful in any way.

ZX Spectrum development - Husband Chores (in Z80 assembly language)

Intellivision development - Hotel Bunny

Coverage of my projects

My homebrew cartridges

No Snakes! - a multiplayer game over serial port

Sega Dreamcast development - Overbearing Burgers

Snowdrop OS - my operating system from scratch, in assembly language

libzx - ZX Spectrum game programming library (Z80 assembly language)

Compact Pong - game in C# for the Pocket PC (Windows Mobile 2003)

TOTP (time-based one-time password) authenticator in C# (.Net)

aSMtris - Tetris in assembly language (x86, 16-bit)

Balanced Diet (GBA) limited edition

Gameboy Advance development - Balanced Diet

Atari 7800 development - Poetiru

Arcade ROM hacking - Knights of the Round translation

PocketStation development - Pocket Worm

Sega Game Gear development - Burgers of Hanoi GG

Pokemon Mini development - Mini Cookie

Magnavox Odyssey2 development - Red Green

Sega Dreamcast VMU development - Raining Squares

Nintendo GameCube development - Mama Bear Puzzle

Nintendo Wii development - Groundhog Puzzle

Sega Saturn development - Saturnade

Atari Jaguar development - Jagmatch

Sega CD development - Blackjack CD

Nintendo 64 development - Don't Be Square

Commodore 64 development - Tube64

Sega 32x development - Eight Queens

WonderSwan (Mono) development - Swan Driving BW

WonderSwan Color development - Swan Driving

Animal Keeper - a JavaScript and HTML5 Canvas game

3DO development - Space Invaders Invaders

Sony PlayStation development - The 11th Power

Sony PSP development - Newton Voyage

Nintendo DS development - Geoincursion

Gold of the Kingdoms - an XNA/C# homebrew game

Blue Elf 2 309-in-1 JAMMA PCB - troubleshoot controls not working

Fractals in JavaScript and HTML5 Canvas

Angry Video Game Nerd (AVGN) theme song on the Gameboy Advance

Novice calligraphy - Gothic hand, with letter guide

Video compilation of my classic console homebrew games

Seven segment display circuit with the 4511 decoder and the 4029 counter

A simple Atari 2600 joystick tester circuit

555 timer and 4017 decade counter - traffic lights circuit

Catch That LED! - an electronic game circuit

Capacitor study circuit

BlackBerry PlayBook development - Sheepish Bearings (Native SDK, OpenGL)

Neo Geo Pocket Color development - NGCollector

Neo Geo development - Neo Thunder

Atari 5200 development - Shooting Gallery

ZX Spectrum development - simple input/graphics example

Vectrex development - Scalar Ownage

Nintendo Virtual Boy development - Real Danger

Gameboy Color development - Burly Bear vs. The Mean Foxes (GBC version)

Sega Master System development - Burgers of Hanoi

Colecovision development - Mowleco

TurboGrafx-16/PC Engine development - Alddee

Atari Lynx development - Catkanoid

Nintendo NES development - Invaders must die!

Atari 2600 development - Snappy (batari basic)

Super Nintendo development - Bucket

Gameboy Advance development - smgbalib library

Airplane Vegas slot machine

Sega Genesis development - Gen Poker

(2004) Project One - first university game programming club project

Gameboy development - Burly Bear vs. The Mean Foxes

(2006) RGB Overdose - university programming contest entry