Xer0botXer0
Senpai
I'm scratching my brain here,
I imagine having around 100-200 npcs wondering around using pathfinding, and another couple dozen driving around using pathfinding.
So, is that a lot of processing ? yes,no, who cares.
Alternatively to the pathfinding functions of GML, I imagine a scenario where because the world isn't large, I'd just set it off on a path, move 100 pixels west, move 150 pixels north, reach destination on left, lerp into garage!
Has anyone tried something like that ? I'm somewhat excited to try such an approach.
I do believe I'd still have to check for collisions with lamps, other npcs, and what ever else comes up in the future, I mean lamps I could just make sure the x/y coordinates are right so it doesn't start off with a line running into a lamp. But for other npcs .. just stop moving ? oh hold on, walk through em! haha
So outdoors I think I'm sorted, but on a smaller more detailed scale there's indoors, I need a system to handle movements. I imagine a 2d array, the first dimension representing the current step, the second dimension holding coordinates for each step, and once the last coordinates are reached then the npc can sit down at the chair until the action sequence has completed then it moves onto the next first dimension of the 2d array.
My primary concern with using GMLs pathfinding is that I've got sidewalks that I want npcs to walk on, and crossroads too. For cars I've got roads. I'd like the cars to be centered in their lanes, and the npcs not straying from their paths.
Suppose the solution to that would be to create invisible collidors around the paths ? and invisible toggle colliders that toggle off collision where a car must turn into a sidewalk.
I imagine having around 100-200 npcs wondering around using pathfinding, and another couple dozen driving around using pathfinding.
So, is that a lot of processing ? yes,no, who cares.
Alternatively to the pathfinding functions of GML, I imagine a scenario where because the world isn't large, I'd just set it off on a path, move 100 pixels west, move 150 pixels north, reach destination on left, lerp into garage!
Has anyone tried something like that ? I'm somewhat excited to try such an approach.
I do believe I'd still have to check for collisions with lamps, other npcs, and what ever else comes up in the future, I mean lamps I could just make sure the x/y coordinates are right so it doesn't start off with a line running into a lamp. But for other npcs .. just stop moving ? oh hold on, walk through em! haha
So outdoors I think I'm sorted, but on a smaller more detailed scale there's indoors, I need a system to handle movements. I imagine a 2d array, the first dimension representing the current step, the second dimension holding coordinates for each step, and once the last coordinates are reached then the npc can sit down at the chair until the action sequence has completed then it moves onto the next first dimension of the 2d array.
My primary concern with using GMLs pathfinding is that I've got sidewalks that I want npcs to walk on, and crossroads too. For cars I've got roads. I'd like the cars to be centered in their lanes, and the npcs not straying from their paths.
Suppose the solution to that would be to create invisible collidors around the paths ? and invisible toggle colliders that toggle off collision where a car must turn into a sidewalk.