hoylemd / deathdeath

death death and more death. death? death!
0 stars 0 forks source link

Tile animation #11

Closed hoylemd closed 12 years ago

hoylemd commented 12 years ago

Implement tile animation

hoylemd commented 12 years ago

John: I'm looking over your code and I have a few questions about how it works.

1) the setTimeout function: is that a built-in js function? if not, where did you define it? 2) If setTimeout does what i think it does (waits x siliseconds then executes the provided function), won't animateWater recurse indefinitely? I've had the page running for awhile and I'm not seeing any problems, but I just wanted to double check.

rocky1138 commented 12 years ago

setTimeout is a function that comes built-in with browsers. You're correct that it waits x ms then fires the function. animateWater will occur/recurse indefinitely.

I wrote it quickly just to give me an idea of what the thing would look like with some graphics. Call it immediate feedback.

I'd like to replace animateWater with something like animateTilemaps and include every one of the 1024 spans. Some might be lava, some might be fire, some might be water, etc.