
squirreltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2015
09:32 AM
thanks
In honor of the date and to say thanks for all the help I've gotten here, I'm open-sourcing this tiny channel which will create a lovely Disney-like forest with lots of happy bunnys hopping around.
'Happy April!
Sub Main()
m.screen=CreateObject("roScreen", true,1280, 720)
m.port=CreateObject("roMessagePort")
m.screen.SetPort(m.port)
m.screen.SetAlphaEnable(true)
m.cursarray = RollCursor(640, 360, 200, &hFF0000FF)
while true
m.screen.Clear(&hebebebFF)
ShowCursor(m.screen)
m.screen.swapbuffers()
msg = m.port.getmessage()
if type(msg) = "roUniversalControlEvent"
button = msg.getint()
if button=0
exit while
end if
end if
end while
End Sub
Function DrawBitty(size as integer, color as object)
bitty = createObject("robitmap", {width:size, height:size, AlphaEnable:true})
brush = size/50
x = size/2 : y= size/2 : cx = size/2 : cy = size/2 : time = 0 : rad = 2
for q = 0 to 45
for i = 0 to 360
x = cx + sin(time)*rad
y = cy + cos(time)*rad
time = time - .02
bitty.drawrect( x, y, brush,brush, color )
end for
rad = rad+1
end for
return bitty
End Function
Function RotateCursor( cursarray as object, i as integer)
cursarray[i].x = cursarray[i].cx + sin(cursarray[i].time)*cursarray[i].rad
cursarray[i].y = cursarray[i].cy + cos(cursarray[i].time)*cursarray[i].rad
cursarray[i].time = cursarray[i].time - cursarray[i].interval
End Function
Sub ShowCursor(screen as object)
for i = 0 to m.cursarray.count()-1
RotateCursor( m.cursarray, i)
end for
for i = 0 to m.cursarray.count()-1
screen.drawscaledobject( m.cursarray[i].x, m.cursarray[i].y, m.cursarray[i].scale, m.cursarray[i].scale, m.cursarray[i].bm, m.cursarray[i].color)
end for
End sub
Function RollCursor(locx as integer, locy as integer, diameter as integer, color as object)
bitty = Drawbitty(diameter, color)
add = 0
m.cursarray = []
for i = 0 to 15
cursobject = {}
cursobject.bm= bitty
cursobject.x = locx
cursobject.ox = locx
cursobject.cx = locx
cursobject.y = locy
cursobject.oy = locy
cursobject.cy = locy
cursobject.rad = diameter/2
cursobject.time = 2.0+add
cursobject.interval = 0.08
cursobject.color= color-(i*16)
cursobject.scale= diameter/900
m.cursarray.Push(cursobject)
add = add+.39
end for
return m.cursarray
End Function
Kinetics Screensavers
3 REPLIES 3

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2015
09:49 AM
Re: thanks
I see what you did there.. 😉
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)

Komag
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2015
11:12 AM
Re: thanks
Is that the loading or cueing wait thing?
Har har 😛
Har har 😛
MatroxRT
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2015
01:07 PM
Re: thanks
Pretty much made my day.