PDA

View Full Version : Defender DS Sourcecode



wraggster
November 14th, 2007, 06:46
News from Ant512:


Based on the fact that I don’t get much time to work on my homebrew projects, and that Woopsi is currently monopolising all of that time, I’ve decided to release what little of DefenderDS I managed to put together.

The archive is here:

DefenderDS (http://ant.simianzombie.com/files/source/demos/nds/defenderds.zip)

As usual, it’s a VC++ project. The whole lot is under the BSD licence, so pinch any bits that you want for your own projects (remembering to abide by the few restrictions imposed by the licence).


From what I remember, the interesting parts of the code are the animated sprite class, palette cycler class and the sprite number management system (which would need to be stripped out of the Game class and inserted into a new class to be useful). The sprite class simulates a fixed-point single decimal place for sub-pixel movements, by internally multiplying all its values by 10 (though it doesn’t do sub-pixel rendering, natch). The wrap-around functions are specific to Defender, though, and probably won’t be much use elsewhere.

The code is getting on for 8 months old, so I’d probably do things in a different way now. Looking through it, I can’t see any obvious problems, though, aside from it not drawing an explicit distinction between class members and other variables in the naming convention.

So far, it has the following features:

Background mountains
Humans
Landers that scout for humans, tracking the mountain terrain
Lander warp-in
Lander explosions
Lander mutation
Scrolling
Palette cycling
Scanner
My homebrewing plans for the future mainly involve Woopsi - getting the library finished, possibly porting it to the GP2X-F200, and then maybe even writing some applications with it (as that was the whole point of the exercise). Unfortunately, that means DefenderDS is probably a dead project. Shame, really, as this whole blog exists solely because I wanted to keep a development diary for the game. Funny how things turn out, innit? Still, DefenderDS served its purpose - it was an introduction into DS homebrewing, let me dust off my Blitz BASIC skills, and expanded my C++ knowledge.

http://ant.simianzombie.com/blog/?p=177

flexiverse
June 3rd, 2010, 18:50
News from Ant512:


The archive is here:

DefenderDS (http://ant.simianzombie.com/files/source/demos/nds/defenderds.zip)


http://ant.simianzombie.com/blog/?p=177

Hey man could you provide an updated link? Just the link above doesn't work...

:thumbup:

flexiverse
June 3rd, 2010, 18:51
News from Ant512:


The archive is here:

DefenderDS (http://ant.simianzombie.com/files/source/demos/nds/defenderds.zip)


http://ant.simianzombie.com/blog/?p=177

Hey man could you provide an updated link? Just the link above doesn't work...

:thumbup: