@Noel Cower - Vein Grass

Blitz3D Forums/Blitz3D Programming/@Noel Cower - Vein Grass

_PJ_(Posted 2004) [#1]
How do I incorporate these functions?

http://www.blitzbasic.com/codearcs/codearcs.php?code=827


Rook Zimbabwe(Posted 2004) [#2]
I would say that everything except the functions are placed before the main program loop and the functions are called somewhere near renderworld... I am only guessing.


N(Posted 2004) [#3]
He's right.

Anyhow, that code is really badly written (I should have taken it down and revised it so nobody would have the nastiness that is my evil code), so I recommend you just write your own code.

Anyhow, I've got a few ideas on how to handle this now, so I'll probably write up something new.

Edit: I just noticed I started two sentences with 'anyhow'. I will proceed to torture myself accordingly, so have no worries that I won't suffer for my wrongdoing.


_PJ_(Posted 2004) [#4]
I shoulda said what the problem was.. (problems were.. in fact:)

1) I am useless at functions
2) The entities referred to arenot declared on compile time, because I think Blitz compiles functions first - this was what gave me the headache!

I recommend you just write your own code.

Luckily, I just need a few random placings of sprites that will remain where they are on the terrain, without the need to update - So I can get way fwith not using the functions safely ;-)


Edit: I just noticed I started two sentences with 'anyhow'. I will proceed to torture myself accordingly, so have no worries that I won't suffer for my wrongdoing.


I have a habit of putting 'However' in every paragraph. However, I'll only use it once here ;-)

Thanks for getting back to me, Noel - Good luck with your new ideas


N(Posted 2004) [#5]
I've written up a new grass system, I'll have it posted (some decent sample media included) soon enough.


N(Posted 2004) [#6]
Tasty




N(Posted 2004) [#7]
More tasty




ckob(Posted 2004) [#8]
funny ....i dont taste a thing but I love the grassy look whats the framerate on that?


N(Posted 2004) [#9]
Low.

I added a 'blowing in the wind' effect. Wind direction, power, and speed are controllable.

I upped the grass-count in this one quite a bit more though:


And barly version (so sayeth the Ion-Storm):


Best thing you can do is keep the range low, use mip-mapping (these screenshots don't use mipmapping so they stay sharp), and keep the grass-count in a reasonable range.


N(Posted 2004) [#10]
Hate to be a pest, but the grass system is uploaded (including the media pack).

Ulysses Grass System


Doggie(Posted 2004) [#11]
Thanks! It's in my game demo immediately.


The game gods have smiled upon me...


_PJ_(Posted 2004) [#12]
Okay - I don't need it for it's original purpose as mentioned above, but I'm interested now, so I'll incorporate this into my FPS-type project and post some screenies (Need to get drawing some alien grass... ;-) )


Vorderman(Posted 2004) [#13]
Is that the gang of Doom guys running through the grass Doggie?


Doggie(Posted 2004) [#14]
Yep, but you'd hardly recognize them if you didn't know who they were.


1-2-3-4 WE LOVE MARINE CORPS!

BTW, where in your code does it take into account the dimensions of each animation cell> I see where there is an x and y cell that are set to 5 but I don't see where it does the division. I've tried to modify the code to accept different pics to do other sprites like planes and tanks etc but just changing the cell factors doesn't work. I'm probably blind as usual.