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 / 'Removing the black bars', I know it was posted somewhere.....

Author
Message
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 8th Mar 2013 23:07
Someone, somewhere posted a way to load an image that is bigger than the virtual resolution being used to create a sprite that sits in the background and actually draws outside of the specified virtual space.

This is useful for getting rid of the bars above/below or left/right of main app when the height/width ratio is not the same as the actual device.

I discovered that it is kind of needed on my Samsung Galaxy S III. When my app first installs, you need to enter a user name. This causes the keyboard to pop up. No problem with that. But, when the keyboard goes down and the app continues, ghosts of the keyboard hover (and jiggle) in the background.

This is the first time I've seen this happen. So I thought it would be good to 'clear' the black bars with my own background.

But I cannot find the post that showed how.

Does anyone remember which it was? Or what the method is?

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 8th Mar 2013 23:22
Not sure if this is exactly what you mean, but it might be worth a look anyway... this was posted in the AppGameKit snippets forum by Ravey.



I got a fever, and the only prescription, is more memes.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 8th Mar 2013 23:26
I saw that. Thank you.

However, I don't want to change the ratios of my display and game play.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 9th Mar 2013 00:37
Is overdrawing what you're after?

http://forum.thegamecreators.com/?m=forum_view&t=200602&b=41

I haven't tried the method myself.

xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 9th Mar 2013 04:09
SetScissor(0,0,0,0) is the command that is often recommended to over draw sprites without cropping. I haven't played around with it enough to know it's potential.

Recently I've been experimenting with a NinePatch styled setup where I set the virtual resolution of the app to the device's full width and height, then scale a background panel or such using nine subimages so nothing gets stretched out of proportion. Of course this gets much more complex when also trying to keep all elements relative to whatever scale the device uses.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 9th Mar 2013 04:25
SetScissor(0,0,0,0) is exactly the command I was looking for!

Now, at least for iPads, the bars above/below are not there.

Thank you!

Tomorrow, I'll test it on my Androids.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 9th Mar 2013 09:00
I should probably do this myself. I don't think it's going to be much work making my game fill up 4:3 screens, levels already uses SetViewOffset. But it doesn't sound like fun.

Thanks for the info guys


Demo 3 is out now!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 9th Mar 2013 17:49 Edited at: 9th Mar 2013 18:06
EDIT: It works fine on Android.

Now if I can just figure out why my objects go flying off the side in Android only, I'll be happy.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2024-11-24 09:52:31
Your offset time is: 2024-11-24 09:52:31