Flash is very efficient in generating a dynamic particle system that can easily be controlled and adaptable in the way I want it to act within the game's environment(particles that change from good to bad health), but I was worried that it would involve using particle physics equations in actionscript (I only know the basics of actionscript 2 and 3, I don't want to venture into more head aches than I already got with code). Luckily James, our games tutor was working on generating a snow particle system that was entirely done in actionscript. He was nice enough to let me experiemnt with the code to make it act the way I wanted it to.
So here how it works, the particles fall the same way as how rain or snow falls from the sky, which involves some sort of gravity and friction, but these forces are cheated to give the illusion of realistic rain/snow by making particles fall at different speeds and distances in Flash. The particles are also drifting across one side of the screen, representing a wind force on the particles. The last and most important thing the particles show is the player's health through a harminous sequence of colours that seemlessly change from green to red if the player takes damage. This is done by calling upon the player's current health, if the character takes a certain number of hits from enemies, the colour of the particles start to change after every 20 health points. If the player reaches zero health, the particles fade and the character dies.
Full/Medium Health Setting
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs5W057R-UGJc8knn20vLv9nOeJN_wUrhfbREZKEbYWEjx0SwXHdobu0moLRfKDMYCD7tMuXcmrrH31t5dSsJmnoLSvwHPoB92GSbN17SMjfvqASXFw3qATZiQFd5XWDriDnyUCSh-pxA1/s400/particles_feedback_good.jpg)
Medium/Low Health Setting
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnD4eTV_vGDf3PNDY_HrSidknCVYsfao8QgS0NtrGpjK2gCLiX9WAq3DGwpPLc1nWp4KCaC8qF1Cbi2YGh2gBhE7IEV57akKyJb1iZWCR6XiTNI6L0LxPMt5OSh_peJExrY-96ATOgULxz/s400/particles_feedback_medium.jpg)
Low Health Setting
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihUnai4drTTZc0kVGSHZA09VFyRnL5zF8Som9k2CzoSLOclULsn1LHqqnYFVX4gmQ3eOrNAsGRI0YdRHjQ6GyeTjS1yYFhfxtWICU89eTif9MFtleZsmVYYQ857uOwCascFfSwRcZZcI9l/s400/particles_feedback_bad.jpg)
The rotation of the particles also speed up everytime the health particle's colour change, where green is a very calm rotating speed and red is full chaotic spins. This adds stress towards the player, which makes them act more quickly and gives them the challenge of finding health to restore the particles setting.
No comments:
Post a Comment