- Viewing Profile: Posts: hdnine
Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics
Community Stats
- Group Members
- Active Posts 13
- Profile Views 570
- Member Title Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
134
Neutral
User Tools
Contacts
hdnine hasn't added any contacts yet.
Posts I've Made
In Topic: [JS] Confused how to retrieve variable value from within a function
09 November 2012 - 04:29 AM
Right... will give it a try. Thanks!
In Topic: 2D tile level drawing performance, which of two approaches is best?
31 October 2012 - 03:14 AM
How is your rendering loop set up? Are you using setTimeout? setInterval? requestAnimationFrame? It should be possible to draw a reasonable number of things to <canvas> without poor performance.
What i use is requestAnimFrame:
[source lang="jscript"]function render() { // Basically renders graphics, checks for collision and moves the player}window.requestAnimFrame = (function(){ return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function( callback ){ window.setTimeout(callback, 1000 / 60); };})();(function animloop(){ requestAnimFrame(animloop); render();})()[/source]
It might be that the lagging and jerking comes from the browser? I've noticed that Chrome seems to work best for Canvas while i personally like to develop in Firefox. Thanks also to Bad Unicorn for the input!
In Topic: 2D tile level drawing performance, which of two approaches is best?
29 October 2012 - 03:03 PM
Right now i can't say if my chosen approach will affect performance or not but it was one of those things that i realized just might do. But as you say, maybe i'm better off focusing on other things until it actually becomes a problem.
One issue i have with detecting performance bottlenecks is that the canvas atm isn't optimized to such a point that it would run smoothly in all browsers. At times it lags, jerks and does other wierd stuff with only minimal animations on stage, so it's hard to tell if these are browser issues or if i have some poorly written code. Anyway, thanks!
One issue i have with detecting performance bottlenecks is that the canvas atm isn't optimized to such a point that it would run smoothly in all browsers. At times it lags, jerks and does other wierd stuff with only minimal animations on stage, so it's hard to tell if these are browser issues or if i have some poorly written code. Anyway, thanks!
In Topic: Javascript collision detection in tile based game (demo page available)
24 October 2012 - 06:23 AM
Thanks! ^^
In Topic: Javascript collision detection in tile based game (demo page available)
22 October 2012 - 11:03 AM
Right, thanks... right now i'm not that worried about optimization, more that the collsion itself was faulty. But thanks anyway i will certainly take a look at it. ^^
- Home
- » Viewing Profile: Posts: hdnine

Find content