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 / Setting sprite image after creation shows squashed image

Author
Message
mindsclay
12
Years of Service
User Offline
Joined: 1st May 2012
Location: Rocklin, CA, USA
Posted: 28th Sep 2013 02:39
This may be the nature of the beast.

I am setting up sprites at the beginning of my program with the initial image. I am swapping images to show different pre-rendered 3D words. When I SetSpriteImage later on, the larger image is squashed to about the size of the initial image.

Is this normal? And is there a way to fix this without having a separate sprite for each image?

www.mindsclay.com
lucifermagus.mindsclay.com (not working with Firefox)
mindsclay
12
Years of Service
User Offline
Joined: 1st May 2012
Location: Rocklin, CA, USA
Posted: 28th Sep 2013 03:08
I got this one...

I now use SetSpriteSize after the swap using X=-1 and Y=-1.
This automatically sets the size for each image of different sizes.

Sweet!

www.mindsclay.com
lucifermagus.mindsclay.com (not working with Firefox)
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 28th Sep 2013 06:42
Yup, the original create sprite used whatever the original sprite size/dimensions was. If the later image setting was a different size/dimensions, it would affect it.

Glad you got it working.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 8th Oct 2013 11:16
Sound like you might also benefit from using an atlas image or if all images are the same size, an animated sprite?

Login to post a reply

Server time is: 2024-05-07 05:53:07
Your offset time is: 2024-05-07 05:53:07