Jump to content
IGNORED

Borders?


Rabbit 2600

Recommended Posts

I have a few questions about borders.

My playfield looks like this:

namnloumls_zps34808820.png

 

Question 1 - I have a ball object being randomly placed on the screen. Sometimes it's placed outside the playfield (outside the orange box)

How do I set it up so that it's only randomly placed inside this box?

My code for generating the ball is:

ballx = rand&127
bally = rand&63

Edited by Rabbit 2600
Link to comment
Share on other sites

You can paste your screen into the example program below, create the size of your ball, then move the ball to find out how far you want it to be able to go up, down, left and right. After you find the numbers and write them down, you can limit the placement with 4 if-thens in your own program.

 

http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#find_border_coordinates

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...