well i dont know the int name so i will call it counter.
Just use:
dbText(x, y, dbStr(counter));
If you haven't a count system is easy:
When you check for collision with one of the paddles, just increment the value:
If this is not what you are looking for, please explain better
@EDIT
Oh sorry i didnt read the whole thing :S
So for the menu, it's called game states.
Hassan teached me this thing, its quite simple.. but not sure if will say it right, im kinda sleepy.. Please guys if i mistake something please correct.
@EDIT 2:
Ok i edited this 5 times, i dont want to mess up your head
I think its easily explained... Good luck
So basicly make a ENUM with the Gamestates
enum ENUM_NAME { Paused, MainMenu, Game };
Then in the loop just use the
switch(ENUM_NAME)
{
case MainMenu:
//Main menu things here
break;
case Paused:
//Game displays the pause menu and handles the Pause button and stuff
break;
case Game:
//Basicly all the game functions
/*
ex: SystemUpdate();
player.Update();
enemy.Update();...
*/
}
Real sorry dude i dont know to explain it :S, I dont know if you can understand.. probably not because im not a good teacher..
For the AI... i dont know what you are mentioning with AI for pong.. are you looking for the CPU paddle movement?
If yes i think you can make it so it follows the Y of the Ball..
Bascily it will get invencible but you can play with the speed of movement , and playing with the speed you are making the difficulties of the game
Easy han?
C++ Medium 3.5/5
www.oryzhon.com <-- My company's website (W.I.P)