The Daily Click ::. Forums ::. Klik Coding Help ::. How to create a sandstorm effect?
 

Post Reply  Post Oekaki 
 

Posted By Message

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
13th July, 2012 at 13/07/2012 10:31:15 -

Hi folks. I'm trying to think of the best way to create a sandstorm in MMF2. I've no experience with ink/particle effects etc and am a bit of a noob at programming in MMF2 in general, so I'm not sure what I should be doing to achieve this.

Heres a screenshot of my project at the moment:

Image

I was thinking it might be an idea to ask in a pixel art forum, but figured there might be an easier way to program an effect, rather than try to draw it. (I'd have no idea how to draw a sandstorm!)

So any ideas? Thank you for your time!

Edited by -Liam-

 
Image

Tell 'em Babs is 'ere...

monkeytherat

Hero of Time Jr

Registered
  07/11/2010
Points
  1293

VIP MemberI donated an open source project
13th July, 2012 at 13/07/2012 16:09:11 -

Try this: http://www.mediafire.com/?bkyx5j9tj7uusd8 if you have any questions, feel free to pm me or post here.

 
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program.
The rest of them will write Perl programs.

SolarB



Registered
  26/12/2011
Points
  564
13th July, 2012 at 13/07/2012 21:32:55 -

This may be of help:

http://dl.dropbox.com/u/22580256/Sandstorm.mfa


Features random wind force and gravity.

 
My Open Source Examples: http://bit.ly/YyUFUh

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
14th July, 2012 at 14/07/2012 14:17:53 -

Thanks a lot for the help, both of you! I've looked at both examples and learnt from both methods. The way the wind blows in your example SolarB is just what I was looking for. Thank you so much!

 
Image

Tell 'em Babs is 'ere...

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
29th September, 2012 at 29/09/2012 16:07:31 -

Sorry for taking so long to get back here, but...

SolarB, I've tried recreating your sandstorm effect in my game and I just can't get it to behave properly at all. I've not experimented with random values and wind force before but I just seem to be getting a clump of sand particles in a line with a bit of slow down in DirectX,Direct3D 9 removes the slow down but I was hoping you could maybe go into a bit of detail about what the events and actions are actually doing? Or if you know where I may have gone wrong?

Sorry again that's it's taken me a while to get back here!

 
Image

Tell 'em Babs is 'ere...

SolarB



Registered
  26/12/2011
Points
  564
8th October, 2012 at 08/10/2012 09:45:48 -

Hi Liam,

Just noticed your post, sorry about the wait.

I don't quite know where you're stuck so I'll run you through the events.

Event numbers:

1. Every frame the loop is run creating 50 particles.
2. The particle is created and positioned top-right of the frame
- There are 3 frames with different colours that are randomly set
- Wind force is an alt, speed and gravity attributes of the pinball movement
3. To make it move left, I've set the xpos of the particle to always move left 'wind force' amount of pixels (every pixel has a random wind force set by the previous event)
4 & 5. To make sure any particles off screen are destroyed, I destroy them whenever they exit/are too far right of the frame.

That's it really, you probably figured most of that out anyway. The pinball movement does most of the hard work. In fact, it's possible you haven't set the active's movement to 'pinball' in the frame editor (which may explain the lack of gravity etc.)

Also there are thousands of particles in the frame, which will definitely cause slow-down. Be sure to set your object count to > 5000. I'm not sure of any other way to do this with less actives

Hope you can get it to work, if you have any other issues let me know

 
My Open Source Examples: http://bit.ly/YyUFUh

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
8th October, 2012 at 08/10/2012 14:11:57 -

Thanks SolarB! You know what? I think it was because I hadn't set it a Pinball Movement! Not the first time I've had this happen, so easily overlooked!

 
Image

Tell 'em Babs is 'ere...

columbo borgi :C



Registered
  07/12/2003
Points
  296

VIP Member
9th October, 2012 at 09/10/2012 20:49:37 -

SHOW DA PICS!

 
:C

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
9th October, 2012 at 09/10/2012 21:41:16 -

Maybe I should make a project page soon... :C

 
Image

Tell 'em Babs is 'ere...
   

Post Reply



 



Advertisement

Worth A Click