RPGDXThe center of Indie-RPG gaming
Not logged in. [log in] [register]
 
 
Post new topic Reply to topic  
View previous topic - View next topic  
Author Message
increpare
Blue Fillrect


Joined: 19 Feb 2009
Posts: 43

PostPosted: Sun May 03, 2009 8:10 pm    Post subject: scripting autonomous behaviour [quote]

Hey guys;

I had a question i was going to post somewhere else, and then I thought it might be more fitting to post it here :)

I'm just about to start off on a medium-size game. It's going to take place in a village where I want all the various characters to have scriptable routine [with some interactions should they encounter one-another, or the player], so there's some feeling of activity.

I guess first thing I'll have to figure out is setting up waypaths/collision stuff, and then scripting more complex behaviours and interactions on top of/around that.

Anyway, I was wondering if there's any advice or links or whatever that people might offer?
Back to top  
Hajo
Demon Hunter


Joined: 30 Sep 2003
Posts: 779
Location: Between chair and keyboard.

PostPosted: Sun May 03, 2009 9:42 pm    Post subject: [quote]

I once had a project where I tried to create lively villages. The inhabitants had simple AIs that determined the needs and wishes (shopping, chatting, eating, sleeping ...) and there were marks on the level for the fixed locations (like shops, or the PC's resting place), others would be determined dynamically (chat -> look for closest non-busy inhabitant). The AI took one of the goals, that seemed to be needed most at the moment, and tried to pursue it, if it failed it tried another goal.

It worked, and it's been giving a surprisingly alive impression of the villages.

There was nothing really scripted. It's been all computated. But it seemed even easier this way.

Maybe the idea helps :)

Edit: I don't quite know what you mean with "medium sized project." You will have to spend a day or two on pathfinding, and another few days on the AI to make this work.
Back to top  
increpare
Blue Fillrect


Joined: 19 Feb 2009
Posts: 43

PostPosted: Mon May 04, 2009 5:37 pm    Post subject: [quote]

Quote:
Edit: I don't quite know what you mean with "medium sized project." You will have to spend a day or two on pathfinding, and another few days on the AI to make this work.


medium-sized = a couple of months :) (admittedly the upper end of the medium-range )

Having pondered it a little while, I think I have a course of action

1: algorithm to section up maps, generate path-finding graphy stuff
2: basic scriptable movement behaviour
3: deal with potential for collision
4: other, more complex, but more pleasant-to-program message-sending stuff for more detailed scripting
Back to top  
Hajo
Demon Hunter


Joined: 30 Sep 2003
Posts: 779
Location: Between chair and keyboard.

PostPosted: Mon May 04, 2009 9:06 pm    Post subject: [quote]

I think the key is to have some variation, both in the timing and the paths. Players will recognize patterns quickly ("This NPC always takes this path") and it takes away a bit of the fascination from watching the NPCs. Best is if their actions appear to make sense, but also are a bit unpredictable. I remember that I watched my simulated villages just for the fun of watching it being "alive".

Good luck with your project :)
Back to top  
Post new topic Reply to topic Page 1 of 1 All times are GMT
 



Display posts from previous:   
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum