CurtisP Posted April 1, 2007 Share Posted April 1, 2007 Anyone remember the Boing Demo from the Amiga. Don't know if it's been done on the 2600 before, but I thought I'd try it in bAtari Basic. So far I've defined the sprites for the ball and made it rotate. Movement and sound will come later... boing01.bas boing01.bas.bin Quote Link to comment Share on other sites More sharing options...
uosipa llamxew Posted April 1, 2007 Share Posted April 1, 2007 It's always good to see someone developing for the VCS. I'm not sure if you were aware, so I'll post the link to David Galloway's version of the Boing! demo on the 2600: http://www.atariage.com/store/index.php?ma...products_id=321 Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted April 1, 2007 Share Posted April 1, 2007 The ROM is for download too. Cool stuff! Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted April 1, 2007 Share Posted April 1, 2007 Anyone remember the Boing Demo from the Amiga. Don't know if it's been done on the 2600 before, but I thought I'd try it in bAtari Basic. So far I've defined the sprites for the ball and made it rotate. Movement and sound will come later... Since Boing has already been done, you might want to call this one bB_Boing ("buh-buh-BOING"). Nice rotating ball, by the way! Michael Quote Link to comment Share on other sites More sharing options...
CurtisP Posted April 1, 2007 Author Share Posted April 1, 2007 Since Boing has already been done, you might want to call this one bB_Boing ("buh-buh-BOING"). I like that, I shall rename it accordingly. Nice rotating ball, by the way! Thanks. I made it lateral, instead of diagonal, since there is so little resolution in a 16x16 area. Quote Link to comment Share on other sites More sharing options...
supercat Posted April 1, 2007 Share Posted April 1, 2007 Thanks. I made it lateral, instead of diagonal, since there is so little resolution in a 16x16 area. Why not 18x18? BB lets you position the missiles arbitrarily, doesn't it? Quote Link to comment Share on other sites More sharing options...
CurtisP Posted April 2, 2007 Author Share Posted April 2, 2007 Why not 18x18? BB lets you position the missiles arbitrarily, doesn't it? That's true, I could use the missiles as the left and right side of the ball. But then I've already drawn the ball and it came out pretty nice. I wonder if there's something I could do with the ball... Quote Link to comment Share on other sites More sharing options...
gambler172 Posted April 3, 2007 Share Posted April 3, 2007 looks good greetings gambler172 Quote Link to comment Share on other sites More sharing options...
djmips Posted April 3, 2007 Share Posted April 3, 2007 Looking forward to movement and sound. I hope you don't mind but here is snippet of code to help with the movement in bBasic. I wanted to point out the necessity in using the 0.0 - var format for inverting a fixed point var. rem Setting up x position y position x velocity and y velocity as fixed point variables dim xpos = a.b dim ypos = c.d dim xvel = e.f dim yvel = f.g rem Somewhere in your loop rem update x position y velocity and y position (gravity constant is 0.8) xpos = xpos + xspeed yvel = yvel + 0.08 ypos = ypos + yvel rem Bounce if ypos < 90 then goto setPos rem Reflect y velocity and restore y position, you must use this form instead of yvel = -yvel yvel = 0.0 - yvel ypos = ypos + yvel setPos Quote Link to comment Share on other sites More sharing options...
CurtisP Posted April 4, 2007 Author Share Posted April 4, 2007 Looking forward to movement and sound. I hope you don't mind but here is snippet of code to help with the movement in bBasic. I wanted to point out the necessity in using the 0.0 - var format for inverting a fixed point var. I don't mind at all. Thanks for the code. Quote Link to comment Share on other sites More sharing options...
CurtisP Posted April 4, 2007 Author Share Posted April 4, 2007 So I got the movement all working, then I figured, her why not add sound, which took me exactly 10 minutes (bAtari Basic rocks!). So here it is. bBboing.bas bBboing.bas.bin Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted April 4, 2007 Share Posted April 4, 2007 Very nice! Michael Quote Link to comment Share on other sites More sharing options...
djmips Posted April 4, 2007 Share Posted April 4, 2007 If you just modify the code starting at line 55, you can get a nice bounce. Just adding the gravity to the yvel every frame and then make sure to restore the ypos in the bounce part of the if. Here is the mod in bold text. yvel = yvel + 0.08 ypos = ypos + yvel if ypos < 23 || ypos > 80 then yvel = 0.0 - yvel: ypos = ypos + yvel: temp1 = 1 Quote Link to comment Share on other sites More sharing options...
CurtisP Posted April 4, 2007 Author Share Posted April 4, 2007 If you just modify the code starting at line 55, you can get a nice bounce. Just adding the gravity to the yvel every frame and then make sure to restore the ypos in the bounce part of the if. From what i recall the original Boing Demo didn't have gravity anyway. I think I'd rather make the ball bigger. One of the big deals on the Amiga was how large the ball was. Quote Link to comment Share on other sites More sharing options...
CurtisP Posted April 6, 2007 Author Share Posted April 6, 2007 That black area at the bottom of the screen was totally bothering me. Since score was turned off, I simply set pfrowheight to a high enough value (10) to make the playfield fill the screen. I then decided to use PF0 to draw in the left and right borders, and cleared the borders from my playfield definition. It turns out that bAtari Basic doesn't have a hard limit on the Sprite Y values, it will keep displaying sprites as long as it's displaying playfield, so I changed my boundaries accordingly, and now I'm bouncing aroud the whole screen. bBboing.bas bBboing.bas.bin Quote Link to comment Share on other sites More sharing options...
+LS650 Posted April 22, 2007 Share Posted April 22, 2007 A screenshot for your viewing pleasure... 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.