Data Realms Fan Forums
http://45.55.195.193/

How does your grass grow?
http://45.55.195.193/viewtopic.php?f=1&t=17981
Page 1 of 1

Author:  Djinn [ Mon Mar 01, 2010 1:40 am ]
Post subject:  How does your grass grow?

Image
Always to the right, apparently. Okay, so um, I made grass. I don't know how else really to say it, but go check it out. Drop the Grass Seed someplace, and a carpet of grass will slowly spread to the right of where you dropped it. Why only to the right, you ask? Well, I COULD make it go to the left too, but then I'd have to double the amount of scripts running on this - as far as I know. Which is where you guys come in. Would you guys take a look at this and give me suggestions on how to tighten up my code. I have a few things I want to focus on:

- How would I best make it grow in both directions while reducing the number of scripts used? If the script spawns grass in both directions at the same time, the recursion causes them to build up to infinity in a big plant cancer.
- How do I STOP them from growing when they hit a wall? This one is less of a big deal because I have a pretty good idea what to do, but if you have any ideas I'd welcome them greatly.
- Any other suggestions except those involving them damaging or otherwise harming other things. It's friendly, peaceful grass, dudes.

Attachments:
Grass.rte.rar [115.78 KiB]
Downloaded 156 times

Author:  dragonxp [ Mon Mar 01, 2010 2:34 am ]
Post subject:  Re: How does your grass grow?

No dl?

Author:  Azukki [ Mon Mar 01, 2010 2:34 am ]
Post subject:  Re: How does your grass grow?

1) We need the mod to take a look at it
2) Your problem is .lua, not .ini, so I'm pretty sure this should be in the Lua Scripting section
3) If you could cast a strength ray and only have the seed grow if the ground is a weak material, that would be a great feature

Author:  Djinn [ Mon Mar 01, 2010 2:42 am ]
Post subject:  Re: How does your grass grow?

Azukki:
1) So hey, I'm an idiot, mod's up.
2) It's probably Lua, yeah, but there may be some ini tweaks to be done too, so I figure I'd post it in Mod Making.
3) Yeah that would be wicked, I'll take a look at how feasible that is/how to do it in the first place.

Author:  lafe [ Mon Mar 01, 2010 3:11 am ]
Post subject:  Re: How does your grass grow?

if you cant make it grow both ways, make sure to make it jump to the left by half the distance it grows on the create event, thus centering the seed.

Author:  Geti [ Mon Mar 01, 2010 4:05 am ]
Post subject:  Re: How does your grass grow?

it would be good to make it so that it only left behind nodes that actually had the reproduction logic in them, and the other ones settled to terrain after spreading. something like 1 in 8 of them should be a node, and you can count that with the mass of the object.

Author:  TheLastBanana [ Mon Mar 01, 2010 4:43 am ]
Post subject:  Re: How does your grass grow?

The grass does settle to terrain after it's grown.
Anyway...
http://dl.dropbox.com/u/2149322/Grass.rte.rar
This grows in both directions. It can't grow on anything harder than stone. As well, it will stop when it hits a wall.

Author:  Djinn [ Mon Mar 01, 2010 5:05 am ]
Post subject:  Re: How does your grass grow?

TheLastBanana wrote:
The grass does settle to terrain after it's grown.
Anyway...
http://dl.dropbox.com/u/2149322/Grass.rte.rar
This grows in both directions. It can't grow on anything harder than stone. As well, it will stop when it hits a wall.


Hell yeah! This is perfect, and actually pretty close to what I had. I was worried that this would invalidate what I had, but it looks more like the logical extension of it. Thanks a lot.

Author:  Geti [ Mon Mar 01, 2010 5:17 am ]
Post subject:  Re: How does your grass grow?

TheLastBanana wrote:
The grass does settle to terrain after it's grown.
wasn't suggesting it didn't, cheers for the quick work though.

Author:  NaXx [ Wed Mar 03, 2010 1:37 pm ]
Post subject:  Re: How does your grass grow?

Congrats about that well-done work, so fast as good.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/