Jump to content
IGNORED

Translating x,y of missile0, missile1, ball, player0, player1 to pfpixel x,y


Fort Apocalypse

Recommended Posts

I'm pretty sure this is partially or fully documented elsewhere, but I messed up recently when I copied the ball x,y to pfpixel x,y translation code from Insane Painter to use in Tanks 2022 and tried to use for both missiles that it's not that simple.

 

I'm attaching a sample program I wrote where you can uncomment each test to compile and run. Sorry that I didn't just do all of them at once- I was trying to save time.

 

But the code for each mapping of x,y to pfpixel x,y as well as the extents for each that it works within is attached.

 

If it isn't already, I'm thinking this might be good to try with various playfield dimensions and figure out the differences. Maybe testing with different heights and NUSIZ (double and quad) might help, too, I'm not sure. The goal would be to make Breakout-like destruction, playfield painting, etc. much easier to figure out how to do well for standard kernel and DPC+, though I've only looked at standard kernel. Again- I hope I'm not duplicating work; if I am, let me know. Thanks!

 

The binary just adds to score if it has a coordinate pair of missile0 that isn't overlapping a calculated pfpixel. The source can be uncommented to do missile1, ball, player0, and player1.

 

 

 

proper_pixel_location.bas proper_pixel_location.bas.bin

Edited by Fort Apocalypse
Link to comment
Share on other sites

Note: under pfpixel in RT's documentation, there are some cool, helpful RPC+ examples, including some for shooting the DPC+ playfield, ChipOff (similar to Breakout and Arkanoid), etc.

 

I was just thinking that putting together some reference tables of object x,y to pfpixel x,y per object, playfield grid, and kernel might clear up the slight differences and eccentricities. I'll aim to keep at it this weekend to see if I can provide some better info, and maybe folks care more about DPC+ than standard and it doesn't matter, idk.

Edited by Fort Apocalypse
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...