Welcome, Guest. Please login or register.

Pages: [1]
Print
Author Topic: Removing / Fixing the NPC wandering code  (Read 4258 times)
Gaspard
Community member

Posts: 479


The Blackest Heart


View Profile
« on: January 09, 2011, 10:01:29 PM »

Hi guys, would it be a very big task to remove the code that makes all of the NPCs walk around randomly around the big map ?
It is very cumbersome to test talking to NPCs when you have to hunt for them over the big screen.

The good scenario would be to have only one NPC walk around on the "Farm" map (that is the smaller map where you teleport when you use the door) to showcase NPC movement and all the rest of the NPCs to be stationary for easy interaction with them.

If it is not too difficult and/or time-consuming it would be very much appreciated : )
Logged
Q_x
Admin
Community member

Posts: 553



View Profile
« Reply #1 on: January 09, 2011, 10:14:37 PM »

Sorry for being totally unrealistic, but I'm not agains randomly walking PC's. Let them maybe stick to a place if this is important to fix eg. for writers, but let some of them still wander...
What I would say to fix the problem is implementing AI, at least simple one.
Logged

Gaspard
Community member

Posts: 479


The Blackest Heart


View Profile
« Reply #2 on: January 09, 2011, 10:23:45 PM »

As barra said, and I agree with him here - is that implementing an AI should not be the goal here.

I guess I stated my request unclearly - I'm asking for (hopefully) something far more simple than any (simple or complex) AI - I'm asking for most of the NPCs to be stationary, but one or two of them still walking and strictly on the farm map as that is a smaller one and finding the NPCs would not be such a difficult pain in the ass, if you pardon me my French
Logged
zenbitz
Community member

Posts: 1164



View Profile
« Reply #3 on: January 10, 2011, 03:28:27 AM »

Latest SVN has a tiny little patch that makes this easier.  I just slowed down how often they go from "stand still" to random walk.
It might be a little more realistic to randomize the delay for each object so that they are not totally synchronized.

Try it.

It would very easy to make it so that no NPCs ever move (just comment out one line), but it would take effort to set up some different interfaces so that some PCs were "wanderer" types and some were "static".   Might as well wait for the AI to get developed.
Logged

We are not denying them an ending...
We are denying them a DISNEY ending - Icelus
Gaspard
Community member

Posts: 479


The Blackest Heart


View Profile
« Reply #4 on: January 10, 2011, 06:55:54 AM »

Thanks, it already improves the chances of hitting their sprites with the mouse cursor .)
Logged
dracre
Community member

Posts: 26


View Profile
« Reply #5 on: January 11, 2011, 12:19:30 AM »

How about you set a radius (number of tiles) for wandering, and when the npc reaches it, he will start walking towards its center.  Shocked
Logged
zenbitz
Community member

Posts: 1164



View Profile
« Reply #6 on: January 11, 2011, 07:58:53 AM »

DrAcre- well, this will presumably be replaced with a an actual scripting/AI mechanism.  So while you idea is at least as good as the others, it's not worth just bolting on.   We just wanted to make it a little bit easier to actually go through the quests for now.

« Last Edit: January 13, 2011, 12:02:44 AM by zenbitz » Logged

We are not denying them an ending...
We are denying them a DISNEY ending - Icelus
Technomage
Admin
Community member

Posts: 80



View Profile
« Reply #7 on: January 12, 2011, 11:39:29 PM »

Yup, once we get AI scripting up and running we'll need to think about various behavior algorithms. But dracre brings up a good point: we definitely don't want NPCs to wander off into the wilderness! Just something to keep in the back of our minds.
Logged

"There are more atoms in the period at the end of this sentence than you can count in a lifetime." Science is awesome.

Pages: [1]
Print
Jump to: