:.AAHOOK
:DiagnosticOff
:[1028103854382828]➔Pic1
:[102A123C50B82828]
:[FFFFFFFFFFFFFFFF]➔Pic2
:1➔R➔X−1➔H➔Q➔B➔P
:48➔Y
:Fix 5
:Repeat getKey(15)
:Lbl 1
:ClrDraw
:If X<<1 ;Needs boundaries for now
:1➔X
:End
:If X>88
:88➔X
:End
:If (H=0) or (H=1) ;H is pretty much the status of the player while grappling
:If getKey(3)
:X++
:If H=1
:S++ ;increases rope top X coord. Will explain later
:End
:1➔R
:End
:If getKey(2)
:X−−
:If H=1
:S−−
:End
:0➔R
:End
:End
:If H=1 or H>40
:If getKey(2)
:0➔R
:End
:If getKey(3)
:1➔R
:End
:End
:For(A,0,11)
:Pt-On(A∗8,1,Pic2
:Pt-On(A∗8,56,Pic2)
:End
:If (getKey(54))∗((H=0)+(H>40))∗(B=0) ;Checks if ready to grapple
:X➔S
:Y➔T
:R➔θ
:Repeat pxl-Test(S,T) ;S and T are the top rope coords
:T−−
:If θ
:S++
:Else
:S−−
:End
:End ;That went at a 45 angle to find the ceiling
:If Y=48 ;Checks if on ground and makes it jump if not
:1➔H
:Else
:2➔H
:End
:End
:If H=1
:Y−− ;While jumping, the player can change direction. In the beggining getkeys, I made it change S to preserve the 45 degree angle.
:If Y≤28 ;I should actually put the pxl-test part after the jump so that the moving of s is unneccesary.
:2➔H
:End
:End
:If H>1
:If H≤40
:1➔P
:Line(X+7,Y,S,T) ;Line draw
:Else
:0➔P
:End
:If H<20 ;Here down checks the status of the player and adds or subtracts from the coordinates
:Y++
:If θ
:X++
:Else
:X−−
:End
:H++
:If Y=48
:0➔H➔P➔S➔T
:10➔B
:End
:End
:If H≥20 and (H≤40)
:If θ
:X++
:Else
:X−−
:End
:Y−−
:If Y<9
:56➔H
:0➔P
:End
:H++
:End
:!If H≤40
:If H≤52
:H++
:If θ
:X++
:Else
:X−−
:End
:If Y<9 ;Abort if the guy touches the ground
:56➔H
:0➔P
:End
:Y−−
:ElseIf (H≥52)∗(H≤55)
:H++
:If θ
:X++
:Else
:X−−
:End
:End
:If H>55
:If Y<48
:Y++ ;Fall to the ground after the grappling is done!
:If θ
:X++
:Else
:X−−
:End
:Else ;Resets after hitting the ground
:0➔H➔S➔T
:End
:End
:End
:End
:Pt-On(X,Y,P∗8+Pic1)
:If B
:B−−
:End
:DispGraph
:End
With a varied ground, I'll probably use more pxl-tests rather then checking the y coordinates
Does wabbit crash when compiling to anyone else?is far as i know it is impossible to compile axe programs in wabbit.
Also any title ideas? :P
PROGRAM:HOOKSR
:.AAHOOK
:DiagnosticOff
:[1028103854382828]➔Pic1
:[102A123C50B82828]
:[FFFFFFFFFFFFFFFF]➔Pic2
:1➔R−1➔H➔Q➔B➔P
:256➔X ;Doin teh 256 inflation
:12288➔Y
:Fix 5
:Repeat getKey(15)
:Lbl 1
:ClrDraw
:If X∕256<<1
:256➔X
:End
:If X∕256>88
:22528➔X
:End
:If (H=0) or (H=1)
:If getKey(3) ;Moving left and right works
:X+256➔X
:1➔R
:End
:If getKey(2)
:X−256➔X
:0➔R
:End
:End
:If H=1 or H>40
:If getKey(2)
:0➔R
:End
:If getKey(3)
:1➔R
:End
:End
:For(A,0,11)
:Pt-On(A∗8,1,Pic2
:Pt-On(A∗8,56,Pic2)
:End
:If (getKey(54))∗((H=0)+(H>40))∗(B=0)
:If Y/256=48 ;Checks if it needs to jump
:1➔H
:Else
:2➔H
:End
:End
:If H=1
:Y−256➔Y ;Jump!
:If Y∕256≤28
:2➔H ;End Jump
:X∕256➔S ;Sets S and T's coordnates not in sub-pixels
:Y∕256➔T
:R➔θ ;Sets Right to theta
:Repeat pxl-Test(S,T)
:T−− ;Goes up at 45 degree angle to find ceiling.
:If θ
:S++
:Else
:S−−
:End
:End
:End
:If H>1 ;It freezes from here down here; nothing happens
:If H≤40
:1➔P
:Line(X/256+7,Y/256,S,T)
:Else
:0➔P
:End
:If H<15 ;Fall with connected rope
:Y+256➔Y
:If θ
:X+256➔X
:Else
:X−256➔X
:End
:H++
:If Y∕256=48
:0➔H➔P➔S➔T
:10➔B
:End
:End
:If H≥15 and (H≤25)
:If H<21
:Y+(256−((H−15)∗25))➔Y ;My attempted curve
:Else
:Y−((H−15)∗25)➔Y
:End
:End
:If H≥25 and (H≤40)
:If θ
:X+256➔X
:Else
:X−256➔X
:End
:Y−256➔Y ;Now rise with the rope connected
:If Y∕256<9
:56➔H
:0➔P
:End
:H++
:End
:!If H≤40 ;Now the rope releases
:If H≤50
:H++
:If θ
:X+(384−(H−40)∗10)➔X ;Go fast, then slow after the rope releases
:Else
:X−(384+(H−40)∗10)➔X
:End
:If Y∕256<9
:56➔H
:0➔P
:End
:Y−−
:ElseIf (H≥50)∗(H≤60)
:H++
:If H<56
:Y+(256−((H−50)∗25))➔Y ;Curve
:Else
:Y−((H−50)∗25)➔Y
:End
:End
:If θ
:X+256➔X
:Else
:X−256➔X
:End
:End
:If H>55
:If Y∕256<48
:Y+256➔Y ;Now fall down
:If θ
:X+256➔X
:Else
:X−256➔X
:End
:Else
:0➔H➔S➔T ;Reset once it touches the ground
:End
:End
:End
:End
:Pt-On(X∕256,Y∕256,P∗8+Pic1)
:If B
:B−−
:End
:DispGraph
:End
To isolate where it screws up,NO NO NO, lol, is your program compiled in noshell? If so then on wabbit emu, you need noshell to run it. so in order to play robogun on wabbit, you must download noshell on to it.
Yunhua's tutorials scrolling tilemaps look really hard. I think I have a simpler way. Howevercould be Wrong since I've never done a tilemap before.
How should the character die?
1. Enemy chasing it,
2. Avalanche style,
3. Endless pits
4. Lava (might make pxl-tests harder)
5. Something else...
I'll probably do a combination.
YYYESSS!! YYESSSS!
I had an idea for pxl texts. Would this work?
For(E,0,W/256)
If pxl-Test(X/256,Y/256+E+8) ;only checks left side right now
;reset stuff
Goto PP
End
End
Lbl PP
/me reminds himself to give butts credit for his help
I'm using 16x16....I think I can fix it by just adding to my picawhile ago, and this is what I meant, so yeah
Also, do you have the link for the tilemap compression thingamajig?
Jumping isnt really that bad.
Saintrunner:
[FFFFFFFFFFFFFFFF]->Pic1
56*256->Y
0->X->V->W->A->B->J
Repeat getKey(15)
If getKey(54)
-256->W
256->V
-8->B
End
If Y/256<57 ;simple collision :P
56*256->Y
End
V+A->V+X->X
W+B->W+Y->Y
Pt-On(X/256,Y/256,Pic1)
DispGraphClrDraw
End
Where X,Y are coordinates
V,W are velocities
A,B are accelerations
I need to figure out my collisions before I start making the tilemaps have obstacles.
Can you explain how that works?
/me scansexactly. (so it doesn't accelerate through stuff) :)
You mean for how fast the velocity is, the farther down and larger area to check for pixels?
That's exactly what I tried! However it always detected a pixel as tragically failed. I thought I was using the wrong strategy. I guess I was right!
I still have that code commented out in grappler, so I'll tweak untill I give up or fix it.
In other news, this has been my 1000th post!
Butts that's a pretty inefficient way, though. It means that the faster you go, the more checks it will take and the slower it will go.
Butts that's a pretty inefficient way, though. It means that the faster you go, the more checks it will take and the slower it will go.Eh, it was the only way I could think of for purely pxl-test based collisions. I'm sure tilemap collisions are more efficient.
That's a good idea :D
Would you reccomend pxltests or tilemap collisions?
So copy gdb to L1?L1 is just the pointer to your tilemap data. Replace L1 with the pointer to your tilemap data
Do I need masks if I only have a few triangle tiles that will be fully solid?You only need masks if you want your tiles collision to be anything other than a square
I don't understand what N is for.N signifies the number beyond which all tiles are solid. For example if your first 3 tiles were scenery, and not solid, you would use 3 for N. The routine tests for the tile number, and if it is greater than N, it considers the tile solid. By ordering all of your tiles empty first, followed by solid, you can make this really easy.
Do X and Y need to be in r1 and r2?r1 and r2 are the X and Y onscreen coordinates, measured in pixels from the top left corner of the tilemap. If your coordinates are inflated, you don't want to use the inflated version, but first de-inflate them to get the onscreen pixel coordinates.
W is tilemap width (in tiles) right?Yes