Fort Apocalypse Posted June 24, 2022 Share Posted June 24, 2022 (edited) 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 June 24, 2022 by Fort Apocalypse Quote Link to comment Share on other sites More sharing options...
Fort Apocalypse Posted June 24, 2022 Author Share Posted June 24, 2022 (edited) 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 June 24, 2022 by Fort Apocalypse 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.