Search the Community
Showing results for tags 'Javascript Canvas'.
-
Hello, currently I am working on a 2D side scrolling game. When I start it on my computer everything runs fine and smooth. IE is about 300 FPS. Firefox is about 100-110 FPS. So its a side scrolling game and there are some clouds in the sky, flooting from right to left. I am rendering the game inside of a canvas element. But there is a problem in generell. When I am just using a square like context.fillRect(800,200) an move it to the left it gets very jerky on low FPS. Sometimes it jumps. Sometimes its smooth. I cant explain why this happens. Im working since three full days on this problem and try to fix it. Here is what i have done so far. 1. I tried a gameLoop that locks the FPS at 30. - Animations gets Jerky when they speed up. 2. I tried to set a maximum for delta time - I move the shapes based on the time since the last update call. I tryed to set a maximum for the gap between: no effect still jerky. 3. I tried animation based of the FPS - That is not what I want because the game behaves diferent on devices with better hardware. Nevermind: animations still choppy! 4. I read everthing I found googeling the keywords: "Choppy game, gameLoops in generel, Html5 Animation Jerky, etc.. " 5. I downloaded every game I could find in the app store where I think they are made with HTML5 and Canvas. Some are very Jerky and Choppy! But I found some running smooth. 6. I tryed pixijs to render my stuff : still choppy 7. I thought about buying impactjs: In the forum are some topics about stuttering 100Bugs maybe a bad buy if the problem is still there. 8. I thought about giving up an play WoW again. 9. I created an html5gamedevs account and hope someone can help me. There must be a way to get this going. Even the SNES gets smooth animations. Thanks!
- 9 replies
-
- HTML5
- Javascript Canvas
-
(and 3 more)
Tagged with: