Click to See Complete Forum and Search --> : Pong in VB


zackbass
04-15-2002, 04:50 PM
For my final project in my VB class I have to make some program that shows off everything that we did during the year, and I decided to make Pong in VB. I am planning on controlling the ball movement with a linear equation that just changes the top and left properties of the shape and bounces off things at right angles which should be very easy. My question is will there be any big problems with this plan? I will be working on this for almost a whole marking period, so I will have plenty of time to screw with it, but I need to know if there will be a big unforseen challenges.

Nick_B
04-15-2002, 05:55 PM
When I programmed a pong game on my calculator I ran into these a couple of issues:

1. The ball bouncing at 90 degrees made it really, really, really boring. This may have been partially because I was working on a limited screen--so you might not see this being such an issue.

2. AI--if you want a computer player. Since I only had one calculator, and it isn't that large, I needed someone to play against. Programming some kind of computer player is a pain. I could easily make a perfect computer player, but then you couldn't win. The end result was a player that was pretty good, but when he finally missed the ball, he looked like a moron.

Anyway, good luck. Have fun.

arcane_III
04-15-2002, 07:05 PM
I think the hardest part is getting the bounce correct. You can do a 90 degree bounce but that is not the norm, or at least it hasn't been in my experience.

zackbass
04-16-2002, 03:21 PM
It may not look correct, but getting the oppisite reciporical of the slope would be too easy an option to overlook. I may go with some system that would be more realistic though.

Azuth
04-17-2002, 11:49 AM
Use a +X and +Y for every frame/cycle. Using these as variables allows you to speed it up or slow it down easily too. When you bounce off the top wall change your Y to (0-Y) and likewise for the other 4 walls. It should be a peice of cake. Just make sure you put a chain gun in there somewhere. No real game lacks a chain gun.

zackbass
04-17-2002, 03:15 PM
That was was what I was planning on doing, and yes, I have a ridiculus amount of time for such a project that a chaingun will probably be included just out of boredom. The teacher I am doing this for demands a comment on everything, even things like "end", so I might have to start now if I want to finish those comments too. :D

hu flung dung
04-18-2002, 12:25 AM
Rather than create 'Pong' and an AI for the computer opponent, wouldn't it be easier to create an 'Arkanoid' game where you just have to hit bricks? Then you dont have to program an AI! It would also be the perfect game for implementing a chaingun (ie. For shooting the bricks).

Azuth
04-18-2002, 01:15 PM
In college(5 years ago) I wrote two games. One was a simple turn based strategy game. You have a team of fantasy critters on one side of a grid and opponent has another team. The critter types worked out sorta like paper, scissors, rocks when you move then onto each other. It had sprite graphics and animations and was kinda fun.

The other was for a senoir project. I wrote a 3D engine that was about as good as the older Wolfenstein/Blake Stone engine. Keep in mind that this was back when Doom was brand new(development started before Doom's release). It had split screen death match(as in, before death match existed). One player uses the mouse and the other uses the keyboard. It had sound effects, music, fixed point math(so it could work on PC's that didn't have that fancy math coprocessor). It ran in 320X200 and kicked ***. The teacher didn't even care if the code was commented since it was likely a lot more advanced than anything the teacher had ever seen or worked on. I was and still am quite proud of it.

Enjoy writing those games while you can. Its just not worth it to write them for a living. You get paid beans and have to work obscene hours. Too bad they are so damn much fun to write...

zackbass
04-18-2002, 03:16 PM
I dunno about switching to arkanoid. I already have the UI for Pong done (all of five minutes, most of which naming objects), and one kid tried Pon and failed miserably earlier in the year, so it looks like like a bigger challenge to make (which it isn't). Maybe i'll incorporate computer and second player into the game with such a ridiculus amount of time.

I made a Tic-Tac-Toe program earlier in the year that worked off an "AI." I took a informal survey of the playing habits of people in the room and tailored the computer to fight thier weak point. Hopefully I can do the same with Pong.

arcane_III
04-18-2002, 05:00 PM
Originally posted by Azuth

...
The other was for a senoir project. I wrote a 3D engine that was about as good as the older Wolfenstein/Blake Stone engine. Keep in mind that this was back when Doom was brand new(development started before Doom's release). It had split screen death match(as in, before death match existed). One player uses the mouse and the other uses the keyboard. It had sound effects, music, fixed point math(so it could work on PC's that didn't have that fancy math coprocessor). It ran in 320X200 and kicked ***.
...


Have you GPL'd it or thought about it?

jester22c
04-18-2002, 10:46 PM
Originally posted by arcane_III


Have you GPL'd it or thought about it?

You should. And even if you don't do you still have a copy of it (compiled or not) I really want to see this :D to play of course.. I'm not going to steal your code or anything like that :p

BTW arknoid is much better than pong! It would be more fun to play as well, except if you only used 90º angles it might become very hard to win...