プレイ日記
DereK Derekninja555
Do you guys know how to do graphics colision? I'm working on the battle system and you can't go out of bounds. (This is not how it looks. I can't also post the top screen lol.) Please help. An Undertale lover, Derek Not DereK. I made that name a long time ago and I pressed the caps button by mistake. Don't say DereK.
3そうだね
プレイ済み
返信[1]
親投稿
SwitchTMC heeeee2
Derek, try GSPOIT. GSPOIT(X,Y)
0そうだね
プレイ済み
返信[2]
親投稿
Oscar PwnageBlock
I'm sorry DereK, but you can change your name on Miiverse quite easily, so you've got no excuses! Also, if you need collision help, you should specify which kind of graphics you are working with. Sprites? BG? Pure graphics? As a side note, I hope you are aware you won't be able to publish this, since Copyright exists.
0そうだね
プレイ済み
返信[3]
親投稿
DereK Derekninja555
@Oscar If I drew something with gbox thats what I want to do colision with if possible AND we argued on my other post so just read that. Seriously that had like 20 comments lol.
0そうだね
プレイ済み
返信[4]
親投稿
Oscar PwnageBlock
There are no real collision methods with pure graphics. You could do some complicated stuff with GSPOIT, but the easiest way to bound something to the box is to simply limit the area the object can move in. E.g.: X and Y being the object's coordinates, and its home being its top-left corner and its size 16x16px, assuming box coordinates... X=MIN(10,MAX(399-16,X)) Y=MIN(10,MAX(239-16,Y))
0そうだね
プレイ済み
返信[5]
親投稿
Let's say VAR BOXX1=50,BOXY1=50 VAR BOXX2=450,BOXY2=190 You can draw the box with GBOX BOXX1,BOXY1,BOXX2,BOXY2 And say variables X and Y are the coordinates of your object, every time you change the objects position, afterwards run this code: IF X<=BOXX1 THEN X=BOXX1 IF X>=BOXX2 THEN X=BOXX2 IF Y<=BOXY1 THEN Y=BOXY1 IF Y>=BOXY2 THEN Y=BOXY2 Also DereK is much more clever of a name
0そうだね
プレイ済み
返信[6]
親投稿
DereK Derekninja555
Thanks guys you helped a lot!
0そうだね
プレイ済み