Jump to content

  • Log In with Google      Sign In   
  • Create Account


[web] Verlet Water in HTML5


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 SillyCow   Members   -  Reputation: 849

Like
2Likes
Like

Posted 15 June 2011 - 04:06 PM

http://www.youtube.com/watch?v=Vr56GCwBnRg


Live HTML demo: http://silly.isgreat.../molecules.html


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.: https://sourceforge....avascripaabbtr/

My new android game : Enemies of the Crown

My previous android game : Killer Bees


Sponsor:

#2 TheLifelessOne   Members   -  Reputation: 104

Like
3Likes
Like

Posted 16 June 2011 - 04:23 PM

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.

#3 The_Neverending_Loop   Members   -  Reputation: 600

Like
1Likes
Like

Posted 17 June 2011 - 10:53 AM

Cool stuff, Iam excited myself with all these cool new things I see in HTML 5

#4 SillyCow   Members   -  Reputation: 849

Like
0Likes
Like

Posted 18 June 2011 - 02:37 PM

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 Posted Image. 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 new android game : Enemies of the Crown

My previous android game : Killer Bees





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS