2D Game with classes : background issue
ALLEGRO with c++
I have a 800x400 display
In which I have drawn a horizontal line
1 2 3 4 5
|
void Ground::Render()
{
al_draw_line(x,y,800+x,y,al_map_rgb(0,255,0),10); //x=0 , y=330
}
| |
A ball is continuously moving on this line . I used transformation to keep the ball at the centre of screen.
After a while ball moves into black screen space as the line was drawn only till x=800 . Line doesnt exist beyond x=800 position.
Is there a way so that I can loop this line to appear continuously ,like forever? As long as ball is moving.
option 1) Have the line move along with the ball
option 2) Draw the line without any transformations.
Topic archived. No new replies allowed.