GM:S 1.4 Quadtree Help

Discussion in 'Programming' started by Master Maker, Aug 31, 2017.

  1. Master Maker

    Master Maker Member

    Joined:
    Dec 11, 2016
    Posts:
    160
    How do I implement quadtrees? It's for a 2D, side-view platformer.
     
  2. NightFrost

    NightFrost Member

    Joined:
    Jun 24, 2016
    Posts:
    1,959
    If you're worried about performance due to amount of instances, it might be easier to use instance activation and deactivation to minimize the amount of CPU time devoted to them. If you need the terrain to stay active while outside the view for example for enemy movement and collision detection, you should use some form of grid collision system. It would let you give them collision detection against static terrain without having the terrain instances active.
     
  3. Master Maker

    Master Maker Member

    Joined:
    Dec 11, 2016
    Posts:
    160
    So how would I implement it?
     
  4. NightFrost

    NightFrost Member

    Joined:
    Jun 24, 2016
    Posts:
    1,959
    You mean grid collision? One articles that goes into its technicalities is over here (scroll down to type #2).
     
    dannyjenn likes this.

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