Marshmallow Duel DS

2.0

About

Welcome to the Marshmallow Duel DS source code. MDuel DS is a free game built for the Nintendo DS console, using DevKitPro and PALib.

It is a sequel to / extension of Marshmallow Duel, a game originally created by Duncan and Roger Gill in 1996 using TurboC and some archaic PCX libraries. Ah, those were the days.

To read more about MDuel DS and to download the latest official version, please go to http://mduel2k5.spadgos.com/mduel96/mduelDSdownload.php.

Legal

MDuel DS was created entirely by pospi, just for a bit of fun really. You can view more of his projects or contact him by going to http://pospi.spadgos.com.

The source code is released under the GPL, which means that it is free for anyone to use or modify so long as you respect a few simple guidelines. Basically, you must provide the full source code whenever you release something based on this code, and you must document all your changes to the original source code with the appropriate @author and @date tags. A copy of this license is included in gpl.txt.
License summary follows:

Marshmallow Duel DS v2
Copyright © 2007 Sam Pospischil http://pospi.spadgos.com

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

The Code

The MDuel DS source code is generated with doxyGen and GraphViz, which should make it very easy to follow, so if you plan on editing it please stick to some quality documentation. Methods, classes etc are displayed with their comment headers and are hyperlinked to all locations in the source code that reference them. To view the documentation for functions linked to a member, click on the name of the function in the member's call graph.

For testing debug builds, I recommend no$gba for quick testing on Windows and a DS flashcart like the M3 adapter for running the game on hardware. When compiled with the compiler directive __MDDEBUG (see macros.h), the game attempts to output debugging info to a log file if the flashcart supports FAT drivers. If this is unavailable, the information is printed to the bottom screen instead.

The game engine is fairly simplistic and features only a handful of base classes. These are:

All objects in the game are derived from these and implement game logic at higher levels. Note that most specific Weapon subclasses are not documented fully as a good understanding of their behaviour can be obtained via analysis of the Weapon class itself.

There are 18 weapons in this version, and please note that the parachut is not a typo and should definitely never have its spelling corrected.

Current Bugs

Wishlist

Here are some things I, personally, would like to see happen one day:

Compilation

Required libraries

If you plan on compiling MDuel DS, you're going to need to install some libraries first:

With DevKitPro, only the core files and ARM libraries are necessary. Other stuff is for development on different platforms.

Newer versions of both may well work for you with little or no fiddling, so if you're feeling adventurous then by all means knock yourself out. After all, it can only make the game more stable. If you do upgrade, the weapon time statistics and SRAM saving should be checked on emulators and DS hardware as these were the problematic areas with more recent libraries.

PALib library edits

If you are using PALib 060917 then an additional change is required to its internals to allow for resetting screen VRAM independently. If you decided to try your luck with an upgrade, then this is not necessary. To find the required changes, open up the 'libraryEdits.cpp' file included under the 'notsource' directory. After making the changes listed, simply recompile PALib by navigating to DevKitPro/PALib and running build.bat.

Choose your compiler

So all that stuff is installed, and you're ready to compile. But how?

The project is set up to be compiled under Visual Studio 2005, but if you want to compile 'normally' under GCC because you hate Microsoft, then that's perfectly doable. Here are the steps to follow:

If you have a copy of Microsoft Visual Studio 2005 Pro then you're in luck, because that's what I used. I don't know if VS2005 Express will work or not but you'll probably get lucky. Note that to make VS2005 recognise DevKitPro properly, you'll need to add a DKP_PATH environment variable with the path to the main DevKitPro folder. You should be able to open up the project file and compile straight away after that last step.

Just for reference, here are the environment variables you need to have set in either case. They should be set automatically by the DKP and PALib installers, but just in case...


Generated on Tue Mar 13 23:27:52 2007 for MDuel DS by  doxygen 1.5.1-p1