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 / sprite / tile sheets

Author
Message
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 26th Oct 2011 00:29
Hi, is there an example detailing the managing of sprite sheets? More specifically, the text file that accompanies this file describing the tiles/frames..
I am not near my PC right now, but I recall there needing to be a control txt file with your image. So, you can only have one image then?
Is this the same as the term "atlas image" ?

Thanks

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 26th Oct 2011 01:05
Yes it is the same thing. The text file simply holds each individual image's details IE. Where it is, how big it is and what it's called.

AGK has commands to load "sub images" which use the text file data to load individual sprite frames.

nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 26th Oct 2011 22:55
OK. But what about the layout/content of the txt file?

..and can you only have one?

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 26th Oct 2011 23:23
Here's a quick example from a font subimage file:
64:0:0:66:90
87:0:90:56:90
119:0:180:52:90
109:0:270:49:90
95:0:360:46:90
37:66:0:45:90

...so from the first line an image called "64" starts at position 0:0 and is 66 pixels wide by 90 high... and so on.

Quote: "..and can you only have one?"

One sub-image text file? Yes, per image. The sub-image commands look for a txt file that has the same name as the image but suffixed " subimages.txt"

Login to post a reply

Server time is: 2024-11-22 10:18:27
Your offset time is: 2024-11-22 10:18:27