Jump to content
IGNORED

collision detection and memory


satyrsfaction
 Share

Recommended Posts

Hi, i'm very much a beginner at this -- i started a little adventure style game as a means of learning Batari Basic....I hope to expand on it later. I'm having two major problems. First, the collision detection i came up with is terrible. I wanted to use the collision prevention in Random Terrain's manual, but it doesn't seem to work, perhaps because my game is a different play field size? Second, i'm out of memory and unfinished. what can i do to save memory, or to move stuff to other banks -- i'm just not sure how that works. will variable values stay assigned if you switch banks? Will play field information stay if you assign it from a different bank?

textadv.bas.bin textadv.bas

Link to comment
Share on other sites

Well, I solved my memory problems for now. Apparently you can put the playfield data in another bank and it works fine. I still don't know how to fix my collision detection with the playfield. I just don't understand how to adapt Random Terrain's collision prevention to this new play field resolution.

textadventure.bas.bin textadventure.bas

Link to comment
Share on other sites

9 minutes ago, satyrsfaction said:

Thanks, but  I'm not sure I understand what you mean -- i'm just a beginner. 

 

The numbers used with pfread can be used with pfpixel. When I change the screen resolution, I comment out the collision detection code with rem and put in pfpixel so I can see if things are lined up properly. Since you are new, do it with a working example program first so you can see exactly where pfpixel is supposed to be in relation to the sprite. Then you can play with the numbers until it looks the same in your program.

 

Edited by Random Terrain
Link to comment
Share on other sites

4 hours ago, Random Terrain said:

 

The numbers used with pfread can be used with pfpixel. When I change the screen resolution, I comment out the collision detection code with rem and put in pfpixel so I can see if things are lined up properly. Since you are new, do it with a working example program first so you can see exactly where pfpixel is supposed to be in relation to the sprite. Then you can play with the numbers until it looks the same in your program.

 

OK, i tried it and with the sample program, the pixels appeared on top of the sprite. So i tried it with my game, and I'm having difficulty lining up the pixels. what do the numbers mean? which ones should I try changing? thanks for your help.

Link to comment
Share on other sites

1 hour ago, satyrsfaction said:

OK, i tried it and with the sample program, the pixels appeared on top of the sprite. So i tried it with my game, and I'm having difficulty lining up the pixels. what do the numbers mean? which ones should I try changing? thanks for your help.

 

This post might be helpful:

 

atariage.com/forums/topic/131795-pf-pixels-to-sprite-pixels/?do=findComment&comment=1589440

 

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

  • Recently Browsing   0 members

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