I have added a reset button so that you can reset embarrassing scores
Furthermore the speed of the game was strongly dependent on processor-speed.
Therefore I made the loopspeed fixed to 50 cycles per second which might be too high for older devices
Also some functions have been changed and some options have been added at the beginning of the program.
Files at https://www.dropbox.com/sh/ntucli2k8nql ... Ev_2a?dl=0 have been updated.
Pong
- Dutchman
- Posts: 851
- Joined: Mon May 06, 2013 9:21 am
- My devices: iMac, iPad Air, iPhone
- Location: Netherlands
- Flag:
Re: Pong
Pong has now sound
The website https://www.freesound.org has a wealth of sound samples. It is free, you only need to make a login-account.
There I found the 'Atari-pong', a decaying square-wave signal.
The skill of the computer-player is now randomized, so that play is less annoying. Set 'Random=1' for that.
If 'Random=0' then the skill of the computer-player is reduced wit the variable 'Handicap'
With 'Handicap=1' you will loose. With 'Handicap=2' you have a chance to win.
The paddles are larger now, so that winning becomes easier.
Files are updated at:
https://www.dropbox.com/sh/ntucli2k8nql ... Ev_2a?dl=0
The website https://www.freesound.org has a wealth of sound samples. It is free, you only need to make a login-account.
There I found the 'Atari-pong', a decaying square-wave signal.
The skill of the computer-player is now randomized, so that play is less annoying. Set 'Random=1' for that.
If 'Random=0' then the skill of the computer-player is reduced wit the variable 'Handicap'
With 'Handicap=1' you will loose. With 'Handicap=2' you have a chance to win.
The paddles are larger now, so that winning becomes easier.
Files are updated at:
https://www.dropbox.com/sh/ntucli2k8nql ... Ev_2a?dl=0