MODULE: SnowRainPS v1.0

Started by helios123, Sun 18/07/2010 18:31:40

Previous topic - Next topic

helios123

Description
  This is a small module for adding snow/rain functionality to the game. A small demo game is also included.
  Some features are as below:
 

     
  • Multiple sprite images can be used
  • Ability to change type of system (Snow/Rain) at runtime
  • Setting of Wind direction for particle movement
  • Change the amount of particles drawn in the foreground
  • Support for rotating the particle images

  AGS version 3.1.2 and later is recommended. Not tested on older versions.
 

Download link below includes zip file with demo game as well as .scm file. For documentation, please refer the .ash file

UPDATE: 17 Sep 2010: New version uploaded. This has:

  • Transparency, and modified logic for making particles disappear.
  • Collision detection logic takes into account the 'Solid' property of objects and characters
  • Code organized in a more object oriented way
in addition to the features mentioned above

Download here
That's all for now,
helios123

Monsieur OUXX

#1
For those who think "yet another rain/snow module" :

There are already 2 major similar modules, but this one has two differences:

1) includes particle/collision detection => When the snow hits the ground and/or the character, it disappears. Abstauber's "weatherwuest" module does that too but you have to call a function to set the collisions' regions.

2) Also this module doesn't manage particle sprites with alpha : they can have pink (transparent) pixels, but no pixels with x% opacity. EDIT (2015): That's not true anymore since AGS 3.3.x+, where most alpha-related features have been pimped up or fixed. Alpha away!
(Small warning, though: I can't remember from the top of my head, but you might need to set "useAlphaChannel" to true in a DynamicSprite.Create somewhere for it to work).

 

SMF spam blocked by CleanTalk