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 / Black borders in SetDisplayAspect()??

Author
Message
Behdadsoft
14
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 24th May 2016 15:42 Edited at: 24th May 2016 18:05
Hi.

for remove Black borders I used SetDisplayAspect(16.0 / 10.0) instead SetVirtualResolution(). in my older games I never seen black borders but now I see this problem also exist in SetDisplayAspect() command.
when I used SetDisplayAspect(-1) it fill black borders but make some problem in different devices.

this is my code:



Thanks.
Behdadsoft
14
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 25th May 2016 06:23 Edited at: 25th May 2016 08:10
anyone know how can fix it in percentage system? (left and right Black borders)
Making of my game is almost over and need a way to fix it.

Black Border is my Nightmare when I try begin make a game with AGK.

Thanks.
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 25th May 2016 08:09
SETSCISSOR(0,0,0,0) will let you draw into the borders, or SetDisplayAspect(-1) will stretch everything to fit.
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
Behdadsoft
14
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 25th May 2016 08:13 Edited at: 25th May 2016 09:37
Quote: "SETSCISSOR(0,0,0,0) will let you draw into the borders, or SetDisplayAspect(-1) will stretch everything to fit.
"


Thanks CJB for reply.

I used SETSCISSOR(0,0,0,0), but don't change anything.

when I used SetDisplayAspect(-1) it don't show image correctly in different devices.

I used this code for fix it but won't work correctly on some devices.




also I attached a sample project with above code but it won't work on all devices, please help me to fix it.

https://www.dropbox.com/s/cb9j4jyun13hmbt/Test.zip?dl=0

Thanks.
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 25th May 2016 14:09
SETSCISSOR(0,0,0,0) will let you draw into the borders. You still need to draw something in those borders if you don't want them to remain empty. You can check how much drawing space you have available using the GetScreenBounds commands.



V2 T1 (Mostly)
Phone Tap!
Uzmadesign
Behdadsoft
14
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 25th May 2016 14:27 Edited at: 25th May 2016 16:40
Quote: "SETSCISSOR(0,0,0,0) will let you draw into the borders. You still need to draw something in those borders if you don't want them to remain empty. You can check how much drawing space you have available using the GetScreenBounds commands."


I tried to fix it but really I can't do more. if possible please show me your mean in my example.

Thanks.
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 25th May 2016 16:18
It isn't a bug, please don't go back to the posts where you claimed that everything you couldn't do is a bug. It is not good for TGC when newcomers arrive at the forums to see people writing about bugs that don't exist.
CJBs advice is 100% correct. Many, many people are already using this method.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 25th May 2016 16:19
Behdadsoft
14
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 25th May 2016 16:41 Edited at: 25th May 2016 17:45
Thanks Mobiius.

your way without use SetVirtualResolution( 1280, 800 ) work very well but black border still exist. I can't use SetVirtualResolution( 1280, 800 ) because it make small my pictures while I define size according to Percentage system.

also when add SetVirtualResolution( 1280, 800 ) and change image size according to VirtualResolution, but black border also exists.

sorry BatVink.

Quote: "many people are already using this method."


but why this method don't work for me?

Login to post a reply

Server time is: 2024-03-29 11:20:36
Your offset time is: 2024-03-29 11:20:36