Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Help me choose a way forward (Sprites)

Author
Message
DavidAGK
AGK Developer
10
Years of Service
User Offline
Joined: 1st Jan 2014
Location:
Posted: 26th Dec 2014 22:05
Hi,

I've split my character (for a platform game intended for PC/Mac) down into separate sprites for the legs and body. I've probably gone a little overboard so I've ended up with a fairly large sprite set for the legs (running and walking on flat, shallow up, steep up, shallow down and steep down, crouching, standing etc). They won't fit onto a single 1024 x 1024 image and I've heard the following...

1. Images should be no larger than 1024 x 1024
2. Performance is best when sprites are made up from a single image (as frame changes are really just UV offsets) rather than adding frames to a sprite from multiple images.

So I have some choices as detailed below but not sure which is true/best...

A. Make the image that holds the sprite frames (legs) larger, for example 2048 x 2048 because the game is intended for PC/Mac rather than mobile and PC/Macs are fine with larger images.

B. Do have separate images because the performance hit is very small (or is it?) and larger images are a bad idea full stop.

C. Use different sprites (that are made from single images) and swap them out so I don't use images larger than 1024 AND I also don't use sprites that obtain their frames from multiple images.

So...which option out of A, B or C is best? Any insight appreciated!
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 26th Dec 2014 22:12
A. probably unless you have any plans to add mobile support at some point as they just wont load on mobile if too large.

doubt any of those methods will cause much hassle on pc though anyway, just go with whatever you are comfortable with.

life's one big game
spec= 2.6ghz, 1gb ram, 512mb gpu, directx 9.0c, dbpro and classic
Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 27th Dec 2014 00:34
Since you're targeting PC/Mac you should be OK with at least 2048^2, but I've not tested higher. On desktop large texture files don't hurt performance much. Lots of texture files can take a bit in loading time, but again on desktop not much.
No clue if #2 is true. I was running some tests a while back and added 4 1024x1024 textures together with each having 64 frames for a total of 256 frames. I could not notice any issues. Performance is probably better when using a single texture, but "better" may be the difference between 10 ms over 300 frames. Hard to tell without testing on multiple machines.
Like smallg says, probably no difference on PC/Mac to worry about it. Maybe if you have 5,000 sprites on screen at once and you want over 60FPS, but IMO anything over 60FPS is pointless

DavidAGK
AGK Developer
10
Years of Service
User Offline
Joined: 1st Jan 2014
Location:
Posted: 27th Dec 2014 10:07
Cheers guys. I'll use bigger images as it's the easiest solution! 😃

Login to post a reply

Server time is: 2024-05-19 17:16:09
Your offset time is: 2024-05-19 17:16:09