pmgraphics Posted July 9, 2019 Share Posted July 9, 2019 I'm working a game I made as a kid that uses PMG. I detect collisions with the PMG players and the play field by detecting collisions with color registers 0, 1 and 2 of the redefined characters in graphics mode 17. Is it possible to detect a fourth item that uses color register 3? Or better, is it possible to detect the ASCII value of the character that the PMG player hits so you are not limited to only 3 different collision scenarios? Player0 check collision with any upper case or inverse upper case characters IF PEEK(53252)=1 OR PEEK(53252)=4 THEN ... Player2 check collision with any lower case characters IF PEEK(53254)=2 THEN ... Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted July 9, 2019 Share Posted July 9, 2019 You don't have upper & lower characters in gr.1 mode, they are all upper of different colours based upon bits 6&7 of the screen character. Therefore your masks of the PnPF ($D004-$D007, 53252-53255) registers are a combination of any playfield the player is in contact with, +1 for PF0, +2 for PF1, +4 for PF2 and +8 for PF3. Quote Link to comment Share on other sites More sharing options...
Rybags Posted July 10, 2019 Share Posted July 10, 2019 GTIA only sees raw pixel data and doesn't know if it's character or bitmap. For determining character value, generally you can use a bit of maths to determine what character cells might be involved in a collision. In Basic, a trick you can use is to temporarily blank candidate cells one at a time, if the collision condition goes away then it means there's a collision with that cell. 1 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.