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.

DarkBASIC Professional Discussion / PNG and Transparency

Author
Message
TheMeq
13
Years of Service
User Offline
Joined: 5th Sep 2012
Location: Nottingham
Posted: 6th Sep 2012 14:43 Edited at: 6th Sep 2012 15:01
Good Day!

I have made alot of progress in a game I am putting together, but I have come across an issue with Transparency on PNG's.

My Original PNG is:


but its coming out like:


Is there anything im not doing right?

My code is



and even if I change the 3 at the end to 1 or 6 it doesn't do anything.

10 PRINT "Hello World"
20 GOTO 10
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 6th Sep 2012 16:51
You know you can press that little key at the top next to F12 called "prt scrn" right? Then open up paint, press CTRL+V to paste your screenshot and upload it.

Anyway, try changing the last value to a 1 instead of a 3:



TheComet

"if you don't understand recursion than you probably don't understand recursion." ~Jerico2day
TheMeq
13
Years of Service
User Offline
Joined: 5th Sep 2012
Location: Nottingham
Posted: 6th Sep 2012 17:56
Ah! Perfect!

I'm sure I tried that and it didn't go down to well :S

And I tried a print screen and when I pasted it just showed a black box, I'll remember the F12 next time

Many Thanks

10 PRINT "Hello World"
20 GOTO 10
BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Sep 2012 18:00
F12 doesn't capture the screen...he mentioned PrtScrn is next to F12.

Because you are fully hardware-optimised, Windows PrintScreen can't see the game window. You need to use a screen capture app that can grab DirectX (like FRAPS, free version available)

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 6th Sep 2012 19:06
Ah I better keep 1 in mind then...

Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 7th Sep 2012 00:05 Edited at: 7th Sep 2012 00:12
The rescue is here...

Here's a simple drop-in code you can use to take screenshots. It's great because it will actually place the image in the folder next to your game executable, and it will increment the file name if you make more screenshots.

Takes the work right out of it. All you gotta do is call the function.




Login to post a reply

Server time is: 2026-07-07 22:22:00
Your offset time is: 2026-07-07 22:22:00