Render and Animation strategy?

new BookmarkLockedFalling
rod
New Member
*

rod Avatar

Posts: 40

Post by rod on Sept 16, 2007 9:15:55 GMT -5

Now I have my hands dirty a question, what is the intended strategy to allow or accommodate animation on web pages?

I realise I will have to think differently and I am not talking about "Doom" style video.

In this code I tried to render more than once but only ever saw the last render and I tried a time$("seconds") type delay in a wend loop but it never triggers. Only the link triggers a render.

Is animation a no no? I wouldn't be downhearted I just want a steer on where to spend my time.

DIM Cell(50,50)
GRAPHIC #1, 300,300
LINK #draw, "DrawIt", [Draw]
GOSUB [DrawGrid]
RENDER #1
WAIT

[Draw]
CLS
LINK #draw, "DrawIt", [Draw]
GOSUB [DrawGrid]
GOSUB [RandomSeed]
RENDER #1
wait

[RandomSeed]
#1 SIZE(5)
#1 COLOR("green")
for y = 1 to 50
for x = 1 to 50
if rnd(0)>.95 then
Cell(x,y)=1
#1 SET((x*6)+1, (y*6)+1)
end if
next x
next y
return

[DrawGrid]
#1 SIZE(1)
for x=150 to 0 step -1
#1 COLOR(255,min(255,x*2),255)
#1 PLACE(x,x)
#1 BOX(300-x,300-x)
next x
#1 COLOR("white")
for y = 0 to 49
for x = 0 to 49
#1 PLACE(x*6,y*6)
#1 BOX(x*6+6,y*6+6)
next x
next y
return




StefanPendl
Global Moderator
*****

StefanPendl Avatar

Run for BASIC ...
Posts: 945

[b]Stefan[/b] - [a href=http://stefanpendl.runbasichosting.com/]Homepage[/a][br][br][b]Please give credit if you use code I post, no need to ask for permission.[/b][br][br]Run BASIC 1.01, Fire-/Waterfox (IE11, Edge), Windows 10 Professional x64, Intel Core i7-4710MQ 2.5GHz, 16GB RAM
Janet
Global Moderator
*****

Janet Avatar

Posts: 276

Post by Janet on Dec 16, 2007 10:21:55 GMT -5

stefanp said:
Animation is possible with GIFs, Carl mentioned to include a REDIRECT command, which will allow for timed display.
Currently display is only updated before user interaction.

Animated gifs display as static images, and without transparent backgrounds, when a graphic area is rendered. Will animated gifs be possible in native graphics, or only with html / css styling? I've only tested using Loadimage. I'm off to check Run BASIC wiki to see if any demos have been posted for animated gifs.
[br]
Mike
Guest

Guest Avatar

StefanPendl
Global Moderator
*****

StefanPendl Avatar

Run for BASIC ...
Posts: 945

[b]Stefan[/b] - [a href=http://stefanpendl.runbasichosting.com/]Homepage[/a][br][br][b]Please give credit if you use code I post, no need to ask for permission.[/b][br][br]Run BASIC 1.01, Fire-/Waterfox (IE11, Edge), Windows 10 Professional x64, Intel Core i7-4710MQ 2.5GHz, 16GB RAM
David den Haring
Full Member
***

David den Haring Avatar

Posts: 106

Post by David den Haring on Dec 17, 2007 12:42:00 GMT -5

RB is a server-side technology. For client-side (i.e. browser) animation, you might try embedding and utilizing a javascript/AJAX framework like Rico (www.openrico.org). This particular library is well-suited for doing animation.

You can use the AJAX features of Rico to get/set data on the server-side (i.e. RB). Using Rico is not trivial, but it does open the door to browser-based animation without resorting to other technologies like Flash.

BTW, I haven't tried embedding this framework in an RB app yet, but I looked into Rico for another project.
Last Edit: Dec 17, 2007 12:43:52 GMT -5 by David den Haring
David den Haring[br]Proprietor, Run BASIC Hosting Service[br][url]http://runbasichosting.com[/url]