[web] Verlet Water in HTML5

Started by
2 comments, last by SillyCow 12 years, 10 months ago
[media]
[/media]
[font="arial, sans-serif"] [/font]
[font="arial, sans-serif"] [/font]
[font="arial, sans-serif"]Live HTML demo: http://silly.isgreat.../molecules.html[/font]


Wanted to experiment a little bit with high-performance HTML.
Made a little water simulation which I thought of turning into a game.
In the end I couldn't get enough particles to run in real-time, so I will probably write my game in Java/C

On the upside I did manage to write a nice and simple javascript AABB tree implementation which I posted on source-forge.: [font="arial, sans-serif"]https://sourceforge....avascripaabbtr/[/font]
[font="arial, sans-serif"] [/font]

My Oculus Rift Game: RaiderV

My Android VR games: Time-Rider& Dozer Driver

My browser game: Vitrage - A game of stained glass

My android games : Enemies of the Crown & Killer Bees

Advertisement
You might have better performance if you used requestAnimationFrame.

Also, you might want to look into using an canvas animation library. They are usually much more optimized than what is normally hand-written (not saying your code is bad), and they provide a lot of objects that will allow you to do the same thing in less time, and usually more efficiently.

Only libraries I know off the top of my head are Processing.js and Three.js, though I'm sure a great many more exist.
Cool stuff, Iam excited myself with all these cool new things I see in HTML 5

You might have better performance if you used requestAnimationFrame.

Also, you might want to look into using an canvas animation library. They are usually much more optimized than what is normally hand-written (not saying your code is bad), and they provide a lot of objects that will allow you to do the same thing in less time, and usually more efficiently.

Only libraries I know off the top of my head are Processing.js and Three.js, though I'm sure a great many more exist.


Thanks for the link smile.gif. Actually I profiled most of my execution time to be collision detection between the particles. So I never tried to optimize the graphics code. This link might be useful for another project I am working on, though .

My Oculus Rift Game: RaiderV

My Android VR games: Time-Rider& Dozer Driver

My browser game: Vitrage - A game of stained glass

My android games : Enemies of the Crown & Killer Bees

This topic is closed to new replies.

Advertisement