Morgawr's DSBallZ application alpha test

Discussion in 'NDS - Emulation and Homebrew' started by Morgawr, Jan 23, 2009.

  1. Morgawr
    OP

    Morgawr GBAtemp Fan

    Member
    1
    Dec 18, 2008
    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 @_@ ) 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 [​IMG] 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
     
  2. Sarvesh50

    Sarvesh50 Aye!

    Member
    3
    Jul 7, 2008
    Netherlands
    Netherlands
    Good luck newbie i want to code too but i cant compile it dam#ed
     
  3. Morgawr
    OP

    Morgawr GBAtemp Fan

    Member
    1
    Dec 18, 2008
    Italy
    bumpity bump [​IMG]

    nobody can help? T_T
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice