Live data from Hacker News

Great Tower Defense Game on Canvas

pivotfinland.com

1–10 of 23 posts

Re: Great Tower Defense Game on Canvas

#3
Wow! I'm surprised by the framerate, I'm getting ~50 in Chrome.

I really didn't think these sorts of speeds were possible using Canvas, especially when you're completely redrawing the screen each time.

For what it's worth, I unminified the source (from frozendefense.compressed.js) and posted it as a github gist. It makes it easier to peruse.

https://gist.github.com/665991

Re: Great Tower Defense Game on Canvas

#4
post #3

Wow! I'm surprised by the framerate, I'm getting ~50 in Chrome. I really didn't think these sorts of speeds were possible using Canvas, especially when you're completely redrawing the screen each time. For what it's worth, I unminified the source (from frozendefense.compressed.js) and posted it as a github gist. It makes it easier to peruse. https://gist.github.com/665991

In Firefox it always reported >40 fps, however I could see that it was dropping massive amounts of frames, to the point where creeps would be coming in the entrance and then be halfway across the screen.

Re: Great Tower Defense Game on Canvas

#5
post #3

Wow! I'm surprised by the framerate, I'm getting ~50 in Chrome. I really didn't think these sorts of speeds were possible using Canvas, especially when you're completely redrawing the screen each time. For what it's worth, I unminified the source (from frozendefense.compressed.js) and posted it as a github gist. It makes it easier to peruse. https://gist.github.com/665991

Pretty awesome for 1780 lines of code. Especially when 250 of them are just the maps.

Re: Great Tower Defense Game on Canvas

#6
Hmm, the graphics part works smoothly for me, but it seems to be dropping input events. Attempting to upgrade a turret when there's a lot of action happening on screen requires clicking a bunch of times before it finally registers. (Chrome 9.0.572.0)

Re: Great Tower Defense Game on Canvas

#8

Hmm, the graphics part works smoothly for me, but it seems to be dropping input events. Attempting to upgrade a turret when there's a lot of action happening on screen requires clicking a bunch of times before it finally registers. (Chrome 9.0.572.0)

Ditto for Firefox 3.6.12.

Re: Great Tower Defense Game on Canvas

#10
Very nice game, but a little basic. Some enemies seem to behave differently (vulnerable to different weapons), although there is no indication with color or shape. A minor bug: Once you click on a unit to build, you can't change your mind and "unselect" it anymore, forcing you to build that even though clicking it could have been a mistake.

Also it's a bit annoying that if you want to build the same unit type multiple times, you have to click on it every time again. Keyboard shortcuts 1-4 to select each unit to build would be great. Another shortcut for upgrading and selling, and the game would be a lot more usable and fun to play.

Still, quite addicting game! :-)

Post reply on HN