Rabbit 2600 Posted June 3, 2013 Share Posted June 3, 2013 (edited) I have a few questions about borders. My playfield looks like this: 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 June 3, 2013 by Rabbit 2600 Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted June 3, 2013 Share Posted June 3, 2013 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 Quote Link to comment Share on other sites More sharing options...
Rabbit 2600 Posted June 3, 2013 Author Share Posted June 3, 2013 (edited) Neat program and great tip! I got it working =) I also got border for player0 working =D Edited June 3, 2013 by Rabbit 2600 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.