Loading ...
Sorry, an error occurred while loading the content.

IE9, SMIL vs. script (Was Re: Issues with iOS and Android)

Expand Messages
  • Brennan
    Hi there, I had a chance to test my svg on IE9 today and was delighted to discover that it worked just fine - no, it ran smoother than on anything else I have
    Message 1 of 6 , Mar 29, 2012
    • 0 Attachment
      Hi there,

      I had a chance to test my svg on IE9 today and was delighted to discover that it worked just fine - no, it ran smoother than on anything else I have tried thus far. I got more than 500 rectangles zipping about with no hangs or pauses. Better performance even than Chrome, which is otherwise very smooth.

      --- In svg-developers@yahoogroups.com, "David Dailey" <ddailey@...> wrote:
      > 3. Your page works fine in Windows for Opera, Firefox, Safari and
      > Chrome, but not for IE9. I suspect getting it to work in IE9 would be
      > prerequisite for a Windows phone. It is usually not very difficult to get
      > code working in IE9, and what you're doing is pretty straightforward, so I
      > think it should be within reach.
      >
      > 4. It looks like you have many more lines of code than would be
      > required for what you're doing: cloning and then putting in motion with
      > script.

      That's almost certainly true. I am just getting my hands dirty at the moment, although I have plans to make this demo into a little duck-shoot game, just as a proof of concept, which may explain some of the design decisions. I also have a <use> in there, which isn't strictly necessary.

      And I used jslint with "assume a browser", which enforces some rather odd coding conventions.

      I will be asking more questions soon about best practice ecmascript in svg. :)

      > 5. If you ran the animations with SMIL and the object creation through
      > script, you could probably reduce the code by a substantial fraction. If
      > you're not targeting Windows, anyhow, then SMIL oughta be there - at least
      > the primitive stuff is supported by Safari and Chrome. There are also, I
      > gather, some hundreds of millions of devices out there that run SMIL but not
      > script, so if the cloning were not so important as the animation (and the
      > DOM overloading isn't too big an issue) then you might actually get better
      > performance out of SMIL on some devices, particularly if they were running
      > Opera mobile.

      I used to be really into SMIL back in version 1.0 days, and even made a SMIL interpreter / renderer in ActionScript 2.0 at one point. I added my own custom extensions to handle transitions, but otherwise it was pretty clean SMIL. I haven't really looked at SMIL since, but I am glad it still has a bit of a fan club, even if it is still more occult than it ought to be.

      But in SMIL, everything is 'on rails' right? Or would it be possible to make a game like (say) asteroids using SMIL? (Instead of ecmascript, I mean). I thought the whole point of SMIL was that everything is synchronised, whereas games tend to rely on 'autonomous' life cycles.

      For example, in my demo, each 'clone' has its own horizontal speed, randomly decided. I wouldn't know how to do that with SMIL.

      > Some of these points can be argued half a dozen ways apiece, and they are
      > presented more as possibilities to consider than as beliefs or truths.

      I especially appreciate this point. :)
    Your message has been successfully submitted and would be delivered to recipients shortly.