flopping
Processing Plant

Always still learning
Posts: 26
|
Post by flopping on Sept 19, 2022 21:12:39 GMT
|
|
|
Post by oss003 on Sept 20, 2022 9:17:50 GMT
Do you mean that there are pixels left ...... this is a known MPAGD problem. A sprite is plotted on the screen by an XOR function. A collectable block is replaced with an empty block (block 0). This means the sprite is corrupted when the sprite overlaps the collectable block by putting an empty block on the sprite. Then when the sprite moves, the sprite is removed with an XOR function but the image changed which results in pixels on the screen.
I think what you can do is testing for a collectable block before the sprite hits the block. So if moving right, check X+18 pixels for a collectable block Moving to the left -> check X-2 pixels, moving up -> check Y-2 and moving down -> Y-18. It's just a guess because I haven't tested this.
Greetings Kees
|
|
flopping
Processing Plant

Always still learning
Posts: 26
|
Post by flopping on Sept 20, 2022 13:59:26 GMT
Thank you Kees for your quick response.
But I don't understand very well what you want to tell me, do you mean adding those values to the player event?
This is the script of the player event, tell me how those values would be placed in it, thank you very much.
EVENT PLAYER
IF KEY UP LET DIRECTION = UP IF Y <= TOPEDGE SCREENUP LET Y = BOTTOMEDGE EXIT ELSE IF CANGOUP SPRITEUP ANIMATE ENDIF ENDIF ENDIF
IF KEY DOWN LET DIRECTION = DOWN IF Y >= BOTTOMEDGE SCREENDOWN LET Y = TOPEDGE EXIT ELSE IF CANGODOWN SPRITEDOWN ANIMATE ENDIF ENDIF ENDIF
IF KEY LEFT LET DIRECTION = LEFT LET IMAGE = 0 IF X <= LEFTEDGE SCREENLEFT LET X = RIGHTEDGE EXIT ELSE IF CANGOLEFT SPRITELEFT ANIMATE ENDIF ENDIF ENDIF
IF KEY RIGHT LET DIRECTION = RIGHT LET IMAGE = 0 IF X >= RIGHTEDGE SCREENRIGHT LET X = LEFTEDGE EXIT ELSE IF CANGORIGHT SPRITERIGHT ANIMATE ENDIF ENDIF ENDIF
GETBLOCKS
|
|