プレイ日記
Velocireed Bobolito2001
Sorry for the lack of updates! I've still been running in circles due to confusion, and the main problem: collision with the bg layer. Floors and platforms dont work, rpg wall collision doesnt work... so i've been mentally takin a break!
1そうだね
プレイ済み
返信[1]
親投稿
Clepto Clepto2.0
Are you working with 16x16 sprites? Because those are the easiest to work with for bg collision.
0そうだね
プレイ済み
返信[2]
親投稿
Velocireed Bobolito2001
Honestly,I have no idea. I use default, but i wish i had more space. i'll post a pic of my problem in a sec
0そうだね
プレイ済み
返信[3]
親投稿
Velocireed Bobolito2001
it thinks im hitting the left wall sprite, which has been elongated. i have the spcol 18,true,0 and it fixes nothing...
0そうだね
プレイ済み
返信[4]
親投稿
Clepto Clepto2.0
Well, I think the main problem is that you're using sprites for bg collision, but I will give you points for stretching it out though. You've had the background load before so do that for this. Then make a variable, BG for example, and give it a value with BGGET so it looks like this; BG=BGGET(layer,(PX+ofsx)/16,(PY+ofsy)/16) ofsx/ofsy or X/Y offset help make collision more precise.
0そうだね
プレイ済み
返信[5]
親投稿
Clepto Clepto2.0
After that, you can decide what values of BG are solid or not
0そうだね
プレイ済み
返信[6]
親投稿
Velocireed Bobolito2001
Will try! you've been literally the most helpful through all this.
0そうだね
プレイ済み
返信[7]
親投稿
Clepto Clepto2.0
Thanks! To be honest, I'm not a fan of how collision works in this. Sprite collision isn't that bad but bgcollision seems a little iffy. Just remember that for sprite collision, set up a hitbox for each direction so they don't overlap with each other. And give a separate hitbox for taking damage.
0そうだね
プレイ済み
返信[8]
親投稿
Velocireed Bobolito2001
Hey, what are px and py? player x and y?
0そうだね
プレイ済み
返信[9]
親投稿
Clepto Clepto2.0
Yes, anything else I can help you with?
0そうだね
プレイ済み
返信[10]
親投稿
Velocireed Bobolito2001
Walls please, and a LOT more probably in the future! thanks!
0そうだね
プレイ済み
返信[11]
親投稿
Clepto Clepto2.0
You still want to use BGGET, but instead of getting a variable for your bgx/by for the ground you would need the tile in the direction you're going.
0そうだね
プレイ済み
返信[12]
親投稿
Velocireed Bobolito2001
I.... dont really get it.... so use maybe wcl=bgget and then.... i have no clue what to do next
0そうだね
プレイ済み
返信[13]
親投稿
Clepto Clepto2.0
Ok, even though sprite movement has no real restrictions BGGET works off of the 16x16 bg tiles. That's why BGGET(L,X,Y) looks more like BGGET(L,PX/16,PY/16). This is where order is important, if you add 1 to PX before dividing by 16 (by parentheses) you're change the "hitbox". If you add 1 after you're changing the tile
0そうだね
プレイ済み
返信[14]
親投稿
Velocireed Bobolito2001
Ohhh! I think I get it now! Thx for the explanation!
0そうだね
プレイ済み