MODULE: SimpleSnow v1.10

Started by SSH, Fri 16/12/2005 15:28:44

Previous topic - Next topic

SSH

Well, I was making a generic winter festival celebration game  and wanted snow, but the plugin didn't work, so here for anyone with a PC that can cope with 13 concurrent overlays....

Download here

Documentation

Comes with a .cha file that you can import to get some sample snowflakes.

Now upgraded for AGS 3.1+, etc., but still includes the old module for 2.72 fans
12

Scummbuddy

this may be of use to the Christmas MAGS.

nice work.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Candle

#2
Quote
Compile Error
---------------------------
There was an error compiling your script. The problem was:

In: 'Room 1 script'

Error (line 8 ): undefined symbol 'SNOWFLAKES'

SSH

That's why it is an example. I also expect people to read the rest of the docs. You need to change SNOWFLAKES to whatever the view name is that contains your snowflakes. Unfortunately importing a character doesn't keep the names of the views...
12

Candle

#4
I have a problem: The snow flakes leave a white trail until large parts of the background become completely white...


SSH

#5
You'll get that if your BG is a different colour depth to your game. There's not much I can do about it, as there's no way to determine a room's colour depth.
12

Candle

#6
Yep that's what it was!

Another thing:

I tested the template I have with the snow mod and on closing of the game got this warning that I haven't seen with the other engine:

QuoteWarnings generated!
---------------------------
Some warnings were generated while you were testing your game. They are listed below. These are not serious errors, but you should fix them before distributing your game.

(in room 1): Dynamic sprite 49 was never deleted
(in room 1): Dynamic sprite 50 was never deleted
(in room 1): Dynamic sprite 51 was never deleted
...

And so on...

monkey0506

#7
It means you forgot to call SimpleSnow.No();

This is why I suggest that an event be added for exiting the game.  But until then, you can just create a custom function like this:

Code: ags
void ExitGame(int param) {
  SimpleSnow.No();
  QuitGame(param);
  }


Then you would just call that function in place of QuitGame.  But then if you are running in windowed mode, and close out of the window it won't work.

Candle

Thanks monkey, I will just hold off on using this till it is fix then. I don't need it right now so it can wait.

Kinoko

#9
Would it be possible to use this plugin for different effects, such as falling Autumn leaves or flower petals in springtime? Or is the movement created only to mimic snow.

If so, perhaps it'd be possible to code in the ability to adjust the "severity" of the "snow", or adjust the direction it falls (ie. slightly to the left, or right, or horizontally)...? Just some thought off the top of my head, without having looked at the plugin yet as I'm at work.

SSH

Kinoko, its a module, not a plugin  :P

But, yeah, just change the sprites to be leaves. I think it shouldn't be too hard to tweak the movement etc. In fact, it needs tweaking to stop the snow moving like "epileptic zombies" as it is. But you can do that already by messing around with the open source code...
12

Rui 'Trovatore' Pires

QuoteThanks monkey, I will just hold off on using this till it is fix then. I don't need it right now so it can wait.

Correct me if I'm wrong, but from what I understand nothing needs "fixing". Monkey's talking about something to prevent people not using some modules correctly, which, from what I gather, was the problem all along. I mean, Monkey even gave you a custom function you can use which should solve it all. :P
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Candle

If you read it he gave me a fix but does not fix all of the problem .If they run the game in a window it will still give errors.

Rui 'Trovatore' Pires

#13
No, he gave you a custom function that calls SimpleSnow.No(); before the game quits. Since that function IS supposed to be called at times like that, it can hardly be called a fix. Basically, he's given you a good way to make sure you don't forget to call it, and the suggestion he refers to is only to make sure this sort of thing can be more convenient.

But it's not broken, so you can still use it without fear. That's all I'm saying.

Edit:

But then I don't know about running in windowed mode...
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

SSH

#14
As the eEventQuitGame suggestion goes, I could adapt for this situation if there was such a callback, but I can't do anything about it until CJ implements this or something like it.
12

Pumaman

Alt+X or the Close button shouldn't give the Dynamic Sprite warnings, I'm pretty sure I disabled that -- in 2.71, at least.

Mugs

I have a question:

I wanted to put rain in my game, but every time I use the Wait (); function, the rain stops moving. Is there a way to make it move all the time?
Cool stuff I found out: Men are four times more likely to be struck by lightning than women.  Wow, really? [dirty joke] Maybe this has to do with the fact that us men have "lightning rods"? [/dirty joke]

SSH

#17
Yeah, just import the module then edit the code that says repeatedly_execute to repeatedly_execute_always... easy as pie
12

strazer

Quote from: SSH on Fri 16/12/2005 23:29:12
You'll get that if your BG is a different colour depth to your game. There's not much I can do about it, as there's no way to determine a room's colour depth.

Just a reminder for you that now that AGS v2.72 has a Room.ColorDepth property you could add a check in the next version. Haven't tested yet if it would work, though.

SSH

Yeah, a few of my modules should be modified to pick up that property (in an #ifdef, so's not to break completely for older AGSes)
12

SMF spam blocked by CleanTalk