How do I - create handmade pathfinding grid

0 favourites
  • 4 posts
From the Asset Store
Snap to visible grid - perfect solution for any game genre
  • I'm using the pathfinding tool to create an interactive map. I have had some success here, but I am going to have the first and second floors on two different layouts.

    The paths are fairly different on these two levels, and I want to limit CPU usage as much as possible because this is probably running on something very light (like a raspberry pi 2).

    So instead of recreating the pathfinding grid every time it switches between the two levels, is it possible to have the grid already created? The grid won't ever change, so a static one would be great. Or is it possible to actually go in and "draw" the grid as a file and have the game load it instead of creating it off of objects?

    This is a 1920*1080 grid with a cell size of 6 so I worry about performance.

  • seems like to are loading the same pathfinds on different "levels". My advice, though its smh of a hassle, is to make seperate animations and spawn objects that creates a new level, but not a new scene.

    Tbh, it is much easier just to make 2 seperate grids (not that much laggier), but if you have the brains and time, you can do it the way above

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah, that is what I am probably going to do is have each level of the building on a separate layout.

    The thing I want to avoid is creating the pathing grid when a layout loads, the grid will never change, so if there was a way to just have the grid already created it would be great, just load that instead of calculating one based off of solid objects.

    Is there a way to create a "grid file" or anything?

  • Most games you probably played with larger worlds have multiple scenes, where entering a trigger jumps from one area to another. I think if you want to create multiple levels you should create multiple scenes for it. That way, players will need to spend some time loading rather than having a laggier gameplay

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