0 Members and 1 Guest are viewing this topic.
I seriously don't get this, in most of my programs I use X+2->X and sometimes even 3. In order to avoid skipping vertical lines I usually check if (X<88) and (X<87) and stuff like that.Either way, I am using Axe 0.5.2, but perhaps it was not the program's problem, I shall try again.
512→Y12288→X0→A→BRepeat getKey(15) ClrDraw Line(0,63,95,63) Pxl-On(X/256,Y/256) If getKey(2) A-8→A End If getKey(3) A+8→A End If getKey(4) B-8→B End !If (pxl-Test(X/256,Y/256+1)) B+1→B End X+A→X Y+B→Y DispGraphEnd
512→Y12288→X0→A→BRepeat getKey(15) ClrDraw Line(0,63,95,63) Pxl-On(X/256,Y/256) If getKey(2) A-8→A End If getKey(3) A+8→A End If getKey(4) B-8→B End !If (pxl-Test(X/256,Y/256+1)) B+1→B End<add this> If (pxl-Test(X/256,Y/256+1)) 0->B End</add this> X+A→X Y+B→Y DispGraphEnd
Its because you are increasing the velocity of B when you collide. You want it to stop right? Try 0->B instead of B+1->B
How many bytes is an 8x8 monochrome sprite?
There's not code for stopping.try this:Code: [Select]512→Y12288→X0→A→BRepeat getKey(15) ClrDraw Line(0,63,95,63) Pxl-On(X/256,Y/256) If getKey(2) A-8→A End If getKey(3) A+8→A End If getKey(4) B-8→B End !If (pxl-Test(X/256,Y/256+1)) B+1→B End<add this> If (pxl-Test(X/256,Y/256+1)) 0->B End</add this> X+A→X Y+B→Y DispGraphEndAlso, you should put a terminal velocity in, such as B can't be greater than 256. Quote from: Builderboy on May 19, 2011, 05:00:26 pmIts because you are increasing the velocity of B when you collide. You want it to stop right? Try 0->B instead of B+1->Bactually, that's his fall code. note the "!"