Author Topic: Weather Effects  (Read 7207 times)

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Weather Effects
« on: 2007-12-16, 08:56:32 PM »
I've uploaded a couple of files to the SGDK2 project templates section.

One is a set of explosion sprites and points sprites.  The explosions automatically disappear after their animation is done.  The points sprites (like "50" for 50 points) automatically disappear after their lifetime (set in the Life parameter of the sprite).

The other, more interesting one, is a weather overlay custom code plug-in.  It allows a game designer to use snow, rain, or a "fire storm" as weather effects in-game dynamically, without the hassle of creating a layer and animating sprites, etc.

It should be made known that the snow effect is... interesting.  The snowflakes are not included in the project.  Instead, the program gets them dynamically at runtime from http://snowflakes.lookandfeel.com/, converts them to the right format, and then adds them to a queue to be displayed on the screen.  If not connected to the Internet, or if you have a slow connection, this doesn't work so well.  A set of 20 flakes is included, which will be used over and over continuously instead.  This is not enough for a level-4 snowstorm to be fully effective, and this could probably be fixed by including a larger initial set, or reusing the flakes on the screen at the same time.  As it is right now, just... don't use a level-4 snow storm if you're not connected to the Internet.

The upshot of all that is that the snowflakes really are random and different every time you run the game (except for the first 20)

« Last Edit: 2007-12-16, 09:01:44 PM by durnurd »
Edward Dassmesser

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: Weather Effects
« Reply #1 on: 2007-12-16, 11:23:10 PM »
that is so unbelievably awesome. :o

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Weather Effects
« Reply #2 on: 2007-12-17, 03:26:44 AM »
whoa, how cool, thanks durnurd! (actually, i need a snowstorm for the game  ;) )

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Weather Effects
« Reply #3 on: 2007-12-17, 07:09:12 AM »
I approved the upload, so you should all be able to get at it now.  8)

v6v

  • Clever
  • Fanatic
  • ***
  • Posts: 500
  • Has renamed his project to Galaxy!
    • View Profile
    • My Developer Page!
    • Email
Re: Weather Effects
« Reply #4 on: 2008-02-07, 08:15:34 PM »
Hey, I just switched to the SGDK2 now... which is easier than I thought, so... do you know how to find more effects? (THUNDER HAIL WIND) I'm working on a new game that uses the effects.

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Weather Effects
« Reply #5 on: 2008-02-09, 08:01:33 AM »
maybe you can use the rain effect for hail and wind. i didn't try out the weather effects, but maybe you can change the velocity of the raindrops to simulate hail.
and perhaps you can change the direction, so the images move from left to right or something to simulate wind. with using of another pictures for both.