Homebrew Morgawr's DSBallZ application alpha test

Morgawr

Well-Known Member
OP
Member
Joined
Dec 18, 2008
Messages
330
Trophies
0
Age
32
Website
Visit site
XP
138
Country
Italy
Hello everyone.. what is this you may ask? it's NOTHING >_> yeah, exactly.. I started programming for the DS two days ago and wanted to try a "simple" (not so simple since I've been agonizing on it @[email protected] ) application where a ball bounces on the touch screen and whenever you touch it, it duplicates and so on.

I managed to get this to work quite well but there are some bugs that bug me (lol pun).


First of all, when I make a new ball out of the touched one, I have to put its initial coordinates as the same as the previous ball, and that seems to make the DS crash (the sub / upper screen goes white) even though I don't know why since I think it should just paint the two sprites one on top of the other (I "solved" this bug just with adding 1 to both x and y coordinates of the created ball)

Another bug is that when I get 17 balls (I counted them in debug console) on screen the upper screen goes white/blank but the application goes on, but when I get 32 balls and I try to touch one to make a new one the whole application goes off (and freezes). I think this is due to some memory leak or something like that, but I'm quite a newbie with all this VRAM stuff and I don't know how to make it work better and optimize it.


Another problem, not a bug actually, is that the function to create a new ball to me seems like a huge memory waste, because every time I want to make a new ball I've got to load the ball sprite from memory and set it to the desired sprite entry... and that seems a bit redundant? Is there a better way?


ps: the code may seem similar to the one of Patater's tutorial, because it's where I took the basic part of it
wink.gif
thanks for the feedback
pps: the code looks a bit messy... sorry if it's difficult to read #_#


this is the file in .zip format with both .nds and source code in it. http://files.filefront.com/DSBallZzip/;130...;/fileinfo.html
 

You may also like...

General chit-chat
Help Users
    AncientBoi @ AncientBoi: brb