Pong on an Alphanumeric Display

Post details of your projects here.
Post Reply
nik282000
Posts: 10
Joined: Sat Jan 20, 2018 10:53 pm

Pong on an Alphanumeric Display

Post by nik282000 »

I finally put together a full working project with my updated Basic Stamp (LPC11u37), a handheld clone of pong that uses a non-graphical display to show the game-field. I decided on this for a few reasons, first was to see if I could get one of these generic 1602a LCDs to work as a raster display at a reasonable speed, second was to see if I could make something with with a working human interface, all of my previous projects have not been meant for 'users.'

The 2 knobs are potentiometers rather than encoders for the sake of simplicity, neither the game nor the interface needed a multi-turn input device. There is a single button for accepting/progressing through the simple menu system and for stopping a game early to return to the splash screen. In order to make the ball movement a lot smoother it moves in "float space," the position, speed and direction of movement is all stored as floating point values and only rounded to the integer pixel positions during the display process.

During two player mode the game runs as expected and increases the ball speed on each successful bounce by a paddle, this helps to both prevent infinite games between fast players and to help get slower players up to faster speeds. In single player mode the player gets 3 balls and gains a point after each bounce off the far wall, just like two player mode the ball speed also continuously increases. To keep things interesting the extreme corners of the paddles act like 45degree surfaces and modify the ball direction, also the non-center surface of the paddles add a 5 degree random modification to the ball's direction.

Overall I am happy with how it turned out and how easy it was to get started with the BASICtools.

Gif of one player mode: https://i.imgur.com/XXYoA6s.gifv
Gif of two player mode: https://i.imgur.com/m3Jucty.mp4
Attachments
Pong_Small.jpg
Pong_Small.jpg (238.54 KiB) Viewed 10537 times



basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: Pong on an Alphanumeric Display

Post by basicchip »

Nice little project. I would like to format this for a blog post on the site. And I pay a reward for blog posts. Pong, always popular, the first one I did was on an HP 2100 mini computer, driving an HP logic state analyzer in X-Y graphic mode. That was in the dark ages on the early 70s.

Post Reply