html5 (canvas) and svg support on main browsers .. anyone know?


skeezix

Internal Development
Joined
Mar 11, 2003
Messages
8,063
Website
www.codejedi.com
hey guys,


I've mostly had my head in firmware or native code, not web apps relative to pandora popular browsers.


As far as I know most folks are currently using..


- Firefox - ram hog, but runs well, even with flash plugin option


- Chromium - faster, google spying, but fast :)


- Arora/Midori -- built into firmware, but cruddy


Lots of other options exist (links/lynx, netfront, etc), but I think those are the main three. Am I missing any popular option? (I might be entirely wrong, even)


For the popular browser (or any browser raelly) .. anyone know how the HTML5 (Canvas, etc) support is? SVG?


If we write a canvas heavy webgame in hopes of running it on pandora (and other devices), will it actually work at all? Or die in a hot fire of lack of browser support on small ARM?


jeff
 
I don't know the Pandora-specifics, but support for HTML5 even on desktop browsers is hit and misss, especially because the HTML5 spec is yet to be finalised. This may also mean that your game breaks in the future due to a change in HTML5 processing standards.
 
Oh I know, its a world of hurt right now (and for a year or two really); I've often said that things have onyl gotten worse over the last few eyars, rather than better .. even more fragmentation, without any solidification :)


ie:


My turn based wargame .. I rewrote the basic client a few times; a pure native version (needs compilation on each platform and may vary per platform for various reasons), a hybrid version (half up on server and half native, using embedded browsers or rendering hints from server) and pure browser (javascript/css/etc with python backing.) There are advantages and disadvantages to all 3 .. theres a question of supported devices _right now_ (go native!) versus future (its a turn based game, performance is less important, go with pure web based javawscript) versus .. js being a really sucky platform to develop in (less throw away 20 years of development tools and do it all in js where even logging is annoying :)


Canvas support -- hit or miss!


SVG support -- hit or miss depending on browser!


Performance -- hit or miss!


WebGL -- not anywhere near useful yet!


The question of 'go native' versus 'go web' and which devices you hav e a chance to work on.. its just a total drag. Go GL or go raster, or go hybdrid, or go ...


Theres no easy 'do it this way for thus sub-question' right now; its all just a bloody mess, drives me nuts :)


--


So its all about future proofing, for me; if you write it in pure js, you're sort of hung on supporting a lot of current devices; if you write it native, you're just a headache down the road when everyone wants it on their pet platform or on browser, and for turn based game.. browser based should work, damnit!


Hybrid (such as embedding webkit in your app) is probably smartest -- you can make it a webapp, but for features that are currtently unstable (such as WebGL) you coudl do it native (GL/GLES) and then slide it to browser based over time, until such time as you just stop shipping your native binary and the full browser just works. --> but this of course takes the most time.


--


Right now, I'm thnking about using pyjamas (akin to GWT for java, but blessedly without java) .. so I can code quickly in python, as either a desktop or browser app, with a GWT (read: sensible) layout and UI toolkit (buttons, dialogs, grids), and it even has Canvas and SVG support.


So my question is..


How useful is Canvas support (since SVG seems dead end to a lot of browsers, annoyingly) to..


- Pandora browsers (Chromium, FF, Midori/Arora)


- iphone Safari


- Chrome or whatever Android uses


- Desktop FF/Safari/Chome <- not too worried here, the mobiles are the limiting factors


Can I write a Canvas based game and get away with it?


Consider this sample... does it run on Pandora? I need to check..


http://pyjs.org/examples/asteroids/output/Space.html


-- asteroids game in pyjamas using Canvas


jeff
 
For sake of argument, Wesnoth is a good example of a turn based game.


My game is a space wargame, but I expec tto show graphics and lots of details, charts, text, etc.


Was going to do heavy GL stuff in the client, but with the twins coming.. all fancy 3d is out, I think, need to cut back my requirements significantly; can always do 3d client extensions later .. for now, I think the game is going to look like a spreadsheet with pictures :)


jeff
 
Did some quick tests through my purple haze ..


Chromium Dev versus pyjamas examples..


1) The asteroids game example above actually works pretty well, though the canvas is the wrong size so you can only see a small piece of the action


2) Other canvas tests .. actually work pretty well (transparency, rotation, compositing, etc) .. aside from canvas size


3) pyjamas/gwt tabs, buttons, dialogs, formatting/layout ... all good


4) gwchart .. charting with pie charts, scattergraphs, etc, all working nicely. wow.


Memory exhaustion is an easy problem to run into.


Still, using Chromium Dev is pretty positive for some pretty interesting canvas effects.
 
Last edited by a moderator:
That's sweet! Thanks for sharing.


Unfortunately I don't have anything useful to add to the discussion, but I will say that my experience using a browser on the Pandora has been the most frustrating I've ever experienced. Chromium doesn't seem to like https, Firefox will gobble memory until it crashes, Arora does the same with the added bonus of a huge unresponsive start up time, Midori just plain doesn't show things right and Lightweight2 gets into these weird infinite redirects on some websites. I think of web browsing on the Pandora like I think of dating: a good idea on the surface, rewarding(at first), but eventually you'll end up tired and frustrated with little to show for it. At least I don't have awkward meetings with web browsers afterwards.


I feel like this is an area that will improve, but at this point I'm going to put my vote against developing for the browser if your target is the Pandora.
 
yeah, I'm leaning towards going back to a native app again, despite knowing it cuts off 90% of my possible user base in the future; maybe develop native, get the game working and ugly, but at least playable, and see how it goes.. refine the game design, get ideas and experiencfe about how people like the UI, and then ultimately build a fancier web based UI when things are ready for it, and I get free time again (if ever ;)


jeff
 
Back
Top