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

Author Topic: Sprite disappears when move render window.  (Read 1964 times)

0 Members and 1 Guest are viewing this topic.

aratnon

  • Newbie
  • *
  • Posts: 24
    • View Profile
Sprite disappears when move render window.
« on: December 16, 2013, 07:30:09 am »
When I move the render window my player sprite disappears from the window but others sprites still exists in the window.
My player sprite is not a static sprite. It moves all the time, but the others is static sprite, they don't move.

How can I fix this problem?

Edit. It seems like when I move the render window it makes some conflicts with collision test so it makes my play sprite fall of the screen.
Is there any method to capture move window event?, so I can pause the updating collision.

Thanks in advance.
« Last Edit: December 16, 2013, 08:28:38 am by aratnon »

AlexAUT

  • Sr. Member
  • ****
  • Posts: 396
    • View Profile
Re: Sprite disappears when move render window.
« Reply #1 on: December 16, 2013, 10:36:26 am »
Edit. It seems like when I move the render window it makes some conflicts with collision test so it makes my play sprite fall of the screen.

I guess your character is falling down, because the last frametime is really high and because of that the collision detection doesn't work?

If so, you should use fix timesteps. See here http://gafferongames.com/game-physics/fix-your-timestep/


AlexAUT

BaneTrapper

  • Full Member
  • ***
  • Posts: 213
  • Do you even see this, i dont need it.
    • View Profile
    • Email
Re: Sprite disappears when move render window.
« Reply #2 on: December 16, 2013, 02:46:09 pm »
I suggest analysing your post, and try to answer your question, there is lack of information to work with.

One thing that is obvious is that you made a mistake somewhere, if that is what you want to hear well i just wrote it, because it is not behaving as you intended it to behave.

I suggest looking up how to make a post to get help, i would help but there is nothing i have to work with except that you made a mistake.

Quote
Is there any method to capture move window event?, so I can pause the updating collision.
Use your IDE debuging.
BaneTrapperDev@hotmail.com Programing, Coding
Projects: Not in development(unfinished/playable):
http://en.sfml-dev.org/forums/index.php?topic=11073.msg76266#msg76266
UP and in Development: The Wanderer - Lost in time
http://en.sfml-dev.org/forums/index.php?topic=14563.0