4 ms·
It would be awesome if it supported audio, music, mouse coordinates, realtime keyboard input, and variables. And if it already does: then something must be wro
by Aardwolf 14y ago
It would be awesome if it supported audio, music, mouse coordinates, realtime keyboard input, and variables.
And if it already does: then something must be wrong because I would have expected many awesome SVG games on Newgrounds if it worked well.
- scarmig 14y agoSVG really isn't well suited for games. I think it's an awesome and underutilized technology, don't get me wrong, but SVG has a place and it really isn't games. The furthest I've gone is a Go game in SVG, but that's a special case.
- glhaynes 14y agoWhy not? I'm pretty ignorant about SVG (and about writing 3D/vector games in general), so I don't immediately see a reason why SVG wouldn't be well-suited to games. Is it just because browsers aren't as performance-optimized for it as they are for <canvas> and WebGL? I suppose for a "modern" game you'd want to have all sorts of textures and shaders which maybe aren't part of SVG? Edit: Or perhaps it's because the other technologies "carve out" a piece of the page just for themselves whereas SVG doesn't and so browser reflow/layout code has to be invoked more often when SVG elements are being used?
- Wilya 14y agoGenerally speaking, SVG is more integrated to the DOM than canvas or WebGL. Every shape you draw is a DOM node, which means you can easily interact with it (mouseover events, ...), but also that it's rather "heavy". It doesn't scale for effects as well as canvas and WebGL, you can't really display more than a couple thousand nodes without risking major slowdown. It's nice for very interactive demos and lightweight visualizations, not for rendering-heavy things like games.
- pmelendez 14y agoYour point is very valid but only on the realm of web games using browser's native support of svg. For instance, you would not have DOM-related problems if you use svg files in a native mobile game. The downside of using SVG in a game is that the render is slower in comparison with a rasterized image. However, all graphics formats have pros and consts, so it always depends on how are you going to use them.
- pmelendez 14y ago"SVG really isn't well suited for games" I would disagree... as a graphics file format it is very suitable for games, specially given its size. It is not intended to be a multimedia document format (I believe he is comparing SVG with SWF which is not valid since they have different design goals).
- nxn 14y agoDepends on the type of game, the field is very broad. For example, if I had the intention of creating an online card game, I think SVG via d3.js would actually be my very first choice.
- windsurfer 14y agoWhile we're at it, why doesn't SVG support webcams, networking, and email? Any modern rendering system should at least support email. Maybe it does but I haven't seen any serious providers using it. While we're on the subject, SVG should also support a third dimension. With 3D printing becoming a reality, I think this is a crucial feature to have.
- pmelendez 14y agoThis is a bit rude isn't it? I believe your point could be taken in a better way without a condescending comment.
- ArtB 14y agoI suspect it was meant to be sarcastic.
- svachalek 14y agoIt seems to be backsliding. 1.2 had raw socket support: http://www.w3.org/TR/2004/WD-SVG12-20040510/#rawsocket http://www.w3.org/TR/2004/WD-SVG12-20040510/#rawsocket