1 decade ago by Aristy
Hi,
I have some questions.
1. How can I create an interface layer so I can make this look better?
http://i.imgur.com/oXgeD3f.jpg Basically, I would like to put them inside a transparent box (like HTML divs) so they will look much better.
2. How can I draw an image in the interface layer? For example, I want to replace "Gold:" text with a small gold image.
3. Which should I be writing this code (good practice use), main.js or player.js or somewhere else like custom attack handler?
if ( player.canAttack() ) {
If (player.isStunned || player.isParalyzed || player.isSilenced) return false;
player.attemptAttack();
}
4. I need some kind of "cooldown" mechanism everywhere. While using potions, while sending projectiles, while monsters damage me etc.
Right now I have a cooldown mechanism like this one but it looks pretty crappy.
http://paste.laravel.com/1fWV
How can I enhance this further? Is there anything like cooldown handler built in ImpactJS, so I can't hold my "attack" key and release hundreds of projectiles?
5. Can someone explain ImpactJS licensing like explaining it to a kid? If I understood correctly:
"I can sell my product to other people, but they need to purchase a license themself."
What about putting the game into Appstores (e.g Android)? Am I allowed to do so after baking/minifying ImpactJS sources?
Also, can I sell the game if I put it on my personal domain? (e.g users may donate $2, and play the game on my website, and I can allow them to save their games on my server)
Thanks alot!
I have some questions.
1. How can I create an interface layer so I can make this look better?
http://i.imgur.com/oXgeD3f.jpg Basically, I would like to put them inside a transparent box (like HTML divs) so they will look much better.
2. How can I draw an image in the interface layer? For example, I want to replace "Gold:" text with a small gold image.
3. Which should I be writing this code (good practice use), main.js or player.js or somewhere else like custom attack handler?
if ( player.canAttack() ) {
If (player.isStunned || player.isParalyzed || player.isSilenced) return false;
player.attemptAttack();
}
4. I need some kind of "cooldown" mechanism everywhere. While using potions, while sending projectiles, while monsters damage me etc.
Right now I have a cooldown mechanism like this one but it looks pretty crappy.
http://paste.laravel.com/1fWV
How can I enhance this further? Is there anything like cooldown handler built in ImpactJS, so I can't hold my "attack" key and release hundreds of projectiles?
5. Can someone explain ImpactJS licensing like explaining it to a kid? If I understood correctly:
"I can sell my product to other people, but they need to purchase a license themself."
What about putting the game into Appstores (e.g Android)? Am I allowed to do so after baking/minifying ImpactJS sources?
Also, can I sell the game if I put it on my personal domain? (e.g users may donate $2, and play the game on my website, and I can allow them to save their games on my server)
Thanks alot!