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

Author Topic: Animation in SFML 2.0.  (Read 1386 times)

0 Members and 1 Guest are viewing this topic.

Roose Bolton of the Dreadfort

  • Full Member
  • ***
  • Posts: 113
  • Full-time Procrastinator, Part-time programmer.
    • View Profile
    • Personal Portfolio/Website/Blog
Animation in SFML 2.0.
« on: March 20, 2012, 06:43:46 am »
Whats the best way for animation? EG. moving through a big sprite sheet in SFML 2?

I noticed it had a textureRect property? Does this mean we can use that to decide where in the sprite sheet we want to be and move dynamically when we want?

when I wrote a 2D engine for University, we used FrameRect's, and they where so flexible and easy to use thats why I ask.

Cheers.
Trying so very hard to finish at-least one project.

Watch out for the RAII police, they will get you.

www.bantersaurus-games.com

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Animation in SFML 2.0.
« Reply #1 on: March 20, 2012, 07:52:00 am »
Quote
I noticed it had a textureRect property? Does this mean we can use that to decide where in the sprite sheet we want to be and move dynamically when we want?

Yes.

Look at all the animation codes on the forum, wiki and in SFML-related projects, there are several sources of inspiration ;)
Laurent Gomila - SFML developer

 

anything