Sunday, October 22, 2017

NPC Movement in IntFiction

Work has begun on the NPC movement logic in my IF game engine. In the first iteration NPC travel will be fairly simple. No complex player-stalking algorithms etc. Travel nodes are grouped into TravelSets. As long as the TrabelSets are set to active, the NPC will travel. A Travel node contains a location identifier. TravelSets have a movement mode. So far the possible modes are:
Follow:
Causes the NPC to follow the player. Whatever room the player enters, so does the NPC.
Random:
Causes the NPC to pick a random connector to travel through.
Path:
Causes the NPC to go to the first Travel node location, then the next etc. When it is in the last defined location it stays there.
Repeat:
Causes the NPC to go to the first Travel node location then the next. When it is in the last defined location it works backward to the first, then starts back down. It repeats its journey from top to bottom then bottom to top as ling as it is active.
In the future I will expand this to smarter modes that will move according to algorithms etc.

No comments:

Post a Comment

5 VST Effects I Use in Every Song

VSTs are so great. I have a massive collection of free instruments and FX that I've tracked down. There are SOO many to choose from... B...