streaming grass...?

This forum is currently in read-only mode.
From the Asset Store
This pack has plenty of options to help your game background & ambience sound come to life.
  • once again i come to you, humbly and embarrased..

    i decided that i want to make dynamic grass blades for my platformer. lots and lots of grass blades that sway when the player overlaps them. this is no issue, BUT:

    i was wondering what would be the best way to make them appear. now, i could plaster my level full of them and they would be ready when the level starts, but the obvious problem would be the object(instance) count.

    it would be kind of unnecessary to have all those grass blades taking valuable resources.

    that leads me to streaming them on screen.

    i could do it with making either comparing distance between the player and a ground sprite. or with a box ,always position it to player, make it big enough so that it goes over the screen.

    i have ground sprites,that i could use to compare overlapping with the box object, so that upon overlapping, the ground sprite would spawn grass blades on the hotspots placed on the ground sprite. then just invert the overlapping with the box to destroy the grass blades that arent visible anymore. i guess it sounds simple enough, but i cant really make it work.

    i have trouble with object picking and determining what blades should be destroyed. i have a bad feeling its something really simple,but is there anyone out there who could help me build this streaming event properly from the ground up, to make it the most efficient possible?   <img src="smileys/smiley9.gif" border="0" align="middle" />

    also, i was wondering, is it really even worth the reduced object count, because the cpu still have to do some workout streaming the grass? so, sticks and stones, eh? or am i just completely clueless? probably.

  • I think that if you're using the same VRAM/image for the grass blades then the object count's shouldn't matter, but if you want to cut down you can check if the platforms are close to the screen..

    When the platforms are near the edges of layouts you can then spawn the grass blades along them, then destroy the blades as they go far out of the screen.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • thanks for the input, jayjay! i guess ill go and make something without streaming first and see how it goes..

    now theres another question that just came to my mind:

    is it possible to set layer opacity to a sprite's speed?

    meaning that the faster th sprite is going,the more visible a layer is?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)