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 Size Problem

Author
Message
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 15th Aug 2014 18:23
Hi.
I want Resize my sprite according resolution, but don't show in screen.
I use this code:


Please guide me to solve this Problem.

Thanks
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 15th Aug 2014 19:29
That makes your ladder size about 7. Pretty small. Does it show up without resizing?

Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 15th Aug 2014 19:57
I want run it on different Andorid devices, and need scale it according device wide. for this work should use this formula:

100 * sprite wide / device wide

but don't work for me.
JimHawkins
15
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 15th Aug 2014 20:29
That formula is wrong.

On my monitor a 35 pixel wide sprite would end up 2.7 pixels wide!

-- Jim - When is there going to be a release?
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 15th Aug 2014 20:48
do you have good formula that work?
Grayvyn
16
Years of Service
User Offline
Joined: 30th Oct 2008
Location: Southern California
Posted: 15th Aug 2014 22:51
SpriteSize * CurrentResolution / OriginalResolution

Where OriginalResolution is what the sprite was designed for.
And they need to all be floats for it to work.

I think

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 16th Aug 2014 03:44
Familiarize yourself with proportions, I find you'll use them A LOT in programming in one form or another.

Login to post a reply

Server time is: 2024-11-25 07:42:44
Your offset time is: 2024-11-25 07:42:44