Page 2 of 2

Re: Freshness

Posted: Thu Dec 29, 2016 8:52 pm
by twirlimp
Voom wrote:lol, hot springs it is! You might need to rework the way NPCs move and and interact with other objects (like go through doors, talk to other NPCs, etc.).
Honestly that would be my pleasure and not a chore at all.

I suspect that performance might be an issue, but I'm willing to do an experiment and risk scrapping it if it lags too much (or I'll keep trying to optimize it).

In case a full NPC schedule is too much, I'll just give them a list of spawns that they can be in, and set them to interact with the spawn environment only when the player is there. That would minimize the performance to the lowest degree possible, and might even be better than a full schedule if there's a reliable time counter that can tell the Player which spawn the NPCs are in at a specific time.
Voom wrote:Maybe another layer on Tiled when creating a map and pathway for NPCs.
I personally don't see why they can't just use the existing layers, but I haven't looked into the map-walking code intensively (only briefly during monster AI changes).

Re: Freshness

Posted: Thu Dec 29, 2016 9:48 pm
by Zukero
The pathfinding of the swarmers could be reused to send a NPC to a designated tile, and have a script event trigger the movement, and ideally, another script triggered upon reaching the destination.

Re: Freshness

Posted: Thu Dec 29, 2016 9:51 pm
by twirlimp
Zukero wrote:The pathfinding of the swarmers could be reused to send a NPC to a designated tile, and have a script event trigger the movement, and ideally, another script triggered upon reaching the destination.
The swarmer pathfinding is something I'm extremely familiar with (too familiar tbh) but wouldn't this cause a large performance hit game-wide if all NPCs were to have schedules?

Re: Freshness

Posted: Fri Dec 30, 2016 4:05 am
by Voom
Ooh, this is getting interesting. Could there be a script that would activate an NPC's movement only once the char is in the same map tile as the NPC? Localized something or other...

Re: Freshness

Posted: Fri Dec 30, 2016 6:16 am
by twirlimp
Voom wrote:Ooh, this is getting interesting. Could there be a script that would activate an NPC's movement only once the char is in the same map tile as the NPC? Localized something or other...
This should be doable one way or another yes.

Re: Freshness

Posted: Fri Dec 30, 2016 10:51 am
by Zukero
Yeah, there are plenty of triggers (like, at least 5) we can use.