simple?

how can i make a box bounce around a screen so when it hits the sides it bounces off i would like to do it from side to side the in diagnals plz help me thank you :confused:

you need to know where in space your box in and where your screen is.

do some simple collision detection for when the corners of your box touches the screen

do some simple physics to calculate velocity of your box once it colides with the side of your screen