How to use sprite sheets?
#11
(09-09-2022, 02:34 PM)TerryRitchie Wrote: My preferred method is to load the sprite images into an array.

Hi Terry,

So I tried loading graphics via sprite sheet in 2 different ways:

1) Just loading the sprite sheet and referencing the sprites I needed.

2) Loading the sprite sheet and adding the sprites into an array (your preferred method).

Option 2 is indeed nice if you want to have greater control over which frames get shown. Using this method, I was able to easily "rewind" an animation.

However, from a game design standpoint, it needs to be pointed out that option 2 comes at the cost of load time.

When I loaded just the sprite sheet (option 1), I could get all the graphics in the animation to show in about 1.15 seconds.
Option 2 increased the load time to 2.25 seconds.
Reply


Messages In This Thread
How to use sprite sheets? - by 40wattstudio - 09-09-2022, 12:39 AM
RE: How to use sprite sheets? - by James D Jarvis - 09-09-2022, 12:50 AM
RE: How to use sprite sheets? - by mnrvovrfc - 09-09-2022, 12:57 AM
RE: How to use sprite sheets? - by 40wattstudio - 09-09-2022, 02:47 PM
RE: How to use sprite sheets? - by bplus - 09-09-2022, 01:52 AM
RE: How to use sprite sheets? - by 40wattstudio - 09-09-2022, 02:00 AM
RE: How to use sprite sheets? - by 40wattstudio - 09-09-2022, 01:23 PM
RE: How to use sprite sheets? - by TerryRitchie - 09-09-2022, 02:34 PM
RE: How to use sprite sheets? - by 40wattstudio - 09-09-2022, 02:43 PM
RE: How to use sprite sheets? - by 40wattstudio - 09-12-2022, 10:31 AM
RE: How to use sprite sheets? - by TerryRitchie - 09-13-2022, 01:53 AM
RE: How to use sprite sheets? - by 40wattstudio - 09-09-2022, 01:57 AM
RE: How to use sprite sheets? - by Pete - 09-12-2022, 03:54 PM



Users browsing this thread: 1 Guest(s)