-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
webgl support? #34
Comments
as well, can you comment on differences between stage.js and pixi.js? and its intended purposes and long-term goals? |
I have no plan for webgl, and I'm not sure if there is a good reason to use webgl for 2D games (other than shader effects). I have never used pixi.js, I had just check their website before and now again! It looks similar, however:
Stage.js was created by reusing/refactoring my low level code from previous games, which I had developed to have good performance on mobile phones, so I wasn't able to use any other library. It was initially based on this game, which I guess is transpiled from Flash by Adobe. I rewrote it few times to add new features and create a reusable API, but it still inherits same architecture. |
@shakiba WebGL offers hardware acceleration whereas canvas does not. To give you an emperical example, running your planck.js demos on my iPad Pro show a lower FPS than p2.js demos on the same device. p2.js' demos are using pixi with WebGL. what do you think? |
As far as I know Canvas is also hardware-accelerated on most modern devices (except some old Androids, so I used this plugin instead). Try 006 and O! instead. It depends on, I'm not sure which examples you have tried. There also may be optimization issues in planck.js or its testbed, I have not optimized everything yet. |
You'd know better than me, but I will do some performance testing as I have time over the weeks too |
A quick search brings up others mentioning webgl is also faster than canvas for various reasons: http://stackoverflow.com/questions/21603350/is-there-any-reason-for-using-webgl-instead-of-2d-canvas-for-2d-games-apps and http://stackoverflow.com/questions/12758915/canvas-2d-context-or-webgl-for-2d-game |
As long as 2D Canvas is fast enough for a specific application, it doesn't really matter that WebGL is faster. And when it is not, I think it is better to write low level code instead of using pixi or stage.js. But any way, thanks for bringing up this discussion, I did some quick research and learned some new 2d/webgl optimization tips! |
According to personal practice, WebGL is not supported well in mobile browsers. Thus it will be less fluent than Canvas2d. |
No description provided.
The text was updated successfully, but these errors were encountered: