PDA

View Full Version : Strange colour bug in a piece of software I'm developing.



Paul_Boland
10-20-2014, 01:50 PM
Hi Folks.

I'm working on a new computer game called Dungeoneer. It's a 2D rendered adventure game. I have recently encountered a strange bug that has me totally stumped, and everyone else I have turned to for help is also at a loss to explain it!?!

On my laptop and on my sisters laptop, the game works fine, as it should. But on my desktop, when the video intro footage finishes playing, the play area goes dark as if the lights have been turned off.

The game is being built in Clickteam's Fusion 2.5 Developer. I'm using an Active DirectShow Object to play the video on one frame, and then the last frame of the video is a static image on the next game frame. By right, the player shouldn't see any difference when the game jumps between the video frame and the static image frame, and on my laptop there is no difference. But on my desktop there is!

I have enclosed the following files:

Dungeoneer Paul's Desktop PC:
This is a video of what is happening on my desktop.

Dungeoneer.exe:
This is a standalone build of Dungeoneer. You can run this on any Windows PC.

Dungeoneer.mfa:
This is the Clickteam Fusion 2.5 MFA file so people can view the code.

What I would like is for people to test this. Either run the standalone EXE file or open the MFA file in Fusion and play it. Can you then let me know what happens when the video reaches the end and the game jumps to the static image screen. If all goes well you should see no difference at all. But if you see the lights go out, can you let me know. Can you also let me know what graphics card you have? I have a Nvidia GeForce GTX 560.

A few people have looked into this for me. Some have no problem, it works fine, others do have the light-out problem. It's a mix of Windows 7 and 8 users and a mix of graphics cards, but the two people who have reported the light-out bug happening for them are running Nvidia graphics cards.

I even contacted Clickteam themselves and they haven't a clue what's going on! They said they have never seen anything like it, just like I never have either. This bug is a complete mystery!?!

Thanks for your time.

Paul Boland.
[email protected]

You can download the file here:

http://www.knighttrek.com/DungeoneerBug.zip

ncr100
10-20-2014, 03:41 PM
I don't have a PC handy, but could you try hacking your app to set some X,Y origin offsets for each of the active views in your window, to determine which view is dimming the rest of the scene? Kinda sounds like a misbehaving layer.

Or a modal alert with 0 width / height, which is only successfully dimming the background.

Paul_Boland
10-20-2014, 06:15 PM
Here's the thing... This bug only happens on some computers, not all. A lot of people are not seeing the lights go out, it's working fine for them. If it was a misbehaving layer then every computer would see this happen. So it's because of this that I feel it's not my code, it's not Fusion, it's got to be something that's causing this to happen. But WHAT??? I've never encountered anything like this before!?! I don't even know where to begin to speculate on it! I'm wondering if it's something to do with Nvidia cards and/or drivers so I'm trying to get an idea of who's having issues and what their system spec is so I can try and nail down the culprit.

Thanks for your feedback though, appreciated.

Sensei
10-20-2014, 08:37 PM
Do these people with problems using dual monitor setups?

Paul_Boland
10-20-2014, 08:50 PM
Don't know about the others, but my desktop is a single monitor setup and as you can see from the video clip in the zip file I have this lights-out problem happening. Yet on my laptop and on my sisters laptop it doesn't happen!?! Confused!!

Sensei
10-20-2014, 09:00 PM
I saw your videos in zip now.
On PC it's slightly darker, not much, but little.

So, whole anim is played avi or mov from file?
And then replaced by static image from png or so?

It reminds me color-space issues. With and without color space translations. There is similar darker effect..
Take screen-shot of that darker stage, load to app where you can change color-space, or apply conversion, to see whether it goes back to normal colors.

Can game engine API allow you to make screen-shots?
Instead of having static image loaded from external source, you can take screen-shot from the last rendered frame of animation, and use that as static image for further display.

Paul_Boland
10-21-2014, 10:29 AM
I rendered out the animation from Lightwave as an image sequence. I compiled it into a WMV movie file which is what plays in the game. I then took that last bitmap of the image sequence and took it into Fusion as the static frame. When the WMV movie file finishes, the static image is displayed. What's strange is on some computers that static image is displayed dark. It doesn't happen on all computers which really has me puzzled!?! I don't think it is a colour space issue as that's just a reproduction of colours for printing. What I can't understand is why this looks fine on some computers and yet on others it gets dark!?! And if you look at the video, when the move ends and the still image is displayed, it just the still image that is dark, not the rest of the game interface??? Really strange!!! No one seems to have any ideas on what's causing it!?!

Sensei
10-21-2014, 10:43 AM
One is decoded and displayed by animation codec. Other one is decoded and displayed by completely different image file format.. Two completely different pieces of code.

Codecs are people downloading and installing from unknown sources.
One can have DivX pack from website XXX, other one from completely different web site YYY.

Maybe color of animation is brighter, not still image darker? I don't know. You should know (or better check taking screen-shots and loading them in Photoshop and comparing pixels).


No one seems to have any ideas on what's causing it!?!

I told you, but you're not listening.

Developing software requires checking everything, not guessing.
Things that "should never happen" are happening every day.

Mr_Q
10-21-2014, 10:59 AM
Yes, this is an issue with two different systems decoding the image and having different Gamma values for the sRGB representation. A common problem between OSX (1.8) and Windows (2.2) but even software in the same platform can employ gamma curves that don't match.

Paul_Boland
10-21-2014, 12:17 PM
Thanks, guys. Ok, new question then... How do I fix it? Since the movie and static image are being displayed fine on some computers but not on others, how I fix it so it's displayed fine on all computers? If this is some sort of decoding issue with different sRGB representation on different computers than is this outside of my control as the software developer?

Danner
10-21-2014, 06:20 PM
The only thing I can think of is to take control of how the video and image is displayed, somehow bundling a codec yourself and use that, or use the same "player" to display the video and the image (some can display both) Just shots in the dark as I have no experience with your dev environment.

Paul_Boland
10-21-2014, 08:23 PM
I've just managed to fix this issue :)!! It turned out I was programming the game to run using Direct X 9. When I switched this to run in pure software mode the lights-out issue no longer happens. Delighted!! Thanks for the help and feedback, much appreciated.