Jump to content
IGNORED

Playfield Pixel Collision Precision Changes


KevKelley

Recommended Posts

This is a little weird one to try and explain but I will try my best. 

 

Recently I was watching @ZeroPage Homebrew play Litterbug! and afterwards I had gone to test some things or try to replicate their experience and noticed some differences from when I had last tested.  More specifically, one difference I had noticed involves the fire button and the missile sprite coordinates and using pfpixel.

 

Previously I had noticed that it was possible to press the fire button and have the possibility to turn on two pfpixels at once but after I made some fixes I found that was not possible anymore.  I had found the cause of this change.

 

I had made this line:

if joy0fire then pfpixel temp3 temp6 on:p{4}=!p{4}:p{5}=!p{5}:w001=14:score=score+1:w004=r004-1:r=63:var7=var7+1

into this:

if o{0} then pfpixel temp3 temp6 on:p{4}=!p{4}:p{5}=!p{5}:w001=14:score=score+1:w004=r004-1:r=63:var7=var7+1

where o{0} is defined earlier in the code where joy0fire is pressed but before the drawscreen and that line found afterwards.

 

I was wondering why if nothing else is changed but just the o{0} and joy0fire it would result in a change like this?  Does it have something to do with how the Atari may read certain things, like a bit versus a joystick register?

Link to comment
Share on other sites

3 hours ago, Random Terrain said:

Are you sure the joy0fire check isn't hidden under some other chunk of code and being ignored sometimes?

I don't think so. In this loop I had only a couple instances of using it. One defined the bit and one would turn the pixel on. I will have to now double check.

 

I did play around with moving drawscreen around to different places and swapping the bit and joy0fire code to see how it worked and I think it had same effect - it was more precise. That made me wonder if there was an order of operations.

Link to comment
Share on other sites

My gut feeling is that there's a lot of code in that one line.  Everything from bitwise operations to manipulating the score.  You might wanna make that a simple if .. then .. goto statement and put all that in a separate label - one line at a time.  At least it would be easier to eyeball for debugging.

 

I realize that's not an answer in itself but that'd be my first step in unraveling the mystery :)

  • Like 1
Link to comment
Share on other sites

4 hours ago, Gemintronic said:

My gut feeling is that there's a lot of code in that one line.  Everything from bitwise operations to manipulating the score.  You might wanna make that a simple if .. then .. goto statement and put all that in a separate label - one line at a time.  At least it would be easier to eyeball for debugging.

 

I realize that's not an answer in itself but that'd be my first step in unraveling the mystery :)

I just moved a bunch of videos to free up space in the first bank so that I can try to clean things up a bit. I may do just that and try. If I play on hardware and no issues arise I may not need to make any changes but I had thought it interesting. 

  • Like 1
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...