hi, i'm trying to draw a moving text using al_draw_textf, from y = 0 to y = HEIGHT , i've got y += velY; but al_draw_textf is not moving but drawing it on every single position. Could you help me?
Please provide a snippet of code so that we can help you better.
Just guessing here, but Y is an int and velY is < 0.5?
The logic is that everytime I start a new level there should move a text "LEVEL 1" etc. But it looks like the image i added.
You need to clear the screen every frame. al_clear_to_color
I think that's not a problem. I think that al_draw_textf is static or it draw on every position.
I think that's not a problem. I think that al_draw_textf is static or it draw on every position.
If you draw the text more than once without clearing the screen, those are the results you will get. What do you expect if you don't erase the old text output?
Are we talking abound al_clear_to_color in main.cpp in my render zone? because i have it there.
How would we know that? You haven't posted enough code.
What type is x? What type is y?
What does Objects::Update() do?
I don't see you increasing y at all.
Also it does look like you are drawing the text without first clearing the screen.
Well I coded a quick one that just has the words Level # scroll the screen. Maybe my code can help you understand where your code is messing up at.