Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Level 7

request for help. should this code work?

Can anyone tell me if this is valid code?

I'm using the following code in a channel I'm developing. Works perfectly well on 2 of my roku boxes, but when I went to run the same code on another, it didn't work.

The 2 that work are 2500X on 4.9 build 5061 and the one that doesn't work is 3100X on build 5060, (but says it's up to date).



ShipBx[ShNX] = createobject("roBitmap", {width:100, height:100, AlphaEnable: true})
ShipDr[ShNX] = createObject("roRegion", ShipBx[ShNX], 0, 0, 100, 100)
ShipDr[ShNX].DrawRotatedObject(0,0,RotDegree, m.bitmapset.regions["ship."+ str(SDegree)])



This code is part of a nested loop, where it creates 6 regions in each of the 4 quadrants in the middle loop, then the outer loop changes the angle (RotDegree) to either 270, 180, 90, or 0 for the next 6. Right now, only the quadrant that isn't rotated works (12:30-3:00), the rest do not throw any type of error, debug shows the code being called, but the rotated images do not appear on screen on the 3100X. This makes it seem logical that the problem is in the rotation and not something else.

The goal is to have 24 ship images so the player experience is that the ship is rotating. Ideally this should be done with only using one image, but in this case 6 images for each quadrant if that's the best we can do. I can manually create all 24 images if there is no good way to do it in brightscript that will work on every roku (well I know it doesn't work on the oldest models, but that makes sense), it's just a bit odd (to me) that this works fine on 2, but not a third.

The only idea I can come up with is that SetPretranslation has something to do with it, but when I added that, it did not make a difference. I'm also using scaled object in a similar fashion and that works fine on all the rokus.

Can anyone tell me what am I doing wrong here?


Thanks.

-B
♦MiniGolf♦HangMan♦Brain Puck♦Retro Tennis♦BORK♦FLIP♦Pathogen♦Pathogen 2♦Shut the Box♦Birdie♦Logic♦Dots♦Pool♦küglo♦Bubble Wrap♦Trivia Channel♦Mancala♦Air Hockey♦Weather♦CAMERA♦Your Photos Screensaver♦Desert Beauty Screensaver♦Wild Lakes Screensaver♦
0 Kudos
3 Replies
Highlighted
Level 7

Re: request for help. should this code work?

anyone? bueller? Smiley Happy


I'll take any help, if you have any crazy ideas, throw them out there. If the function is deprecated in the newer roku, or I missed something, or maybe the newer roku is just borked and this should work ok. Appreciate any suggestions.


thanks.

-B
♦MiniGolf♦HangMan♦Brain Puck♦Retro Tennis♦BORK♦FLIP♦Pathogen♦Pathogen 2♦Shut the Box♦Birdie♦Logic♦Dots♦Pool♦küglo♦Bubble Wrap♦Trivia Channel♦Mancala♦Air Hockey♦Weather♦CAMERA♦Your Photos Screensaver♦Desert Beauty Screensaver♦Wild Lakes Screensaver♦
0 Kudos
Highlighted
Roku Employee
Roku Employee

Re: request for help. should this code work?

My best guess without testing this out is there may be a bug in the firmware, as there are two different hardware platforms you are testing on. If you can private message me a dropbox type link to a zipped example that I can attach to a bug report, it would save me some time in trying to recreate your issue from scratch to attach to the bug report.

- Joel
0 Kudos
Highlighted
Level 7

Re: request for help. should this code work?

Thanks Joel, didn't intend for anyone to have extra work, I just assume I farkd my code somewhere.

I'll get the sample to you.
♦MiniGolf♦HangMan♦Brain Puck♦Retro Tennis♦BORK♦FLIP♦Pathogen♦Pathogen 2♦Shut the Box♦Birdie♦Logic♦Dots♦Pool♦küglo♦Bubble Wrap♦Trivia Channel♦Mancala♦Air Hockey♦Weather♦CAMERA♦Your Photos Screensaver♦Desert Beauty Screensaver♦Wild Lakes Screensaver♦
0 Kudos