![]() |
Platforms, Frameworks & Libraries »
Mobile Development »
Games
Intermediate
Color Invasion For the PocketPC or .NETBy James PoagThis is my submission for the .NET CF contest for May 2004. It is a game utilizing the .NET Compact Framework for the PocketPC that demonstrates the ease and power or .NET CF. The game allows singleplayer mode against the computer, or Multiplayer over a network or Internet connection. |
C#, .NET CF, Mobile, .NET 1.1, Win2K, WinXP, Win2003VS.NET2003, Dev
|
|
Advanced Search |
|
|
|
||||||||||||||||

This game demonstrates the simple, yet powerful .NET Compact framework that allows concurrent development for the PocketPC as well as the PC. The code is a demonstration of multithreading, networking via TCP/IP, drawing using graphics, and simple game and AI mechanics. The game is based on a risk style arcade game I saw at a truck stop.
This version of the game was inspired by the .NET Compact Framework Contest in May of 2004. It is written in C#. The networking code was a push to stand out and represents my first ever attempt at networking, something made very simple in .NET CF.
Thanks to the .NET Framework, the source includes a Compiled Help File (.chm) that documents the namespaces, classes and their methods/properties.
To compile the code, you need VC.NET and possibly the embedded VC 4.0 download from Microsoft. Simply compile and deploy to the PocketPC, Pocket emulator, or run directly from your machine.
This is my first attempt at a game and the first time I've ever done networking. The .NET CF made it possible to do both very quickly.
I noticed some benefits afforded to me because of .NET and .NET CF:
Graphics class allows for redrawing just the updated tiles instead of drawing the whole screen.
When you change colors, any tile surrounding your current set will be added to your collection. The point of the game is to occupy the most spaces on the board. If you play over TCP with another person, you take turns back and forth. If you are playing single player, the Computer AI takes a turn and returns almost immediately. The AI becomes progressively harder, the more games you win. If you win 6 games in a row, it becomes the hardest to get. If you can beat this, then you need to play against a human!
In order to get Multiplayer working, you must follows these steps:
Requires that you download and install .NET CF onto your Mobile device. This is only necessary once to enjoy the multitude of applications to follow.
This is a picture of the beginning of a match between the emulator and the desktop. Notice, the boards are the same, that means they're connected and playing!
This is a picture of the beginning of a match between a Computer and another Computer. Notice, the boards are the same, that means they're connected and playing!
This is a picture of the Networking box. If you click on "Net", you get your connected IP for your service. If you are behind a firewall, you get the LAN IP in this box. If you click on "LAN", you can see your LAN IP address.
Where would we be without our friends and family? Special thanks goes out to all those who helped test and made suggestions for this project:
A special thanks to Mr. Lewey Geselowitzs for helping me debug this application, compile and test it on his PocketPC, and for general coolness. Cheers!
| You must Sign In to use this message board. | |||||||||||||||
|
|||||||||||||||
|
|||||||||||||||
|
|||||||||||||||
|
|||||||||||||||
General
News
Question
Answer
Joke
Rant
Admin
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 28 May 2004 Editor: Smitha Vijayan |
Copyright 2004 by James Poag Everything else Copyright © CodeProject, 1999-2009 Web12 | Advertise on the Code Project |