Does any body has the code to make a bouncing ball in a c++ windows application. And If it's possible, I would like a easy way of making it without using graphics.h
Does any body has the code to make a bouncing ball in a c++ windows application. And If it's possible, I would like a easy way of making it without using graphics.h
Since you said you're using Windows I'd say the easiest way would be with GDI, all you'd need is a few variables to hold the current left and top coords, a bitmap of the ball and mask, an hDC and BitBlt().
Look up BitBlt on MSDN.
or u can use allegro
-its easy to learn!
I would recommend SDL. I learned it (the basics) and made a breakout game - all in about 9-10 hours total.
//napKIN
"The best way to get answers is to just keep working the problem, recognizing when you are stalled, and directing the search pattern.....Don’t just wait for The Right Thing to strike you – try everything you think might even be in the right direction, so you can collect clues about the nature of the problem."
-John Carmack
To do it very easy and look pleasing to our eye, meaning its not physically correct, just inverse the direction you are moving the bitmap in when you want it to "bounce". post what you have so far