Code center > Darwinbots3

About Darwinbots3

<< < (3/10) > >>

Peter:
Thanks!

I'll play around with SVG. Want to see if I can create a streaming SVG animation, it's already theoretically possible says the guy writing the W3C SVG streaming spec.

I plan to implement it like a Blacklight module, and render in a browser through webforms, unless you have a better idea.

Numsgil:
I thought about something similar a while back but I had enough trouble getting SVG to render properly in different browsers when I was using it to display graphically some failing unit tests relating to polygons that I didn't pursue it.  Obviously it would be quite neat :)

I would say either animated SVG or HTML5 or both maybe?  My knowledge of client side web technology is basically nill, but I'm sure it's both possible and a reasonable thing to do :).  There's some things to think through around how much of the view the DB3 server keeps track of, how much info the server sends at once (several frames?  Just the most recent?) and RPC data formats (a snapshot of the current simulation?  Or just requested data?) and the like.  My current plan is to have the DB3 server (ie: just the simulation) and the DB3 client (ie: the rendering, UI, etc.) architecturally separate.  Makes things like running a server on a linux machine and keeping a steady display rate and responsiveness even if the sim chugs much easier.  But there's a lot of details outstanding I haven't thought through.

Anyway, yeah, play with it and keep an eye towards issues around API.  I feel like the current Blacklight API is a bit overwrought, but I haven't played with it enough from a user standpoint to know what to fix.

Numsgil:
Oh, I'll say if you want to take a look at the SVG stuff I've played with already you're welcome to.  It's in Annulus: http://svn.darwinbots.com/Darwinbots3/Trunk/Modules/Annulus/Annulus.UnitTests/CSG/StraightSkeletonBuilderTests.cs  Search for SVG.  It uses some javascript to handle using the mouse to translate and zoom in/out.

Peter:
I've seen it, you've linked it earlier. Makes it clear DB is quite suitable for using SVG.

With SVG I need to play around a bit to see what's possible. I like to send only what's changed to the client. i.e. if a shape keeps the same proportions but only turns, only send that angle.
First start with a frame, then a animated svg, streamed animated SVG(with all date each frame), then optimize stuff(frames/sending less info) and think what the server could do.

Quite new to SVG, but it shows promise. I'll assume when DB3 is released all browsers follow the SVG spec.

Didn't even think about html5 video, is more mature, may work more easily. I think more bandwidth is needed and more cpu time to  generate it.

Numsgil:
I think the HTML5 canvas lets you specify elements using SVG.  But we're well outside my wheelhouse so if you don't think it's a good fit feel free to ignore me :)

Blacklight scenes are approximately set up hierarchically like an XML document, so the first step might be to codify that and actually have a XML "visualizer" for Blacklight, and then construct the SVG elements from that.  Then do the SVG "translation", which should be pretty one-to-one since SVG is already XML.  Or if SVG is a reasonable enough format for the XML even if the final visualizer isn't SVG just stick with it natively.

For only updating what's dirty, maybe you could push some sort of XML diff patch?  I'm not sure if that's a thing or not, but that's how I'd approach it.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version