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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - WickedWannabe

Pages: [1]
1
Graphics / Re: Sprite leaving the trail behind on move
« on: July 10, 2018, 06:48:15 pm »
Alright guys. Thanks alot for help. I changed the code so the sprite position is on closest integer position on a moment of draw call, but the picture is the same. So i changed the monitor and theres totally no trail behind the sprite. Kinda dissapointed in my monitor and ashamed of creation of this post. Anyway thanks again.

2
Graphics / Re: Sprite leaving the trail behind on move
« on: July 09, 2018, 11:20:29 pm »
Quote
which I presume is not something that would be present in the original window.
But it is on my game window, exactly as it shows on video. its not a video compression trail. The trail is realy small, but you can see it and sprite slightly jerks as it moves.

3
Graphics / Sprite leaving the trail behind on move
« on: July 09, 2018, 09:58:03 pm »
Hello good sirs. I have a problem. I'm moving the sprite and as it moves it leaves a lite shade or trail behind as it moves.
Heres video, please watch it high quality. You can see the shade on the helmet of character.

Heres the code of main loop
Quote
   sf::Clock clock;
   sf::Time timeSinceLastUpdate = sf::Time::Zero;
   while (isRunning)
   {
      timeSinceLastUpdate += clock.restart();
      while (timeSinceLastUpdate > m_timePerFrame)
      {
         processEvents();
         update(m_timePerFrame);
         render();
         timeSinceLastUpdate -= m_timePerFrame;
      }
   }

And this is the render method
Quote
   m_window->beginDraw();

   m_stateManager->currentState()->render();   

   m_window->endDraw();

Quote
void Window::beginDraw()
{
   m_window.clear();
}

void Window::endDraw()
{
   m_window.display();
}

Quote
void GameLevelState::render()
{
   m_map->draw(m_window);
   m_gameEngine->draw(m_window);
}

m_map drawing map tiles, and gameEngine using render system to draw character.

I tried different things, such as turning on and off framerate limit, vertical sync, moving the render method around the main loop. To use. The trail is still there. Please help. Thanks

Pages: [1]