A couple of suggestions, speaking as a front-end designer / occasional indie-game artist: - I don't know how you're calculating it, but consider adding a bit of randomness to the effect radius. This way, you won't be blasting perfect circles each time. - If keeping the graphics CSS-only isn't a priority, consider some sprites! If you need a sooty blast scar or maybe a simple explosion sprite, I'd be glad to lend a hand.
Some randomness would effectively be great to add! As for the sprites, I really wanted to focus on font and simplicity. It is much more about the chaos of many destructions, than about a single explosion.
I might add different velocity depending on the mousedown event duration. The longer you press, the bigger the explosion get. Tks for your comments!
Comments (85) 23 threads
Show all comments
Showing thread 2 of 23
Source is here: https://github.com/plehoux/fontBomb/tree/master/src/coffee
Continue this thread — 1 reply
The bottleneck here is not javascript, it is the browser rendering system when applying all those css 2d transform.
A couple of suggestions, speaking as a front-end designer / occasional indie-game artist:
- I don't know how you're calculating it, but consider adding a bit of randomness to the effect radius. This way, you won't be blasting perfect circles each time.
- If keeping the graphics CSS-only isn't a priority, consider some sprites! If you need a sooty blast scar or maybe a simple explosion sprite, I'd be glad to lend a hand.
I might add different velocity depending on the mousedown event duration. The longer you press, the bigger the explosion get.
Tks for your comments!
When I looked at your JS, I thought to myself "that is a reasonable amount of code for that kind of functionality...even a little less than I would've thought"...considering there's no dependencies to browser-taming libraries: https://github.com/plehoux/fontBomb/blob/master/js/particle....
And then I saw the CS: https://github.com/plehoux/fontBomb/blob/master/src/coffee/p...
Nice!