Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Pong
Author | Message | ||||
elproducts Senior Member Joined: 19/06/2011 Location: United StatesPosts: 282 |
Anybody know of a simple pong game for maximite? www.elproducts.com |
||||
elproducts Senior Member Joined: 19/06/2011 Location: United StatesPosts: 282 |
After 106 views and no responses I'll take that as a no. I guess I'll try to create one. I've found some old examples written in QBASIC but they are all complex variations. Any many didn't run on the Maximite without tons of errors or crashing the program. I'll try to make a simple version using sprites (which I've been wanting to learn more about anyway). Plan is to document each step as a training module for teaching beginners how to use the Maximite. www.elproducts.com |
||||
vegipete Guru Joined: 29/01/2013 Location: CanadaPosts: 1109 |
I haven't noticed a pong game but perhaps my Break Out game can give you some inspiration. (The latest version is a few posts down.) Visit Vegipete's *Mite Library for cool programs. |
||||
paceman Guru Joined: 07/10/2011 Location: AustraliaPosts: 1329 |
There's one on Geoff's website, but it's not for a Maximite. |
||||
MOBI Guru Joined: 02/12/2012 Location: AustraliaPosts: 819 |
The version of Pong on Geoff's web site is a PIC based hardware version unless there is another I have missed. I wrote a Pong programme years ago for an OSI Superboard MC and it wasn't too difficult. I might still have the source code listing somewhere but don't hold your breath. My video was memory mapped so most of the paddle and ball motion was achieved using copious quantities of PEEK and POKE commands. Here's your chance to write one for the MM library??? David M. |
||||
elproducts Senior Member Joined: 19/06/2011 Location: United StatesPosts: 282 |
Thanks vegipete, That was extremely helpful. I produced a bouncing ball as a Sprite that runs around bouncing off the edges of the screen using the collision command. This has worked well. Then I added a sprite for the paddles and found the 16x16 limitation of the Sprite size makes for a very small paddle (I am running in mode 1). I see you didn't use Sprites for your paddle at the bottom of your breakout game so that will take me some time to sort that out and how you determine collisions. My thought was I'd have to combine two or three sprites to make a bigger paddle and then move them together and then I could still use the collision command. I also learned you can't use the same Sprite twice as MMBasic reports it's already being used. So right now it appears I have to create a separate sprite for the second paddle. I'm going to look at Nick's code as well since he has some of the best game examples I've seen anybody produce. www.elproducts.com |
||||
darthmite Senior Member Joined: 20/11/2011 Location: FrancePosts: 240 |
I have write a Breakout game for the MM v2.x and v4.x long time ago. It must be in the MM Library. If you just need a pong game , remove the wall from the code :) Cheers. Theory is when we know everything but nothing work ... Practice is when everything work but no one know why ;) |
||||
vegipete Guru Joined: 29/01/2013 Location: CanadaPosts: 1109 |
Yes, I went with custom characters in my own font to get past the 16x16 size limit. That does limit you to a single colour for the object but that isn't a huge draw-back. 'Collision detection' happens in the math of placing the ball on screen. I know the coordinates I'm drawing the ball and I know the coordinates of the paddle so it doesn't take much to calculate a hit or a miss. You can decide which is easier - shifting 2 or 3 sprites around together or shifting a single 'letter' and checking for collisions yourself. There is a new command in the latest MMBasic versions that allows you to copy a sprite to an (empty) sprite space. This makes it easy to display the same sprite more than once on screen. Visit Vegipete's *Mite Library for cool programs. |
||||
Print this page |