BARRIERS:
These are simple stuff that holds in the sprite the player is moving. For this example, I will keep the player inside the screen, except if they try to go right, 16 pixels of the barrier stop him. I will sub the player's X and Y variables with X.YFor example:
IF X<16 THEN X=16
IF X>384 THEN X=384
IF Y<16 THEN Y=16
IF Y>224 THEN Y=224
0そうだね プレイ済み