View unanswered posts | View active topics It is currently Wed Jan 08, 2025 10:22 pm



Reply to topic  [ 10 posts ] 
 How does your grass grow? 
Author Message
User avatar

Joined: Sun Oct 29, 2006 4:26 am
Posts: 298
Reply with quote
Post 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


Last edited by Djinn on Mon Mar 01, 2010 2:36 am, edited 1 time in total.

Mon Mar 01, 2010 1:40 am
Profile YIM
User avatar

Joined: Wed Sep 09, 2009 3:16 am
Posts: 3032
Location: Somewhere in the universe
Reply with quote
Post Re: How does your grass grow?
No dl?


Mon Mar 01, 2010 2:34 am
Profile
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post 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


Mon Mar 01, 2010 2:34 am
Profile
User avatar

Joined: Sun Oct 29, 2006 4:26 am
Posts: 298
Reply with quote
Post 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.


Mon Mar 01, 2010 2:42 am
Profile YIM
User avatar

Joined: Sat Mar 28, 2009 2:33 pm
Posts: 718
Reply with quote
Post 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.


Mon Mar 01, 2010 3:11 am
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post 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.


Mon Mar 01, 2010 4:05 am
Profile WWW
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post 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.


Mon Mar 01, 2010 4:43 am
Profile WWW
User avatar

Joined: Sun Oct 29, 2006 4:26 am
Posts: 298
Reply with quote
Post 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.


Mon Mar 01, 2010 5:05 am
Profile YIM
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post 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.


Mon Mar 01, 2010 5:17 am
Profile WWW
User avatar

Joined: Mon Feb 02, 2009 9:18 pm
Posts: 618
Location: Ancient Hispania
Reply with quote
Post Re: How does your grass grow?
Congrats about that well-done work, so fast as good.


Wed Mar 03, 2010 1:37 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 10 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.028s | 15 Queries | GZIP : Off ]