Krystals DS is the review of the first game I programmed for Nintendo DS.
Using PAlib, Aslib and devkitPro R19 (Summer 2008), the game was developed in three weeks, participated in the Neo Compo of that year, remaining in 7th place.
The problem is that both versions I used of PAlib and Aslib accumulated several important bugs, combined with the evolution of flashcards and that was compiled with a very old version (and modified) of libnds, has resulted in most of current flashcards play wrong with the best, very bad in most flashcards or directly or work on some.
As this year I had little time to devote to new Ds things, I decided to redo the game from 0, using my library, the latest version of libnds and program it in C + + to test to see how it behaved in DS (both library and other DS games are programmed in C). Also, I changed all backgrounds now being animated in “Mode 7″ and the music, because I can not use mp3 format because Maxmod likes more MOD format. Also each game will be somewhat different, since the order of the backgrounds and music will be random.
Playability are also new, being more difficult to perform combos, since we will never have a piece with two gems of the same color.
I decided to write an example of using vectors in C + + for dynamic management of Sprites in DS. With this, we can create or destroy instances of a particular type of Sprite, without having to be aware of Sprite ID, because if we destroy a Sprite, automatically release all memory that this use, including its variables control. The other advantage is that all information on this Sprite is created using pointers, so we can handle this Sprite from anywhere in the program without using global variables or static arrays.
The video is recorded with the phone so you can see that there is no trap, shown as the first (notice the OAM viewer on the left), make the sprites in random positions, but taking the ID’s of a queue. Once created 128 Sprites, we created and destroyed by objects that are stored in a vector. When we destroy it, we keep the internal ID of Sprite in the queue again, so that it can be reused later. This thanks to the use of vectors is done automatically, so you do not have to watch for reorder.
Here you have the entire project, with all the comments that I found appropriate. Download full project.
This morning I made some computer archeology and i have recovered two of the first games i coded nearly 20 years ago. Both are programmed in BASIC for the MSX computer.
I prepared a zip file with the 2 games in DSK format to can use it in the real hardware or emulator, plus the source code of both games.
As some of you may know , since last October i’m teaching at the School of Art and Design in Vilanova i la Geltru, at a higher level of design and game programming. As I have also been off, today I bring an exercise I’m preparing for sophomores, which once completed will share with us.
For now, you can have a look and play with it online by clicking the following link: