Arcade Pong now with sound!
Here it is with sound. All of the sounds are pretty much straight square waves with some envelope modulation.
The interesting thing is that the missed ball sound is about a B3 for 400ms (24 frames). But it is LFO modulated (amplitude) at 120Hz. I tried 60Hz and it sounded all right, but I wanted it to be better.
What I did was update the sound envelope twice per frame. Once before start of display (after Vertical Blank) and once after display (before Overscan). This isn't quite 50/50 (more like 70/30) but it actually sounds pretty good.
I'm pleased that it turned out.
The paddle hit is a B4 for 16.6ms (1 frames) and also has a bit of an envelope but it would require at least a 240Hz update to get it close. I chose to give it a bit of an attack but not the decay.
The wall hit is a B3 but just a straightfoward square wave for 33.3ms (2 frames). There is no envelope.
Well there it is. The Arcade Pong sounds, as accurate as I can make them. Don't think I ever got to play Pong in an arcade so this is as close as I'll get maybe.
Next up is more gameplay improvements. This includes:
- the ball colliding with the paddle in the different zones,
- the various ball speeds.
- the paddles not having the full vertical range
- serve delays
- game over detection
- game start detection
- attract mode
Once this is all done, you can start mocking up your Pong cabinets, add a TV and a junior, install the paddles in the cabinet and... well maybe not.
Edited to post in the source:
4 Comments
Recommended Comments