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

Author Topic: My boat sprite won't appear.  (Read 1248 times)

0 Members and 1 Guest are viewing this topic.

Greentoast

  • Newbie
  • *
  • Posts: 9
    • View Profile
My boat sprite won't appear.
« on: May 17, 2015, 04:07:38 pm »
So I am making a little game demo and my boat will not appear , I am getting zero errors it's just the sprite won't appear.
http://pastebin.com/iAFDgy4j

shadowmouse

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
Re: My boat sprite won't appear.
« Reply #1 on: May 17, 2015, 04:10:24 pm »
window.draw() needs to go between window.clear() and window.display(), not after them.

Greentoast

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: My boat sprite won't appear.
« Reply #2 on: May 17, 2015, 04:24:43 pm »
Changed it and my boat still doesn't seem to want to come out :(.
http://pastebin.com/t1mwVZr8

shadowmouse

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
Re: My boat sprite won't appear.
« Reply #3 on: May 17, 2015, 04:28:07 pm »
Load the texture before setting it to the sprite. At least, I think that might help, I've never seen anyone do it the way round you've got it.

Greentoast

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: My boat sprite won't appear.
« Reply #4 on: May 17, 2015, 04:32:02 pm »
It works! Thanks mate!

 

anything