# Visual Basic > Games and Graphics Programming > Game Demos >  C# XNA:  Wormipede Port

## Lord Orwell

This is a direct (nearly) line-for-line port of My old Games Contest Submission: Wormipede, located HERE

I basically converted one function at a time, and split the drawing and processing into different functions for readability and to more fit in with the framework's expectation of code placement:  Namely the Update function is there for code placement of non-drawing code, and Draw is there for actual sprite/background drawing.

The game could still be considered a work in progress, but it's pretty much fully playable.  The only thing that doesn't work is the exit button on screen.  However, i have included xbox 360 controller support via x and y, start and exit buttons, and the gamepad.  

There have been light adjustments to the way the sprites move, but probably the biggest change is that thanks to rotation, i no longer have a different sprite for each direction.  

Issue:  Spider graphic is not transparent.
Issue:  No code to support exiting by clicking button, but close box works.  It didn't work in the original either.
Issue:  Heartbeat sound doesn't loop properly.  This isn't a code issue.  The sound itself is corrupted.
Issue:  High scores aren't stored.  This is in fact intentional.
Change:  Form size is fixed
Change:  Xbox 360 controller support
Change:  Code clean-up (but it's still a wreck)
Change:  XNA instead of DX7
Change:  C# instead of vb6

Requirements:  XNA Studio 4.0, VC# 2010, Updated DirectX.

I will be doing a complete re-write of this from the ground up soon to take advantage of what i've learned, and use per-pixel placement of items and movement instead of a grid.

If anyone is interested in doing some artwork, i could use some tile graphics.  The new version will have 20x20 tiles, and i'm not good enough to make it look good.

If you use any code in here, gimme credit.  :Wink:

----------


## Lord Orwell

i found a package someone wrote on line that allows you to use any joystick with any existing xna game that supports the xbox 360 controller.  It is called xbox360cemu and there's a google code page for it.  You simply drag and drop the files into the directory with the .exe.  As you all know, when a .dll is called, the os looks in the current directory first.  I have gotten my standard usb controller to work not only with this, but Skyrim, Batman Arkham Asylum and Borderlands (although i had to leave out one of the files for it to work in skyrim).  I have not been able to confirm the licensing on the package, so i can't recommend including it in your packages.  I also don't have an actual 360 controller any more to test to see if it messes up functionality of a real one.

----------


## Lord Orwell

(many months later) I just recently got this to work in visual studio 2017, although xna studio won't directly install in it.  If you are running a version of visual studio newer than 2010, follow this guide to get it running in 2017:  http://flatredball.com/visual-studio-2017-xna-setup/ it's fully functional and works as intended, even though you get a warning saying it's not compatible.

----------


## Lord Orwell

XNA has been deprecated but Mono is basically the exact same thing since it was designed as an open-source replacement.  This project will mostly work as-is with mono added, but you'll have to do the hard work of modifying it to change the namespaces.

----------

