Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by SlotGamer

I need to optimize the rendering speed, my game is super slow on my iPad1 and I was thinking about webGL or something similar. (I'm not sure iPad1 even supports webGL on IOS5) Is there a good reason why NOT to use webGL or other libraries with ImpactJS? Does using webGL make it so it won't be compatible on as many devices?

Maybe there are other rendering acceleration libraries that I should look into that are compatible with most devices?

Thanks!

1 decade ago by Joncom

Does using webGL make it so it won't be compatible on as many devices?
Yes. I'm using the latest Chrome, but my graphics card is not fantastic. I cannot play any WebGL games at all. However, I can play pretty well any vanilla ImpactJS game just fine.

Edit:

Do you intend to still create 2D games? Because isn't the whole point of WebGL to do 3D stuff? Otherwise you would think somebody would make a WebGL version of the ImpactJS framework...

1 decade ago by quidmonkey

You might get some ideas of improving if you read through this thread and check out my canvas.html & impact-fast.html tests.

1 decade ago by SlotGamer

Thanks for the ideas. That is a lot of particles.

According to some of my research, WebGL is not supported by all platforms so I will continue using canvas to hit the most users.

I've seen a drastic improvement after I implemented a "dirty image" check. Basically incrementing a "dirty" variable on an image when I know it needs to redraw and check this variable before rendering the image. There is some trickyness to make sure you get things to draw at the right time, but in my case I know the certain sections that have moving images and buttons. It is actually playable on ipad1 now. :)

Although with particles, the dirty image implementation isn't really going to be that easy since it covers all over the screen. I pretty much do what quidmonkey does in his code (just create my own variables and loop through and draw images myself without extending from any entities etc.) but my speed is nowhere near that good. Almost all of the bottleneck is in drawImage calls.
Page 1 of 1
« first « previous next › last »