I've been doing a lot of thinking on how I can go about making each pet feel unique, and I believe using finite state machines is the way to go. For anyone who doesn't know, FSMs are used in many games for NPC AI, and they basically tell the NPC what to do when met with certain conditions. For a very simplified example, an enemy NPC may try to shoot at the player character if they walk into its line of sight, or run for cover if the player gets too close. They can serve much more complicated functions as well, however almost all of the examples I've been able to find online are intended for combat-oriented games and wouldn't be fitting for a casual pet sim. So I pretty much have to figure it out on my own. Here's the summary what I have so far (just for the record, I'm not much of a programmer):
A pet's personality is determined at its "birth" in two ways; First the pet's species is taken into account- for example, the dog-like pet will prefer to eat meat and be very playful, while the fish-like pet will eat plant food and be much more docile- and then it gets randomly assigned one of 16 personality types that determine, among other things, what flavors of food it likes, what kinds of toys it likes, and how it acts around other pets. The FSM then makes decisions for what actions the pet will take, influenced by the personality it has.
Sorry if a lot of that doesn't make sense, I'm a lot better at thinking than I am at actually articulating those thoughts. Thanks for the feedback as well, I appreciate that people like my ideas :)Statistics: Posted by Tortoiseshel — Fri Feb 26, 2016 9:47 pm
]]>