Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: PONG Game sprite layers  (Read 1352 times)

0 Members and 1 Guest are viewing this topic.

Mansiepansie

  • Newbie
  • *
  • Posts: 13
    • View Profile
PONG Game sprite layers
« 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 :(

shadowmouse

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
Re: PONG Game sprite layers
« Reply #1 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.

Mansiepansie

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: PONG Game sprite layers
« Reply #2 on: May 14, 2015, 06:32:35 pm »
Thanks bro! Solved it straight away :D