STGraves Posted December 3, 2015 Author Share Posted December 3, 2015 Yeah i get that, it basically reads or checks if there is a pixel from the playfield in the given pfread coordinates, or not? Quote Link to comment Share on other sites More sharing options...
STGraves Posted December 3, 2015 Author Share Posted December 3, 2015 You asked what simple program would I like to see, well I think one with collision, where a character collides with a specific part of the pf and then it jumps to another screen or something like that, of course if its easy if not surprise us RT Quote Link to comment Share on other sites More sharing options...
STGraves Posted December 3, 2015 Author Share Posted December 3, 2015 Now I understand how it works, but I have one more question, can pfread be used to check specifically the top row of the playfield, instead of a single pixel at a time, I want to use it for sort of collision detection with the top row in particular but no for stopping the character from going through it, instead I want to use it to trigger a goto another screen, well actually not to another screen but to the previous one, kind of like going back and forth between 'em, do you think that using a counter that adds 1 every time you go to a new screen and substracts one when you return to the previous one, for cycles counting, or RAM saving? Quote Link to comment Share on other sites More sharing options...
+KaeruYojimbo Posted December 3, 2015 Share Posted December 3, 2015 Why not just use the character's y position to trigger the goto? Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted December 3, 2015 Share Posted December 3, 2015 Now I understand how it works, but I have one more question, can pfread be used to check specifically the top row of the playfield, instead of a single pixel at a time, I want to use it for sort of collision detection with the top row in particular but no for stopping the character from going through it, instead I want to use it to trigger a goto another screen, well actually not to another screen but to the previous one, kind of like going back and forth between 'em, do you think that using a counter that adds 1 every time you go to a new screen and substracts one when you return to the previous one, for cycles counting, or RAM saving? You could use the playfield variables to detect pixels more roughly. As in, if var0 > 0 then you know one of the eight first playfield pixels is set. Quote Link to comment Share on other sites More sharing options...
STGraves Posted December 3, 2015 Author Share Posted December 3, 2015 I've tried the player1 coordinates to trigger them but it just causes the game to glitch, crash or reset, I'll try theloon's method if my current one doesn't succeed, I find out that if you use a counter it works wonderfully, instead of triggering the gosub with the coordinates I trigger it with the counter's value which changes depending the coordinate of the player, I made one for "Y" and one for "X", and whenever the player moves to a specific coordinate depending on if it's the X axis or the Y axis, and depending on the current value of the counter is which screen has to be triggered. Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted December 3, 2015 Share Posted December 3, 2015 I've tried the player1 coordinates to trigger them but it just causes the game to glitch, crash or reset . . . If checking sprite coordinates caused a game to crash or reset, most bB games would be crashing and resetting. It's probably just buggy code. Quote Link to comment Share on other sites More sharing options...
STGraves Posted December 3, 2015 Author Share Posted December 3, 2015 Perhaps but bblint doesn't show me any error at all, and besides my method worked very nicely without issues, all it needs is a bit of tweaking in order to work with even more screens, with 5 it works great. Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted December 3, 2015 Share Posted December 3, 2015 Perhaps but bblint doesn't show me any error at all, and besides my method worked very nicely without issues, all it needs is a bit of tweaking in order to work with even more screens, with 5 it works great. If using something that everybody else uses without a problem causes problems for you, you're doing something wrong. There doesn't have to be an error that bblint can see. Quote Link to comment Share on other sites More sharing options...
STGraves Posted December 3, 2015 Author Share Posted December 3, 2015 I know, and actually I do know the problem, but I couldn't fix it and tried different things, but until I thought on the counters method I was stucked and that's why I was using the pfscroll. 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.