Mugi
Member
okay, I've now tried to figure this out for 2 days and im completely lost on what the **** is going on with this.
is this just an engine bug or is there something in my code that im completely not understanding and/or doing right ?
here's the deal, i made the wall grab code (code below) only check the top left or top right collision point of my player when she's grabbing the wall, to allow more accurate detection of the area where you're supposed to be able to grab.
this works extremely well, but it only works if there's no monsters or a maximum of 1 monster on screen along with the player. Any more and the collision check just dies. What gives.
in the vid i first kill of the monster and jump around on the wall, and later return to do the same while there are monsters being spawned to the sceeen.
as shown, once there's more than one monster, the performance of the script progressively goes worse, and i have no idea why.
https://youtu.be/oxiUPY4QEuY
the code for this is as follows:
what puzzles me the most here is that the whole script only runs when the player collides with this tile, so player is automatically in X, and in addition to that, while the collision part of the code breaks up, the tile itself
continues to function, meaning that player is still in X allowing it to work.
i've tried to do the CPX player1_object to ensure that player is indeed in X during this, and i've also tried adding LDX player1_object before each check, to further ensure that we are only comparing the player's values when doing this.
aside digging into the collision code in general, im just lost now, is this something really easy im just not seeing or is this an actual bug going on with the collision code ?
is this just an engine bug or is there something in my code that im completely not understanding and/or doing right ?
here's the deal, i made the wall grab code (code below) only check the top left or top right collision point of my player when she's grabbing the wall, to allow more accurate detection of the area where you're supposed to be able to grab.
this works extremely well, but it only works if there's no monsters or a maximum of 1 monster on screen along with the player. Any more and the collision check just dies. What gives.
in the vid i first kill of the monster and jump around on the wall, and later return to do the same while there are monsters being spawned to the sceeen.
as shown, once there's more than one monster, the performance of the script progressively goes worse, and i have no idea why.
https://youtu.be/oxiUPY4QEuY
the code for this is as follows:
Code:
LDA gamepad
AND #%00010000 ; is up pressed ?
BEQ dontMessWithGravity
; LDA Object_physics_byte,x
; AND #%00000001 ; Are we in the air ?
; BNE dontMessWithGravity
LDA Object_v_speed_hi,x
BMI dontMessWithGravity
LDA Object_movement,x
CMP #%00000110
BEQ checkLeftCollisionOnly
LDA collisionPoint1,x
BEQ dontMessWithGravity
JMP doGrab
checkLeftCollisionOnly:
LDA collisionPoint0,x
BEQ dontMessWithGravity
doGrab:
ChangeObjectState #$07, #$08
dontMessWithGravity:
what puzzles me the most here is that the whole script only runs when the player collides with this tile, so player is automatically in X, and in addition to that, while the collision part of the code breaks up, the tile itself
continues to function, meaning that player is still in X allowing it to work.
i've tried to do the CPX player1_object to ensure that player is indeed in X during this, and i've also tried adding LDX player1_object before each check, to further ensure that we are only comparing the player's values when doing this.
aside digging into the collision code in general, im just lost now, is this something really easy im just not seeing or is this an actual bug going on with the collision code ?