SFML community forums

Help => General => Topic started by: Mansiepansie on May 14, 2015, 06:13:05 pm

Title: PONG Game sprite layers
Post by: Mansiepansie on May 14, 2015, 06:13:05 pm
Hello, i've been trying to do a PONG game for the first time and i'm atm doing the ingame Background..

However, im very new to Programming and SFML. I've been trying to implement an image/sprite as the background.

I manage to implement the Image/Sprite, but.. the sprite itself  becomes the top layer blocking all my ingame objects so i can only see the image itself. Is there a way to implement it so that it is the bottom layer in the game?

Im probably retarded, but hey.. im really new to programming so please help :(
Title: Re: PONG Game sprite layers
Post by: shadowmouse on May 14, 2015, 06:16:18 pm
Just draw the background first and then draw everything else afterwards. You still have to have them between the same clear and display, but whatever is drawn first is at the back.
Title: Re: PONG Game sprite layers
Post by: Mansiepansie on May 14, 2015, 06:32:35 pm
Thanks bro! Solved it straight away :D