Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
kbenson
Visitor

Re: Thanks Team GandK!!!

"TheEndless" wrote:

Also, did you see my note above about the drawing getting erased in KidPaint after the screensaver? Is that down to the timing between painting canvases, which seems to be completely unpredictable?


I didn't, thanks for the bug report!

It's probably to do with the number of items on that canvas when the full redraw is a attempted. We've found that calling show() on a canvas object before a different canvas has finished it's show() makes the prior attempt fail. This can be problematic for the main back-drawing canvas, as it continually gets more and more images added, and there's no definitive way to tell when a canvas has finished it's show(). Since we use anywhere between 8-10 canvas objects (currently), the timings can be complex... That's why there's sometimes artifacts on some of the submenus as well.
-- GandK Labs
Check out Reversi! in the channel store!
0 Kudos
YungBlood
Streaming Star

Re: Thanks Team GandK!!!

"TheEndless" wrote:
"kbenson" wrote:
What we did is just track the time between messages. If it has been more than 5 minutes (minimum time for screensaver) since the last message, we trigger a show of all visible canvas objects, in order.

I noticed that KidPaint did that on the second keypress after the screensaver, but I don't like the idea of requiring the user to press a button twice to properly redraw after the screensaver. It makes some sense in KidPaint, since you're actively interacting with the channel, but not really in any of my audio channels. The route I took originally was to write an update to a tmp file every second, and then poll for that in my main app, but that felt too much like a hack (not that anything else being discussed here doesn't also feel like a hack).


I noticed that problem when I used kbenson's technique on Kaboom. I can live with that on Kaboom. But I really don't like it on Sudoku. Depending on what button you press, and where the cursor is, it can really mess up your board without you noticing. I have an idea for a workaround, but I haven't gotten it to work quite right yet. I'll post it once I have gotten it to work.
YungBlood

Bringing more fun to Roku!
0 Kudos
renojim
Community Streaming Expert

Re: Thanks Team GandK!!!

"TheEndless" wrote:
How do you detect a return from screensaver? Are you writing something to tmp or the registry?

I'm using tmp.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.