Ball moving like arkanoid or brick game

Blitz3D Forums/Blitz3D Beginners Area/Ball moving like arkanoid or brick game

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Make your ball have a X- and Y-Speed, adding this values to the ball's position each frame

If it hits a wall, just flip the corresponding axis like so:

If ball_x_pos < 0 then ball_x_speed= -ball_x_speed

Use HUD_SetObjectOrigin (ball,0,0) to center the handle after loading/creating your ball.