The Daily Click ::. Projects ::. Tic Tac Toe (html5)
 

Project: Tic Tac Toe (html5)
Project Started: 20th July, 2011 Last Update: 23rd July, 2012
Project Owner: Jenswa Project Members:
Project Type: board game Project Progress:
More Info: http://dl.dropboxusercontent.com/u/82972447/gv-summary-html/files/canvas/tic-tac-toe/index.html Faves: 0

Passive drawing
Posted 23rd Jul 12, by Jenswa  
Switched from active rendering to passive drawing.

This should make the game better playable at low specs machines and mobile phones, because those are slow at canvas drawing operations.

Posted by Sketchy 23rd July, 2012

Nice - I'm always interested in HTML5 stuff
I don't know what the difference is between "active rendering" and "passive drawing", but I get the impression something like this would be easier to do with plain old-fashioned html - just display the board in a <table> element instead of using a <canvas>.
This is probably just an experiment though, so fair enough
 
Posted by Jenswa 30th July, 2012

Hehe you're right Sketchy.

I used the term 'passive' as opposite from 'active'. Active rendering is rendering your frame each cycle to maintain a constant fps like 30 or 60. Passive rendering is that I only render a frame when it's needed. In this case on a click/touch because that's when sometimes changes in the screen. It should save some power and give some extra performance.

But you're right about plain old html, I could even use svg elements for the objects.

It's just that I am used to writing a game, trying to render each frame while maintaining 60 fps. But that isn't necessarily needed or the best way to program something.
 


 



Project Forums


Favourite

Advertisement

Worth A Click