3 ms·
> 99% of all game engines are reasonably fast Not true in web development land. Especially for canvas-based engines, implementation matters a lot. At work we r
by ricardobeat 15y ago
> 99% of all game engines are reasonably fast
Not true in web development land. Especially for canvas-based engines, implementation matters a lot. At work we recently had to switch some player drawing back to DOM elements + CSS transforms, after hitting some hugely inefficient code paths in the canvas framework we chose.
- pestaa 15y agoInteresting. Can you please name the framework you left behind? Also, why did it seem to be more time-efficient to ditch canvas altogether and rewire the rendering part?
- jay_kyburz 15y agoI'd also like to know more, I have just been rolling my own stuff so far and have been surprised by how well the canvas is handling everything I throw at it. Tablets / Phones is a little different, but the desktop much faster than I expected.
- ricardobeat 15y agoThat was OCanvas (ocanvas.org). It's perfectly fine for vector stuff, but our game is very bitmap heavy. We started getting FPS rates as low as 10 with only 5-10 characters on screen (using animated/scaled Sprite objects). Using DOM + transforms we can get up to 500 chars on screen without any lag whatsoever. We didn't ditch canvas altogether though, we render all the scenes in a background canvas and use DOM only for the moving chars. I suspect it's possible to get much better performance by pre-rendering all scaled objects, but haven't had the time to try it. CAAT performs incredibly well with bitmaps on canvas: http://labs.hyperandroid.com/static/caat/ http://labs.hyperandroid.com/static/caat/
- reitzensteinm 15y agoI don't even think it's true anywhere. There's a laundry list of tricks you have to pull to get decent performance out of Unity, and it's a good engine. A more truthful restatement might be something like, 80% of game engines can be reasonably fast, if you learn their quirks and optimize your game accordingly.