Fast Grass in GMS 2 (Thousands of grass "instances" with high FPS)

hippyman

Member
Man your tutorials have really got a nice professional touch to them. Glad to see you're still busting these out for the community!
 
M

Morne

Guest
works well thanks, but i use high res sprites i scale down in my game. How do I implement this with this setup please?
 

matharoo

manualman
GameMaker Dev.
I'd like to scale a cartoon style sprite down; instead of using pixel sprites.
See example of my art:
Try making a scale variable and multiplying it to the width and height variables (in oGrassArea's Create event)

Example:
GML:
var _scale = 0.2;

width = sprite_get_width(sprite) * _scale;
height = sprite_get_height(sprite) * _scale;
 
M

Morne

Guest
After some further testing, it seems best with pixel art. thanks for fast response, i guess easiest is to play with starting sprite to manipulate size.
 
M

Morne

Guest
Here it is with pixel art, blurred in sprite effects to pixel setting 1. I will try that, I usually scale my sprites with image_scale and image_yscale, just not sure how to apply it with your vertex example. will try your suggestions as wellCapture_plants_grass_2.PNG
 
Last edited by a moderator:
M

Morne

Guest
Try making a scale variable and multiplying it to the width and height variables (in oGrassArea's Create event)

Example:
GML:
var _scale = 0.2;

width = sprite_get_width(sprite) * _scale;
height = sprite_get_height(sprite) * _scale;
Yeah that works just fine thanks, glad it was so simple!

Here is example, need now to town down the colors.
Capture_plants_grass_plants3.PNG
 
I

iAnzenGenki

Guest
Watching you code is amazing! I also learned how to even out counts when stretching out objects in rooms. Simple math, still amazing šŸ˜
 
Top