metafizzy / zdog

Flat, round, designer-friendly pseudo-3D engine for canvas & SVG
https://zzz.dog
10.39k stars 394 forks source link

smoke effects cause model flickering #97

Closed zzj1804 closed 4 years ago

zzj1804 commented 4 years ago

Hi, I love zdog's style and I code a little game with zdog. Test case: https://zzj1804.github.io/ra2-tower-war/game/

I add smoke effects when buildings get damaged, but it cause model flickering. How to fix it? Thank you! https://github.com/zzj1804/ra2-tower-war/blob/master/game/js/model/Smoke.js https://github.com/zzj1804/ra2-tower-war/blob/master/game/js/model/PrismTower.js#L40 https://github.com/zzj1804/ra2-tower-war/blob/master/game/js/model/TeslaCoil.js#L40

gemgames commented 4 years ago

HI! Sorry this has taken so long. The game is really cool, and I think there's just either an abundance of objects on screen (my computer was running the game at a reduced fps) or a ton of Z-fighting. The layering algorithm used in Zdog is not the best, and can cause that.

zzj1804 commented 4 years ago

thanks, I will add a switch.

desandro commented 3 years ago

Just wanted to say thank you sharing your work. This is an incredible use of Zdog. I'm sorry to hear its not up to the task of a proper game 3D engine