Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: saintrunner on November 11, 2011, 10:01:56 pm

Title: help with my mario shotgun game!
Post by: saintrunner on November 11, 2011, 10:01:56 pm
Ok so I need some help!
As you see in the screenie, the goomba snaps down to each line. I am trying to fix this by setting it so if the (a-x axis,b-y axis) :(pxl-test(a,b+8)=0 and pxl-test(a+7,b+8)=0) :b+1->b This should work but it isn't. here is my current code....please help me get it to work!

:repeat getkey(15)
:bunch of stuff
:display graph
:bunch of stuff with the getkeys
:end
:pt-change(A,B,pic1B)    //pic1B is the goomba sprite
:A-1->A
:(pxl-test(A,B+8) and pxl-test(A+7,B+8)
:If (pxl-test(A,B=8)=0 and pxl-test(A+7,B=8)=0)
:B+1->B
:End
:pause 20
:pt-change(A,B,pic1B)
:End



If you see the problem(s) please tell me what to fix! I think it's an order problem, but im not sure.
Title: Re: help with my mario shotgun game!
Post by: Darl181 on November 11, 2011, 10:09:17 pm
Hm, are you modifying B at any other part of the program?
In the code you posted, I'm not seeing anything that would add to B (making it move down) so there's something else methinks...
Title: Re: help with my mario shotgun game!
Post by: saintrunner on November 11, 2011, 10:12:49 pm
Here's the source if you want to see it. It doesn't work though.