Jump to content
IGNORED

Solid Walls in Playfield


jamesorgames_312

Recommended Posts

I always do something like...

 

if player0x<15 then player0x=15 (possible limit for left side)

if player1x<15 then player1x=15

if player0x>125 then player0x=125 (possible limit for right side)

if player1x>125 then player1x=125

 

This would form two barriers on the left and right side of the screen that neither players can go through.

Link to comment
Share on other sites

figure out where you want to move to then check it for a playfield pixel there.

if there is, don't move (or bounce or something)

if there isn't then move.

platfield pixels are 8 pixels wide (in the standard kernel) and are offset

from the player's position (playfield pixel 0 covers player positions 10..17

(or something, forget the offset))

the playfield pixels are in var0..var43

bit 7 of var0 is playfield pixel 0 (top left)

var0..var3 are the first (top) line of the playfield, var4..var7 the second line, etc

some of the bytes are reversed (instead of bit 7..0 going left to right some are 0..7

going left to right)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...