Flickering Problem

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

joel.epsteinBUS31vi
Posts: 135
Joined: Thu Sep 13, 2012 10:25 pm

Re: Flickering Problem

Post by joel.epsteinBUS31vi » Sat Jul 27, 2013 6:46 pm

Thanks, Paul.

I've been doing some additional testing. And I think that your question about whether this happens on every machine is telling. Because, in fact, it doesn't - though I get my best performance (least flickering), oddly enough, on a Mac emulating a PC.

I've tried the acceleratedRendering and haven't been able to notice much difference.

And I thought somewhere I read that "lock screen" works for objects on cards, but not stacks themselves. Nevertheless, I tried it as well with no avail.

I think I'm to the point where I'm going to have to just say it's all due to individual hardware differences.

That said, however, I still get really bad flickering on my Mac when using sliders to dynamically resize all the stacks. Interestingly, I get no flickering on the PC side. It's simply bizarre.

Thanks again for sticking in there with me on this strange adventure...

Joel

pkocsis
Posts: 105
Joined: Sat Apr 15, 2006 7:20 am

Re: Flickering Problem

Post by pkocsis » Sat Jul 27, 2013 8:47 pm

Hi Joel,

Hope I didn't lead you down too many useless paths....

I've had more issues with Vista/Win7 as far as moving objects and choppiness/flicker than I ever did in XP. I really think that hardware and (seemingly more importantly) graphics drivers play a huge role in simply getting something to move smoothly. I remember experimenting with Vista/Win7 machines that had really decent graphics cards, and finding that even between versions of drivers (mostly tested with nVidia at the time), there would be differing performances...

Micorsoft's under the hood changes that occurred with Vista/Win7 as far as 2D hardware accleration seemed to affect not only LiveCode but other software too. I had to learn to live with it, but at times it was really frustrating to see meager XP machines exhibit smooth (2D move) performance when new Win7 machines with fast multicores and uber GPU's exhibited choppiness. In LC's defense though, 2D acceleration scheme changes by MS seemed to affect other software besides LC (judging by research I did at the time).

Sorry for the long winded diatribe, but your dilemma struck a chord with me. Wish I could've been more helpful but best of luck in your endeavors Joel!

Paul

joel.epsteinBUS31vi
Posts: 135
Joined: Thu Sep 13, 2012 10:25 pm

Re: Flickering Problem

Post by joel.epsteinBUS31vi » Mon Jul 29, 2013 7:38 pm

Hey Paul -

Actually, I really appreciate you hanging in there with me. Your suggestions helped me learn a whole bunch of new stuff, so that's cool. Plus, it's great having someone to share the misery with...

Peace.

Joel

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4171
Joined: Sun Jan 07, 2007 9:12 pm

Re: Flickering Problem

Post by bn » Mon Jul 29, 2013 9:15 pm

Hi Joel,

I tried to replicate the flickering on a Mac with a mainstack and a substack. Using your code there was no flickering. Then I tried to set the lock screen/unlock screen, still no flickering. Then I checked liveResizing for both stacks and I got quite some bad flickering. When I removed lock screen/unlock screen the flickering went away again.
All this to ask if you have liveResizing on in your stacks. That seems to do funny things when moving stacks simultaneously.

And would it be possible for you to post a bare bone version of your stacks that shows the problem on your system? Then we would talk about the same stacks and maybe that brings something up.

By the way, I don't really understand the problem you are trying to solve, using skinning you could make a hole in your stack that lets you see what is behind the stack underneath the "hole", the area around the "hole" is opaque. Of course you loose the decoration, i.e. the part above the stack that lets you close a stack etc. On a Mac this is the title bar at the top of stack with the red yellow and green button. But one could fake this. And with a little magic you could change the transparency of the "hole"

Kind regards
Bernd

joel.epsteinBUS31vi
Posts: 135
Joined: Thu Sep 13, 2012 10:25 pm

Re: Flickering Problem

Post by joel.epsteinBUS31vi » Tue Jul 30, 2013 6:39 pm

Bernd -

Thanks, I'll check this out. But in the meantime, I appreciate your willingness to take a look at what I've been working on. Unfortunately, I'm under an NDA, but I got permission to share with you personally, if I can contact you off-list. Would that be okay?

Peace.

Joel

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4171
Joined: Sun Jan 07, 2007 9:12 pm

Re: Flickering Problem

Post by bn » Tue Jul 30, 2013 11:19 pm

Hi Joel,

I will gladly look into this. The problem is that I am Mac only. If that is ok then
put this into a button

Code: Select all

on mouseUp
   put "bmlnZ2VtYW5uQHVuaS13aC5kZQ==" into tData
   put base64decode(tData)
end mouseUp
I attach a stack that shows how to make a hole into a stack that is transparent to the underlying objects. You can decrease the transparency of the hole. This is a rough scetch, partly hardcoded etc. But it shows the basics.
Currently it shows the skinning image and a fully opaque hole turns to black. If you toggle the visibility of the skinning image with skinning image not visible the black color of the opaque hole becomes the background color of the card.

I still don't know if it is at all what you have in mind, so I might be far off but it was fun to code. The idea of the hole in a stack is inspired by a stack from Scott Rossi.

Kind regards
Bernd
Attachments
skinned.livecode.zip
(7.82 KiB) Downloaded 294 times

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Flickering Problem

Post by Simon » Tue Jul 30, 2013 11:31 pm

Hey Bernd,
You've posted maybe 1 or 2 million very helpful stacks to these forums. :)
The trouble is, it's near impossible to find them again here in the forums unless I remember a keyword. I understand why you don't post them to the Users Samples (most are very specific to solving a problem) and was wondering if you could post them to a website with short description.

The Bernd Gallery would be a fantastic resource!
Well I think so.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

joel.epsteinBUS31vi
Posts: 135
Joined: Thu Sep 13, 2012 10:25 pm

Re: Flickering Problem

Post by joel.epsteinBUS31vi » Wed Jul 31, 2013 12:06 am

bn wrote: I attach a stack that shows how to make a hole into a stack that is transparent to the underlying objects.
Bernd -

Thanks so much for this. It's a very cool implementation and I learned something from your sample stack. I appreciate it. My difficulty is that I need to be able to dynamically and independently resize the stack and it's hole. But otherwise, very excellent indeed.

Peace.

Joel

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4171
Joined: Sun Jan 07, 2007 9:12 pm

Re: Flickering Problem

Post by bn » Wed Jul 31, 2013 1:38 am

@Simon,

thanks for the kind words.

actually I have no idea how to organize and comment those stacks that as you say are often specific to a particular problem. It would be a hotchpodge of stacks.

I could send you my hard disk :)

Kind regards
Bernd

Post Reply