<DefenderBitmapSet>
<ExtraInfo cellsize="40"/>
<Bitmap name="Background" filespec="pkg:/images/background_hd.png" />
</DefenderBitmapSet>
bitmapset = dfNewBitmapSet(ReadAsciiFile("pkg:/images/spriteMap.xml"))
<Background name="Background" filespec="pkg:/images/background_hd.png" />
<DefenderBitmapSet>
<Bitmap name="gameTiles" filespec="pkg:/data/tilesv.png">
<Region name="0" x="00" y="00" w="1" h="8"/>
...
<Region name="255" x="00" y="2040" w="1" h="8"/>
</Bitmap>
</DefenderBitmapSet>
bitmapset = dfNewBitmapSet(ReadAsciiFile("pkg:/data/bitmapset.xml"))
sprites = CreateObject("roArray", 256, true)
for i%=0 to 255
reg="gameTiles."+i%.tostr()
sprites[i%]=bitmapset.regions[reg]
end for
m.screen.DrawObject(x%, (yy%-8), sprites[value%])
dfNewBitmapSet: Error parsing XML
screen=createobject("roScreen",true,1280,720)
screen.setalphaEnable(true)
layer=1
bitmap=createobject("robitmap","pkg:/images/mm_icon_focus_hd.png")
region=createobject("roRegion",bitmap,0,0,bitmap.getwidth(),bitmap.getheight())
Compositor=createobject("rocompositor")
compositor.setDrawTo(screen,&h000000ff)
sub main()
screen=createobject("roScreen",true,1280,720)
screen.setalphaEnable(true)
layer=1
bitmap=createobject("robitmap","pkg:/images/mm_icon_focus_hd.png")
region=createobject("roRegion",bitmap,0,0,bitmap.getwidth(),bitmap.getheight())
Compositor=createobject("rocompositor")
compositor.setDrawTo(screen,&h000000ff)
mySprite=compositor.newSprite(100,100,region,layer)
while true
mysprite.MoveOffset(1,2)
if mysprite.getx() > 1280 then
mysprite.moveto(0,mysprite.gety())
end if
if mysprite.gety() > 720 then
mysprite.moveto(mysprite.getx(),0)
end if
compositor.drawall()
screen.swapbuffers()
end while
end sub
MySprite.remove()
region=invalid
bitmap=invalid
screen.swapbuffers()
We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.
Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality.
In the meantime, for additional assistance, visit our Support Site.
We're sorry for this disruption — we’re excited to share what’s next!