Jump to content
IGNORED

pINg for INTV


freewheel

Recommended Posts

OK folks, here's my most complete game so far. I've gotten myself side-tracked with 2 other ideas (and a 3rd on the drawing board, literally) and I know this guy needs some work. So - it's about time I solicit some feedback.

 

What is it? A while back, rev mentioned that there isn't really a basic "Pong" game for the INTV. So this is my implementation of one. It's highly influenced by an old Radio Shack Pong system I had as a kid, so anyone familiar with that or similar will see some of my inspiration.

 

I already am conscious of a bunch of current limitations:

 

My input handling is not perfect - damn near any input acts as "fire" to progress through screens - that's intentional as I play around with it. Use the honour system until you get familiar with the menu options (it's not very complex).

 

The ball only moves at 45 degree angles. I have no idea how hard the math would be to implement complex angles. Early Pong systems were weird - some only moved at very predictable angles, some allowed for fancy moves depending on how you hit the ball. I can't decide how much it's worth it to look into that. My ball movement logic is VERY simple at the moment so there's room for improvement there.

 

Graphically (especially the title screen), I'm intentionally going for a very old school look.

 

It only plays to a limited number of lives/score. Again, intentional as I develop it. Trivial to change those numbers for an actual "release".

 

There is no AI. There IS a single-player mode, however. I find Pong AIs are either laughably bad, or too damned good. To be honest I'm not sure just how much people would want this, although I certainly have the cycles to spare (and a rough idea how to implement a few difficulty levels of it). It would make the menu/setup more complex though - more steps of input.

 

And I find the "hard" levels damn hard. I can only imagine how bad they'd be with a real controller. Maybe I'm just a bad gamer and others will enjoy the challenge.

 

Oh, and the collision detection in hockey is that way on purpose. You'll understand once you get the "puck" trapped on your "stick". And yes, sometimes it can bite you in the ass. Try moving horizontally to really mess with it :P

 

 

Anyway - time to see what people think. I've kinda stopped messing with it but if I get feedback, I can see myself poking at it again.

 

 

ping.bin

  • Like 2
Link to comment
Share on other sites

Ok... I don't have time to try it tonight, as I need to be to work in about 7 hours, which means I need to actually approximate sleep rather soon. :-)

 

In the meantime, this link looks like a lot of nostalgic fun: http://www.pong-story.com/

 

(I actually have one of those 1975 units in the garage, or a later run of that model. It was the one I played as a toddler!)

 

As for the angle of reflection off the paddle, it was based solely on which point it hit the paddle and the current score. It reflected off the paddle at one of 7 different angles at a given score, and there were three different sets of angles for 1-3 points, 4-11 points and 12+. (There is a deadpoint, where you could get the two paddles bouncing the ball back and forth against each other indefinitely; my brother and I made a game out of making that happen, as it were.)

 

This scanned article gives some details but only roughly: http://www.atariarchives.org/bcc1/showpage.php?page=141

 

 

... and also... I did a very basic Pong for Intellivision 15 years ago, and more recently there's Paddle Party. Now we have three Pongs for Intellivision!

Edited by intvnut
Link to comment
Share on other sites

Looks good so far! I like the presentation.

 

I had a little trouble with the menu - jzintv by default maps the number keys on the keyboard to controller 2, and I had to remember how to switch them.

You might try doing something like this in the code, so any controller is okay:

	CONST NO_KEY = 12


loop:	
	WAIT
	key = cont2.key
	if (key = NO_KEY) THEN key = cont1.key
	REM check "key" to see if a key is pressed...

What I did for angles was to have an x velocity and a y velocity for the ball, which I added to its position every frame. different velocities gave different angles.

As intvnut said, the angle in traditional pong was based on where the ball hit the paddle. I tried to have the ability to put real English on the ball, based on the

speed of the paddle.

 

You can still download Intellipongola, which was the beginnings of Paddle Party, from this thread:

 

http://atariage.com/forums/topic/190962-intellipongola

 

Whatever you do, don't leave it alone for a long time after the game is over...

 

Anyway, good start!

 

Catsfolly

Link to comment
Share on other sites

I had a little trouble with the menu - jzintv by default maps the number keys on the keyboard to controller 2, and I had to remember how to switch them.

 

Ah, laptop user? I've just always used the numpad on my keyboard (yeah, it's upside down) and it works. Good suggestion though. Realistically either controller should be able to select menu options.

 

 

 

What I did for angles was to have an x velocity and a y velocity for the ball, which I added to its position every frame. different velocities gave different angles.

As intvnut said, the angle in traditional pong was based on where the ball hit the paddle. I tried to have the ability to put real English on the ball, based on the

speed of the paddle.

 

Yeah, this is in there already, with velocities set equally (to 1, actually). Because I've built a natural speed-up into the game, it's tricky to have varying velocities based on different axes. Collision detection got .. delicate if you suddenly move something "past" something else. Mostly it's just laziness on my part so far because I've fixed that sort of stuff up.

 

Thanks for the comments :)

Link to comment
Share on other sites

I use a 16 bit number for the x and y position of the ball. The number in the position is , for example, 16 times the actual position value.

 

This means the lower 4 bits are the fractional component of the position. So, the velocity also has a fraction component.

 

As a result, there are 16 steps between a velocity of 1 (stored as 1 * 16) and 2 (stored as 2 * 16). This gives the program a lot more variety for velocity and angles and gradual speeding up...

 

Of course, when I write the x and y positions to the sprites, I have to divide them by 16.

 

The hardware collision register approach might be risky for thin paddles and fast moving balls. It might be better to use position compares for this...

 

Catsfolly

Link to comment
Share on other sites

Hi, Catsfolly,

 

May I ask why you chose a 12.4 fraction scale? I'm curious to know if there is a specific technical reason, or just arbitrary.

 

I myself use a 16-bit 8.8 fraction scale in Christmas Carol for sprite velocities. However, since my sprites move on a single axis at a time, I only need to keep track of one per sprite (along with its direction of travel).

 

Applying the velocity to the MOB register involves a simple "SWAP + AND $00FF" right before.

 

With 8.8 fractions, I can scale all my sprite movements by 256, which makes it very convenient.

 

dZ.

Link to comment
Share on other sites

Hi, Catsfolly,

 

May I ask why you chose a 12.4 fraction scale? I'm curious to know if there is a specific technical reason, or just arbitrary.

 

I myself use a 16-bit 8.8 fraction scale in Christmas Carol for sprite velocities. However, since my sprites move on a single axis at a time, I only need to keep track of one per sprite (along with its direction of travel).

 

Applying the velocity to the MOB register involves a simple "SWAP + AND $00FF" right before.

 

With 8.8 fractions, I can scale all my sprite movements by 256, which makes it very convenient.

 

dZ.

In most of my games I use an 8.8 fraction scale, but I find it a bit annoying sometimes having to do unsigned arithmetic for the x coordinate.

 

In Clowns and Balloons, I used a 12.4 scale, because at that time IntyBasic used shifts for power of two multiplies and divides up to 16.

After that, divides were done by repeated subtracts, which are slow. So this seemed like a good fit for IntyBasic.

 

I think the latest 0.9 version of IntyBasic has a special case for divides by 256, where it uses a swap and a mask. So maybe 8.8 works for basic now too.

 

Catsfolly

Link to comment
Share on other sites

In most of my games I use an 8.8 fraction scale, but I find it a bit annoying sometimes having to do unsigned arithmetic for the x coordinate.

 

In Clowns and Balloons, I used a 12.4 scale, because at that time IntyBasic used shifts for power of two multiplies and divides up to 16.

After that, divides were done by repeated subtracts, which are slow. So this seemed like a good fit for IntyBasic.

 

I think the latest 0.9 version of IntyBasic has a special case for divides by 256, where it uses a swap and a mask. So maybe 8.8 works for basic now too.

 

Catsfolly

 

And now there are the fixed 8.8 point numbers and the operators +. and -. for fixed add/substraction. :)

  • Like 1
Link to comment
Share on other sites

OK folks, here's my most complete game so far. I've gotten myself side-tracked with 2 other ideas (and a 3rd on the drawing board, literally) and I know this guy needs some work. So - it's about time I solicit some feedback.

 

What is it? A while back, rev mentioned that there isn't really a basic "Pong" game for the INTV. So this is my implementation of one. It's highly influenced by an old Radio Shack Pong system I had as a kid, so anyone familiar with that or similar will see some of my inspiration.

 

I already am conscious of a bunch of current limitations:

 

My input handling is not perfect - damn near any input acts as "fire" to progress through screens - that's intentional as I play around with it. Use the honour system until you get familiar with the menu options (it's not very complex).

 

The ball only moves at 45 degree angles. I have no idea how hard the math would be to implement complex angles. Early Pong systems were weird - some only moved at very predictable angles, some allowed for fancy moves depending on how you hit the ball. I can't decide how much it's worth it to look into that. My ball movement logic is VERY simple at the moment so there's room for improvement there.

 

Graphically (especially the title screen), I'm intentionally going for a very old school look.

 

It only plays to a limited number of lives/score. Again, intentional as I develop it. Trivial to change those numbers for an actual "release".

 

There is no AI. There IS a single-player mode, however. I find Pong AIs are either laughably bad, or too damned good. To be honest I'm not sure just how much people would want this, although I certainly have the cycles to spare (and a rough idea how to implement a few difficulty levels of it). It would make the menu/setup more complex though - more steps of input.

 

And I find the "hard" levels damn hard. I can only imagine how bad they'd be with a real controller. Maybe I'm just a bad gamer and others will enjoy the challenge.

 

Oh, and the collision detection in hockey is that way on purpose. You'll understand once you get the "puck" trapped on your "stick". And yes, sometimes it can bite you in the ass. Try moving horizontally to really mess with it :P

 

 

Anyway - time to see what people think. I've kinda stopped messing with it but if I get feedback, I can see myself poking at it again.

 

 

i assume you are talking about the ball and paddle on a chip games and not atari pong? I have been wanting and pestering for a ball and paddle remake. I like the old black and white version with 4 games plus the hidden handicap for ?hockey?. This is the closest thing to it so far. Thank you for this game. If you ever want to clone it or make more of the games here is footage of the gameplay of those old "pong clone systems." It is only hockey though. And your racquet ball game is backwards from the old pong clones

Edited by pimpmaul69
Link to comment
Share on other sites

Yup, that's precisely my inspiration. I've got an original Odyssey in the basement, along with a much later Radio Shack version which is quite similar to Magnavox's later releases. It even includes a light gun, although I think that would be a little ambitious for an INTV (although I did entertain the thought of using a Sega Master System gun with an INTV2... no idea if it's even possible though, I only know they're plug-compatible).

Link to comment
Share on other sites

Yes the odyssey consoles -oddyssey1&2 are the same games and chips. Some systems only played 3 games. Some played 4. And some also played the handicapped hockey as well but they were all on the same chip. Also some had ball speed and paddle size. If you ever are needing something to program, cloning that would make me the happiest person on the planet :D but definitely awesome to have something similar to that. Great job on the game.

Link to comment
Share on other sites

Thanks :)

 

When I'm talking Odyssey, I'm talking http://en.wikipedia.org/wiki/Magnavox_Odyssey. No chips in this baby ;)

when i am talking about odyssey systems other than the 1&2 i am referring to the clone systems that are identical in hardware to your radio shack model. It used a general instruments ay-3-8500 ball and paddle on a chip. I wish i could find it emulated on something that i could use on an emulator on my wii. I have only found it simulated on a pc but i dont use a pc. Yours so far is the closest i have found to simulating that
Link to comment
Share on other sites

  • 4 weeks later...

It's baaaaaaaaaaaaaaaaaaaaack suckers :)

 

pINg has taken on some life, and I'm looking for playtesters. The game may look much the same but the play is vastly different:

 

1. Angles! No longer are you restricted to 45 degree angles when hitting the ball. I've tried to emulate the original PONG logic as close as possible - what this means is that *where* you hit the ball on your paddle, determines the resulting angle. And nothing else. The incoming angle is completely irrelevant. This may not seem "right" to people, but remember I'm aiming for PONG here. If it's absolutely horrible and people hate it and would never play it, then fine, we can talk. But this is how PONG played, believe it or not. A lot of PONG clones have this wrong.

 

2. Better collision detection! Hopefully the ball won't magically fly through your paddle at high speeds any more. Now there is a catch - there are some very edge cases (ie: at the edge of your paddle) where you may think you have it, but you do not. This is almost exactly how the original PONG played. This behaviour is especially noticeable towards the top and bottom of the screen. Again, if it's awful then I'm willing to re-work it, but I'm aiming for PONG.

 

3. AI! That's right, you can now play a single player game against a computer opponent. He's good, but not unbeatable. This is really where I'd like some feedback. Is he too easy? Too hard? To me these kinds of games are best played with a friend anyway, but you still need a single player option (that's more than just racquetball). So I'd like to have it "decent", but I'm not planning on implementing 8 different AI skill levels or anything.

 

4. Solo pINg now tracks your high score, and retains this so long as you don't reset the game. You win at 100 points, by the way.

 

5. A ton of miscellaneous fixes from hard learnings, suggestions for GoatNom, etc. Like starting the game with the disc and removing extraneous text.

 

 

Now, before getting all excited, there are caveats:

 

1. Hockey is basically unchanged. It is 2-player only. However the screen is much better, in my opinion. But the gameplay is still shit. Please don't spend much time with it. The screen is literally the only thing I have touched.

 

2. The AI occasionally is a bit jittery (ie: he flicks up and down a bit). I'm aware of this - I'm curious how bad you guys think it is. Does it ruin the game?

 

3. I can't swear that the menu traversal is perfect.

 

4. I can't swear that the collision detection is perfect.

 

5. There are certain places where the ball will slow down. It in no way affects the gameplay; it happens when someone misses the ball. This is something I still have to work on. I'm doing way too many calculations - somewhere. Just have to optimize some math. But for now it doesn't actually affect play, it just looks odd at higher speeds.

 

 

All that being said, the single player version of pINg, against the computer, is something I'd like other people to play before I tweak much further. So if you don't mind the warts and rough edges, I'd love some feedback :)

 

 

 

 

ping.rom

Link to comment
Share on other sites

Feedback, you say? I gots me some of those... ;)

  • The angles at which the ball reflects seem off, and I mean that as compared to the original, canonical Pong. (That's right, your clone may have got it wrong too! :P )
  • The paddles seem a bit too long for the resolution, I wonder if this makes the game easier than it needs to be?
  • The "death" sound is cool... the first couple of times. After that it just gets loud and obnoxious.
  • The AI seems good (and not unbeatable, which I like), but at times it seems to get spastic and shake up and down frantically while waiting for the ball. Real humans do not have that masterful control over the input widget (which on the original was a potentiometer knob), so perhaps you can tone it down a bit? It does not "ruin the game," though. Perhaps you can add a bit of aliasing to the movement to soften them a bit?
  • The collision detection seems a bit glitchy: sometimes the ball seems to "stick" to the paddle for a frame or two before bouncing off.
  • One time, my paddle was all the way to the top, touching the border; the ball hit exactly at the intersection of the border and the paddle, and it freaked out! It started shaking a pixel or two up and down, while sliding to the left and off the screen. It looked like it got stuck inside the wall and was bouncing itself out of it.

On which "Pong" are you basing your game? I ask because you seem to highlight a lot of nuances that I don't think exist in the original Pong. The original arcade Pong was a very simple game, with very simple internal rules.

 

NOTE: I found a description of the implementation in an old history book I had, based on an interview with Nolan Bushnell and Al Alcorn:

 

 

Bushnell's original vision included paddles that simply batted the ball in the direction it had come from. Feeling that this was inadequate, Alcorn devised a way to add English to the game and aim the ball with the paddles.

 

Instead of using solid lines to represent the paddles, Alcorn broke the paddles into eight segments. If the ball hit the two center segments of the paddle, it flew straight back at a 180-degree angle. If the ball hit the next segments, it ricocheted off at a shallow angle. Hitting the ball with the outer edges of the paddle would send the ball back at a 45-degree angle.

 

Alcorn also added ball acceleration. The original game simply buzzed along at the same speed until someone finally missed the ball. Alcorn found the game dull and thought that speeding the ball during extended rallies might lend some excitement. He wrote the game so that after the ball had been hit a certain number of times, it would automatically fly faster.

 

So, it's something like this:

post-27318-0-02396900-1416057314_thumb.png

 

Link to comment
Share on other sites

That is precisely what's coded in. Hit in the middle, it comes straight back. The closer to the edge you hit it, the steeper the angle. I'm using 7 segments instead of 8 although the middle segment is slightly wider than the rest. Some of it may be masked by the glitchiness, but it's there. What I was highlighting was more that a lot of people (and clone developers) believe that PONG took into account the angle of incidence, which it does not. And also that you can save every ball - there are some situations in PONG where you cannot save the ball, by design - basically the far corners.

 

The rest of your comments are what I'm looking for. It's hard to tell what is a real problem and what is rare stuff that happens because I know to test for it. Looks like some more work is needed :) The times when the ball "sticks" to things are a real pain in the ass to fix but obviously must be.

Edited by freeweed
Link to comment
Share on other sites

That is precisely what's coded in. Hit in the middle, it comes straight back. The closer to the edge you hit it, the steeper the angle. I'm using 7 segments instead of 8 although the middle segment is slightly wider than the rest. Some of it may be masked by the glitchiness, but it's there. What I was highlighting was more that a lot of people (and clone developers) believe that PONG took into account the angle of incidence, which it does not. And also that you can save every ball - there are some situations in PONG where you cannot save the ball, by design - basically the far corners.

 

The rest of your comments are what I'm looking for. It's hard to tell what is a real problem and what is rare stuff that happens because I know to test for it. Looks like some more work is needed :) The times when the ball "sticks" to things are a real pain in the ass to fix but obviously must be.

 

Gotcha. I think 7 segments is fine, since the original essentially fused the two center ones. However, if you're trying to be faithful to the original (and I think you are), you must make sure the segments are of equivalent size. This means that the center segment must be twice as long as the others.

 

Also, I think the angles you are using are a bit off. They should be 180o, 30o, 45o.

 

So far, I think it's a good attempt, and I'm sure it'll get better. However, I don't feel the "Pong" vibe when I'm playing. I fired up the original in DOSBox (downloaded from the link I provided before), and played both back-to-back, and they feel different. There is something that throws me off, perhaps it's the speed, the angles, or the collisions; but there's something that doesn't feel quite right yet.

 

I'll play a few more times and provide more feedback later.

 

-dZ.

Link to comment
Share on other sites

Well *technically*, the angles in the original PONG are even weirder. They get steeper with the more volleys you play. Remember of course that none of the original logic was digital, so they were able to do a lot of subtle stuff that we'd have to implement using complex floating point calculations. Which isn't going to be terribly efficient on this system. So yeah, I've cheated somewhat. :D

 

The original had 7 (8, but 2 are basically fused) possible segments with the middle being just 180. So you're looking at 3 possible angles for the top and bottom halves of the paddle, not just 30 and 45. But these 3 angles changed as the game increased in speed. It was actually pretty damned complex and I've yet to really play a perfect implementation.

 

I guess I should backtrack my statements a little - I'm not looking for pixel-perfect PONG here. I know my angles are going to be a bit wonky (and a lot wonky at the ends of the paddles) because I'm just using simple 1:1 or 1:2 ratios for x and y. I was more describing the segmented paddle and how the angle of incidence is unimportant. A LOT of people (especially those that never played early PONG games) think it's "wrong". The extreme angles you can get at the ends remind me heavily of some of the other PONG wannabes I played back in the day, especially the original Odyssey. Now, that guy let you impart english to the ball, which is impossible/impractical here, so it's not going to be a perfect copy of that either.

 

Really, there's a reason that every PONG clone is different. Every system has its own ways of handling these things, and every implementer has their own spin on it.

 

I can tell you right now that the "feel" is going to be off no matter what - I still have major work to do on fine-tuning the collision detection and a lot of other subtle smoothing of the rough edges. I was mostly curious about the AI to be honest. But then I got distracted with your bee idea for Goatnom and now I'm off on that again.... sigh.

Link to comment
Share on other sites

Well *technically*, the angles in the original PONG are even weirder. They get steeper with the more volleys you play. Remember of course that none of the original logic was digital, so they were able to do a lot of subtle stuff that we'd have to implement using complex floating point calculations. Which isn't going to be terribly efficient on this system. So yeah, I've cheated somewhat. :D

 

The original had 7 (8, but 2 are basically fused) possible segments with the middle being just 180. So you're looking at 3 possible angles for the top and bottom halves of the paddle, not just 30 and 45. But these 3 angles changed as the game increased in speed. It was actually pretty damned complex and I've yet to really play a perfect implementation.

 

 

There were only three angles, the last two segments were at 45 degrees. I also don't recall the angles getting steeper as the game progressed, but I could be wrong. Really, in interviews, Al Alcorn has stated that the implemented rules were very simple and straightforward.

 

In any case, "Pong" has a specific feel to it, and most implementations get this right. I think the thing that throws me off the most in yours right now is the collision: since the ball seems to "stick" to the paddle at times. My guess is that if you get smooth collisions and ricocheting, then it'll be fine.

 

-dZ.

Link to comment
Share on other sites

Hmm, everything I've read and everything I remember playing says that the last 2 angles were not just 45. BUT - I could be reading about and remembering other PONG type systems as well. It's been a looooing time. Personally I like the sharper angles. 45 degrees at max was what made pINg very meh in the first place. Here's a version which plays the angles as you describe - to me it's a bit bland. Most shots end up 45 degrees again. Oh but I fixed the scoring sound to pretty much match PONG.

 

I definitely need to stop the sticking behaviour. It's not terribly common when I play - do you have any feel offhand for when it happens the most for you? Theoretically I've coded it entirely out of the game (at the expense of some smoothness in play) but it's a persistent devil.

ping.rom

Edited by freeweed
Link to comment
Share on other sites

Well *technically*, the angles in the original PONG are even weirder. They get steeper with the more volleys you play. Remember of course that none of the original logic was digital, so they were able to do a lot of subtle stuff that we'd have to implement using complex floating point calculations. Which isn't going to be terribly efficient on this system. So yeah, I've cheated somewhat. :D

 

Actually... it was nearly all digital, save for the 555s that read the controller pots and which made bleeps and bloops, and other fiddly bits for stuff like driving out video and providing power. The rest is 7400-series TTL logic. What it lacked was a microprocessor. It was all hardwired state-machine logic.

 

This guy picked the system apart in great detail: http://www.worldphaco.com/uploads/LAWN_TENNIS.pdf

 

I don't entirely buy Dr. Holden's argument that the ball moves faster upward vs. downward. It gets displayed sooner (so the apparent motion might seem faster) when moving upward, but I'm pretty certain it takes the same number of frames to travel from the top of the screen to the bottom as it does from bottom to top.

 

Sure, if you measure the exact raster pixel time from when the ball is displayed at one end of the field vs. the other (as opposed to taking whole fields into account), there's a slight effect. You can make the same argument for leftward vs. rightward travel. But then, every game displayed on a raster is subject to this nitpicky detail. If you're actually programming a PONG clone, you assign the same magnitude velocity for up vs. down nonetheless, in pixels/field.

Link to comment
Share on other sites

Ouch. I'm clearly getting my PONG and Odyssey very much mixed up here. PONG used ICs eh? Kooky.

 

Anyway, I'll stop pretending I know how these games are designed and just work on one that's fun :) Here's a fix for the jitter, I think. DZ is really good at ferreting out edge cases so I'll await his verdict on if I've gotten it nailed. I'm also starting to realize the AI's weakpoints - not at I can consistently aim to exploit them. Oh, and this version is back to >45 degree angles, because I'm stubborn that way :P

 

This *might* have made the AI too easy - let me know if that seems to be the case.

 

 

 

 

ping.rom

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...