Added several key features to NPCs, then used the very useful :tree_tag verb to provide a printout of important data. Now, it has been pointed out to me that these creatures could be generated whole cloth from a single parent. The reason I'm not doing this is because I have a very specific theme feel I'm going for, so I want to be able to customize NPC appearance and behavior before procedurally determining other qualities about them.
Here's a screen of the current set of NPCs (triplicaster roach frog is copyright by me 8)):
The HP range should be pretty self explanatory, and sets a base health for the critter. Nextly, the creatures have different weapons they can be spawned with. The last information field, colors, is just a count of the basic colors the creature can spawn with. The color can determine a bonus or penalty (black rapier craw's get a defense bonus, yellow ones get a health penalty). I'll go over this system in greater detail once I iron it out a bit more.
Wayfar 1444 is a text based online multiplayer game. You are a colonist, sent to the surface of an alien world with a few basic supplies. Join up with other colonists, or plot against them, while surviving and building a self sufficient colony.
Thursday, May 26, 2011
Wednesday, May 18, 2011
Screenshot update
ANSI colors were invented shortly before television. This is my ANSI scoresheet.
Of course, the recently stranded starting colonist won't have to look at all of that $ansi.green right off the bat. When entering the atmosphere of their new home planet, a colonist is pretty green:
Of course, the recently stranded starting colonist won't have to look at all of that $ansi.green right off the bat. When entering the atmosphere of their new home planet, a colonist is pretty green:
Tuesday, May 17, 2011
Herds: NPC population tracker
Herds and nests are key components of the "life like" NPC system.
The herd is an invisible population tracker object. It has the ability to show in the room, as traces or signs of the herd. If a large herd of Muex are in the player's room, and he is observant enough, he might observe muex tracks, or even a herd of muex in the distance. A herd, like a regular NPC, has a health rating, and when health is depleted the herd goes extinct and is removed. Herds, unlike regular NPCs, do not feed themselves directly, but instead spawn minion NPCs to gather food and direct it back to the herd.
The herd can monitor player activity in the room, and when appropriate (eg when hunted by a player or predator) will spawn an NPC based on the species members of the herd.
There are multiple types of herd deriving from the base herd. The first is a sedentary herd, eg domesticated animals that do not wander.
The second is a nest building herd - this herd will wander until it finds an appropriate location for a nest, and then build one (by spawning an NPC with instructions to do so). Once the nest is built, the herd will move into the nest and react from inside.
The third is a sentient herd, such as a group of humans with a purpose, like a squad of rangers or explorers. These herds have a purpose to fufill and will act until the purpose is achieved or the herd is destroyed.
The herd is an invisible population tracker object. It has the ability to show in the room, as traces or signs of the herd. If a large herd of Muex are in the player's room, and he is observant enough, he might observe muex tracks, or even a herd of muex in the distance. A herd, like a regular NPC, has a health rating, and when health is depleted the herd goes extinct and is removed. Herds, unlike regular NPCs, do not feed themselves directly, but instead spawn minion NPCs to gather food and direct it back to the herd.
The herd can monitor player activity in the room, and when appropriate (eg when hunted by a player or predator) will spawn an NPC based on the species members of the herd.
There are multiple types of herd deriving from the base herd. The first is a sedentary herd, eg domesticated animals that do not wander.
The second is a nest building herd - this herd will wander until it finds an appropriate location for a nest, and then build one (by spawning an NPC with instructions to do so). Once the nest is built, the herd will move into the nest and react from inside.
The third is a sentient herd, such as a group of humans with a purpose, like a squad of rangers or explorers. These herds have a purpose to fufill and will act until the purpose is achieved or the herd is destroyed.
Labels:
c#,
moocode,
space colony moo,
wayfar 1444,
wayfar moo
Saturday, May 14, 2011
Brain spitting re: Robots
Robots: The Friendly Helper
Robots are your friend. Robots are made of metal and gears and circuits, and each robot can help you and be your friend. Robots are made by the National Robotics Insitute and they love people and can help them a lot!!! Let’s talk about the ways a robot could help you today, <DESIGNATOR-444456y>
$actions.robot_patrol - patrol between a set of 4 (?) points, attacking anything designated by the owner or a set of general criteriez
$actions.robot_haul (from, to, what) - pick up as much <what> from <from> and then unload it at <to>.
$actions.robot_fuel (from,to,fuel,factory) - Retrieve some <fuel> from <from>, then head over to <to> and $actions.fuel <factory> with <fuel>.
$actions.robot_harvest (resource,starting_point) - After travelling to <starting_point>, attempt to harvest resources until capacity is full. If no resources are found, wander the nearby squares and attempt to harvest.
$actions.robot_observe (location) - The robot will return a live stream of it’s room at <location>.
Robots are your friend. Robots are made of metal and gears and circuits, and each robot can help you and be your friend. Robots are made by the National Robotics Insitute and they love people and can help them a lot!!! Let’s talk about the ways a robot could help you today, <DESIGNATOR-444456y>
$actions.robot_patrol - patrol between a set of 4 (?) points, attacking anything designated by the owner or a set of general criteriez
$actions.robot_haul (from, to, what) - pick up as much <what> from <from> and then unload it at <to>.
$actions.robot_fuel (from,to,fuel,factory) - Retrieve some <fuel> from <from>, then head over to <to> and $actions.fuel <factory> with <fuel>.
$actions.robot_harvest (resource,starting_point) - After travelling to <starting_point>, attempt to harvest resources until capacity is full. If no resources are found, wander the nearby squares and attempt to harvest.
$actions.robot_observe (location) - The robot will return a live stream of it’s room at <location>.
Labels:
c#,
moocode,
space colony moo,
wayfar 1444,
wayfar moo
Friday, May 13, 2011
Artificial intelligence underpinnings
Objects such as creatures, wildlife, NPCs, and items are stored on the server side using MOOcode. Living things, like NPCs and players execute a basic game loop known as a heartbeat. NPC AI can be created by returning the next action to execute based on the NPC's circumstances with a moocode verb called suggest_next_action. A few days ago I got the basic system for artificial intelligence in place, as such:
$creature - Creature is the most basic creature, and as such has the most basic AI. Other NPCs and wildlife derive from this creature and execute it's basic AI when their higher level AI is not busy. Creatures currently handle no AI whatsoever, since they are the basis for both players and NPCs.
$npc - NPC is the most basic non player creature. There are two derivatives, $robot and $wildlife. NPC AI first checks to see if the creature is both unarmed and contains a valid weapon. If so, the $actions.wield command is queued on the NPC. If all is well with our weapons, the NPC checks to see if it has a valid target, and if the target is in the same room. If so, the NPC will queue up an attack. If the creature is both equipped and not fighting, it will check if the creature wanders, and if so, roll dice to see how far and which direction the npc will walk, then queues $actions.walk on the npc.
$wildlife - wildlife is an extension of $npc that handles basic wildlife functions for creatures that are dynamically spawned and run around the world. It has three derivatives: herbivores, carnivores, and sentient (such as non-player humans). $wildlife:suggest_next_action handles the most basic wildlife problem: food. Depending on what the creature eats and how hungry it is, it will either hunt another critter down to eat, or forage for plant matter.
$creature - Creature is the most basic creature, and as such has the most basic AI. Other NPCs and wildlife derive from this creature and execute it's basic AI when their higher level AI is not busy. Creatures currently handle no AI whatsoever, since they are the basis for both players and NPCs.
$npc - NPC is the most basic non player creature. There are two derivatives, $robot and $wildlife. NPC AI first checks to see if the creature is both unarmed and contains a valid weapon. If so, the $actions.wield command is queued on the NPC. If all is well with our weapons, the NPC checks to see if it has a valid target, and if the target is in the same room. If so, the NPC will queue up an attack. If the creature is both equipped and not fighting, it will check if the creature wanders, and if so, roll dice to see how far and which direction the npc will walk, then queues $actions.walk on the npc.
$wildlife - wildlife is an extension of $npc that handles basic wildlife functions for creatures that are dynamically spawned and run around the world. It has three derivatives: herbivores, carnivores, and sentient (such as non-player humans). $wildlife:suggest_next_action handles the most basic wildlife problem: food. Depending on what the creature eats and how hungry it is, it will either hunt another critter down to eat, or forage for plant matter.
Tuesday, May 10, 2011
Another great procedural generation blog
Whilst googling around (brain froze on some biome additions I was making), I stumbled across another procedural generation blog you can scope here:
http://blog.arsanth.com/index.php/tag/procedural-generation/
http://blog.arsanth.com/index.php/tag/procedural-generation/
Subscribe to:
Posts (Atom)