Captain Spazer Posted August 31, 2016 Share Posted August 31, 2016 Generic question about games like breakout and the like. How do I go about making something like that? When a ball or missile collides with a pfpixel it turns off. Do I do something like this? I defined a wall like this: rem player1 wall pfpixel 30 1 on pfpixel 30 2 on pfpixel 30 3 on pfpixel 30 4 on pfpixel 30 5 on pfpixel 30 6 on pfpixel 30 7 on pfpixel 30 8 on Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted August 31, 2016 Share Posted August 31, 2016 See if this is helpful: atariage.com/forums/topic/211497-chipoff-breakout-style-example-program/ Quote Link to comment Share on other sites More sharing options...
Captain Spazer Posted August 31, 2016 Author Share Posted August 31, 2016 Thanks. It's a bit tricky but I'll figure it out eventually. Basically from what I understand, I need dim _pf_x = t, dim _pf_y = u in order to check for the playfields x and y values, and do the same for my ball object, and if my ball object collides with the playfield the game would check the x and y values and if it's a hit then pfpixel _pf_x _pf_y off. Am I somewhat getting it? =) Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted September 1, 2016 Share Posted September 1, 2016 Thanks. It's a bit tricky but I'll figure it out eventually. Basically from what I understand, I need dim _pf_x = t, dim _pf_y = u in order to check for the playfields x and y values, and do the same for my ball object, and if my ball object collides with the playfield the game would check the x and y values and if it's a hit then pfpixel _pf_x _pf_y off. Am I somewhat getting it? =) You can dim using any variables. Those are just the ones I chose. You convert the coordinates of the object you're using as the ball to playfield coordinates, then figure out which two playfield pixels need to be turned off. Quote Link to comment Share on other sites More sharing options...
Captain Spazer Posted September 2, 2016 Author Share Posted September 2, 2016 Oooh, that makes it easier. Thanks friend. You helped me alot =) Quote Link to comment Share on other sites More sharing options...
Captain Spazer Posted September 3, 2016 Author Share Posted September 3, 2016 (edited) Hm, I can't quite figure it out, could I trouble you for a simpler example? Something with just the bare minimum, like just some blocks, a player that shoots when joy0fire is pressed and with just the calculations for a pfpixel collision? EDIT This is what I gathered from the breakout example. I'm not getting any errors but I don't get any pixels dissapearing either, am I on the right track atleast? pfhline 0 2 31 on dim _pf_x = t dim _pf_y = u dim _M0_x = missile0x.s dim _M0_y = missile0x.r main drawscreem if _pf_x = _M0_x && _pf_y = _M0_y then pfpixel 3 1 off goto main Edited September 3, 2016 by Captain Spazer Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted September 3, 2016 Share Posted September 3, 2016 I'm working on a small example program, but I've had to leave the computer multiple times today, so it's taking longer to finish. I'll put it on the bB page and post a link to it when I'm done. Quote Link to comment Share on other sites More sharing options...
Captain Spazer Posted September 3, 2016 Author Share Posted September 3, 2016 Appreciate it, man =) Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted September 4, 2016 Share Posted September 4, 2016 See if this is any better: randomterrain.com/atari-2600-memories-batari-basic-commands.html#ex_shoot_pfpixel I used pfheights to squish down the pfpixels. If you use the larger default pfpixels, you'll probably need to divide by 8 and subtract based on the height of the object. I just play with the code until it works. I also made a quick one where you can shoot the default size pfpixels: randomterrain.com/atari-2600-memories-batari-basic-commands.html#ex_sprite_missile_pfpixel_destruction Quote Link to comment Share on other sites More sharing options...
Captain Spazer Posted September 4, 2016 Author Share Posted September 4, 2016 Thanks dude! This was much easier to understand! I actually get it now! I'm so happy that I can finaly make the games I always wanted! You will get a special mention in my upcoming games as thanks for the help =) 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.