GM:S 1.4 Drawing a lot of sprites

Discussion in 'Programming' started by marasovec, Jul 13, 2019 at 11:32 PM.

  1. marasovec

    marasovec Member

    Joined:
    Sep 15, 2016
    Posts:
    288
    So, I have a top down game where almost every object (around 30 of them) draws self and 6 other body parts via draw_sprite_ext() (they move, change colour, size etc) and my question is if there will be at least a small fps increase if I let only one instance draw all the stuff instead of 30? Depth is not a problem here
    I heard somewhere it might work like that but the code would be pretty long so I'd rather ask if it's worth it
     
    Last edited: Jul 13, 2019 at 11:39 PM
  2. obscene

    obscene Member

    Joined:
    Jun 21, 2016
    Posts:
    2,387
    It won't be worth it unless you are making changes using draw_set_color(), draw_set_alpha() or gpu_set_blendmode and could reduce the number of those functions by drawing them in bulk.
     
  3. maru_th_undrtkr

    maru_th_undrtkr Member

    Joined:
    Jan 23, 2018
    Posts:
    42
    I think I saw someone do drawing through the PARENT by using draw self on parent and leaving the rest not visible, IDK if this applies since you have very specific draws. one of friendly cosmonaut videos I think.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice