Nemesis-7 rc1 Game in C#
Submitted by: Tony Tromp
User level: Intermediate
Date of submission:
Source code: Deviate.zip
Platform used: Visual Studio .NET Architect edition
Description:
Nemesis-7 is a full-screen 2D shoot'em up that makes use of theDirectInput, DirectSound and DirectDraw interfaces from DirectX. Theplayer controls a spaceship which he uses to duel the computeropponent. I implemented some artificial intelligence to make the cpuplay more human. After doing this I realy had to make him more stupid,because the damn cpu was unbeatable. You can find this code in theGameAI class located in the gameobjects drawer.
History
When I just started the project there was no good resource on DirectXand C-sharp, and therefore it grabbed my attention to write afull-blown DirectX game to prove to my C++ mates that it is possible todo such a thing in C-sharp. With full-blown I mean that it uses DirectXto process both input and output of the game. This generally speeds upthe processing by its low-level architecture. The game I wanted towrite should be sexy, but not too heavy. The reason for this is, Iwanted to share the results with you within a few months and not aftertwo years.
To do:
- Options menu is not finished by the time I released this. So I cut it out.
- Support for DirectPlay, to do some Network battles with your friends.
The programmers notes:
In the src\DirectX\ directory you will findsome wrapped up DirectX interfaces which I created to simplify DirectXaccess while writing code. These classes are easy and straightforwardto use.
DDAnimationClass
The "DDAnimationClass" isa class which let you load a multiple frame indexed bitmap file andgive control to snap the correct frame out of the lot, or present themone by one with a certain Interval and step.
DirectPlayClass
An easy to use wrapper forDirectPlay, which has a sub class called Sound. Within the Sound classyou can Load .wav files to memory, play the sound buffer, play soundbuffer looped mode, and fade sounds in/out.
DirectInputClass
DirectInput is used toprocess the keyboard input actions. It was pretty hard to write thiswrapper, but it really paid off by giving me a much faster responsetime than the normal keyboard and event triggering.
DirectPlayClass
I will add this class when I've finished it. It will allow Network playability of the game.
Special Thanks to:
Ellen Waenink for testing and remarks.
Mark Johnsen for releasing the BreakOut source code.
It realy helped a lot, and I still use the general structure of the game as well as the nice space picture you putted in there J
Andre Lamothe for writing damn good DirectX books
Have fun playing and coding,
Tony Tromp












No comments yet... Be the first to leave a reply!