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 Studio Chat / changing scene color?

Author
Message
2D Analyst
AGK Developer
19
Years of Service
User Offline
Joined: 2nd May 2004
Location:
Posted: 15th Mar 2020 21:43
I'm messing around with scene and placed a character with transparent background into the scene. On photo application, the background is transparent, but in AppGameKit scene it's showing black color. Is there a way to change the default background color in scene?
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 15th Mar 2020 22:08 Edited at: 15th Mar 2020 22:09
EnableClearColor() and SetClearColor()
You may want to check that your scene code doesn't change this or if there's and option to change it in the scene editor.

If the problem is that the character has a black outline you might want to change the background color in your paint app to match your game
2D Analyst
AGK Developer
19
Years of Service
User Offline
Joined: 2nd May 2004
Location:
Posted: 15th Mar 2020 22:57
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 15th Mar 2020 23:03 Edited at: 15th Mar 2020 23:04
not the default but this command is better
SetImageTransparentColor( iImage, r, g, b ) but I think in studio you also include the alpha

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
2D Analyst
AGK Developer
19
Years of Service
User Offline
Joined: 2nd May 2004
Location:
Posted: 16th Mar 2020 03:03
Thanks, that function will help me! Now, I noticed the scene cache the original tiles. I’ve made changes to the scene and preview looks good. When I compile and run codes it shows the original tiles.

blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 16th Mar 2020 03:51 Edited at: 16th Mar 2020 03:51
Try clearing out you cache;
Delete C:\Users\your_name\AppData\Local\AGKApps\your_app
and C:\Users\your_name\AppData\Local\AGKApps\Windows\your_app
2D Analyst
AGK Developer
19
Years of Service
User Offline
Joined: 2nd May 2004
Location:
2D Analyst
AGK Developer
19
Years of Service
User Offline
Joined: 2nd May 2004
Location:
Posted: 19th Mar 2020 00:54
Actually I was thinking of adding a background image in scene. This can be the default display until I place tiles over it.

Login to post a reply

Server time is: 2024-04-23 16:55:58
Your offset time is: 2024-04-23 16:55:58