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 / Using LoadSubImage and subimages.txt

Author
Message
Red5
13
Years of Service
User Offline
Joined: 26th Aug 2011
Location:
Posted: 14th Sep 2011 11:10
Hi,

Has anyone got a working example of using LoadSubImage with the subimages.txt file?

I've looked at the documentation but can't find any file spec for the subimages.txt file and so am struggling to get something working.

Based on the documentation, this is my understanding of how things work...

1) Create an image file that contains multiple images stitched together, so for example, you might have 2 game sprites that are 128 x 128 in a single 256 x 128 image

2) Use LoadImage to load this image into memory; this is the "parent" image

3) Use LoadSubImage to create individual images from the parent image

I attempted to setup the subimages.txt file in a similar way as a fontmap but it doesn't work.

Any pointers?

Thanks,

Red.
Red5
13
Years of Service
User Offline
Joined: 26th Aug 2011
Location:
Posted: 14th Sep 2011 11:15
Ignore my last post - the minute I pressed "post" I figured it out.

Basically what I was doing wrong was my subimages file was called "subimages.txt", whereas what I needed to do was name it "[image file name] subimages.txt", so for example, if my parent image file is called "sprite.png" then my image atlas file must be called "sprite subimages.txt".

Thanks.

Login to post a reply

Server time is: 2024-11-21 20:43:38
Your offset time is: 2024-11-21 20:43:38