Skip to main content
replaced http://gamedev.stackexchange.com/ with https://gamedev.stackexchange.com/
Source Link

The answer to why to use a sprite-sheet has already been answered in this questionquestion.

How you use a sprite-sheet in your game is quite simple. Usually you have a class that keeps track of the elapsed time and displays another frame once a given threshold has been reached (eg. if 1/25th of a second has passed or similar).

How to display a new frame depends on your underlying graphics API. You might have to copy the new pixel data to a pixel-buffer, or modify UV coordinates of a quad, so that it shows another portion of the sprite-sheet.

The answer to why to use a sprite-sheet has already been answered in this question.

How you use a sprite-sheet in your game is quite simple. Usually you have a class that keeps track of the elapsed time and displays another frame once a given threshold has been reached (eg. if 1/25th of a second has passed or similar).

How to display a new frame depends on your underlying graphics API. You might have to copy the new pixel data to a pixel-buffer, or modify UV coordinates of a quad, so that it shows another portion of the sprite-sheet.

The answer to why to use a sprite-sheet has already been answered in this question.

How you use a sprite-sheet in your game is quite simple. Usually you have a class that keeps track of the elapsed time and displays another frame once a given threshold has been reached (eg. if 1/25th of a second has passed or similar).

How to display a new frame depends on your underlying graphics API. You might have to copy the new pixel data to a pixel-buffer, or modify UV coordinates of a quad, so that it shows another portion of the sprite-sheet.

Source Link
bummzack
  • 22.7k
  • 5
  • 64
  • 87

The answer to why to use a sprite-sheet has already been answered in this question.

How you use a sprite-sheet in your game is quite simple. Usually you have a class that keeps track of the elapsed time and displays another frame once a given threshold has been reached (eg. if 1/25th of a second has passed or similar).

How to display a new frame depends on your underlying graphics API. You might have to copy the new pixel data to a pixel-buffer, or modify UV coordinates of a quad, so that it shows another portion of the sprite-sheet.