I start over. I'm trying to make a simple game, where four arrows (up, right, down, left), move from one side to the screen to the other side, one after the other. It would be like guitar hero, but you have to press the key corresponding to the arrow while these pass through a zone.
I have an array of sprites with the four arrows in it. Now my problem is that I can't move the arrows one after the other. I tried drawing a new one in every loop, but it didn't work. I just need to have a constant wave of arrows moving through the screen, but I'm stucked right there.
That a lot more clear
Always first try it with numbers before random numbers so you know what's going on.
Firstly you'll want to create your array of sprites. For example :
sf::Sprite[4] array_sprites = {arrow_left, arrow_up, arrow_right, arrow_down}
For the main loop you'll want to move the sprites by using sf::Sprite.Move(x,y) inside a for-loop so you can iterate through array_sprites:
for (int i = 0, i <= 3, ++i) {
array_sprites[i].Move(x,y);
}
Then clear your screen, draw everything and display it. End of loop.
But seriously, read the tutorials of 1.6 for how to draw sprites, the system is the same, but you'll have to replace sf::Image with sf::Texture.