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

Author Topic: How do I use Spite Sheets to animate something in C# SFML  (Read 1670 times)

0 Members and 1 Guest are viewing this topic.

Geoffry_the_Deprogrammer

  • Newbie
  • *
  • Posts: 14
    • View Profile
    • Email
How do I use Spite Sheets to animate something in C# SFML
« on: September 05, 2014, 04:47:34 am »
I've created a sprite sheet, but I haven't got a clue as to how i'm supposed to implement it into my game, and all the Tutorials are for C++, thanks for any and all help...

Strelok

  • Full Member
  • ***
  • Posts: 139
    • View Profile
    • GitHub
Re: How do I use Spite Sheets to animate something in C# SFML
« Reply #1 on: September 05, 2014, 07:42:21 am »
You can either learn that a different language shouldn't be an obstacle for a programmer or you can use Thor

Xornand

  • Jr. Member
  • **
  • Posts: 78
  • C++ / Python
    • View Profile
Re: How do I use Spite Sheets to animate something in C# SFML
« Reply #2 on: September 05, 2014, 08:01:02 am »
The simplest way (although arguably not the best one) would be to load the entire spritesheet as one image and store it somewhere where it can live for the duration of the game. Then, each entity/character that you want to render would have a Sprite object with the texture set to that spritesheet and texture rect set to the specific part of that texture (a single frame). If you want the character to animate, simply set new coordinates for the texture rect (to the corresponding new frame), every X amount of time.

 

anything