Ball moving like arkanoid or brick game
Blitz3D Forums/Blitz3D Beginners Area/Ball moving like arkanoid or brick game
| ||
Hello Fellow coders id like to make a ball deflect and move around a 800,600 screen. im using sprite candy how can i do a 2d version but for blitz3d +sprite candy , or just blitz3d if you dont have sprite candy thanks |
| ||
What is sprite candy? EDIT: Ah, I see now: http://www.x-pressive.com/SpriteCandy/ |
| ||
I'm not sure if you mean like this or not. But, I did this a while ago trying stuff out. I imagine there's probably an better way to do this though. |
| ||
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. |