Tribes expansion 2014

From PSwiki
Revision as of 01:13, 16 February 2015 by Talad (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

(Go back to the main GSoC 2015 page)

tribes.png


Skills needed

Our server and client are all coded in C++ and the database is MySql. For this project C++ knowledge is needed with some knowledge of mysql.

Current status

Please read the main Tribes concept document. This document outlines the concept behind tribes implementation in PlaneShift. The Tribe where updated as part of GSoC 2011.

You can see Tribe Scripting and Tribe Design for description of the current implementation. Essential to understand tribes is to understand the NPC members and the NPC Scripting and NPCType Design.

What's missing

Behaviour:

Keep a list of goals with priorities. The goal with the highest priority will be executed. After successful completion of a goal this priority will be lowered, so other goals will be executed. Possible goals for now are:

  • Mate / grow in number (done)
  • Build/enhance village size or quality (partly)
  • Gain wealth (done)
  • Expand non aggressively (if other tribes are found, they stop) (not done)
  • Expand aggressively (if other tribes are found, attack) (not done)

In addition:

  • Be able to evaluate what’s needed to accomplish a goal, splitting it into subtasks.
  • Be able to give the subtasks to members to achieve the goal. For example if goal is grow in number, it should send input to members to seek food, then to build houses, then to mate.
  • Execute some random actions like sitting down for resting, looking around, waiting few seconds.
  • React to other NPCs nearby and stop walking to look at the nearby creature (just for few seconds, then restart walking).

Artificial intelligence in collecting materials:

  • Building materials – required by the tribe to support expansion, a small population can survive without the need for a distinguishable home but a large one cannot.
  • Raw materials – used by the tribe to craft and trade allowing it to actively participate in the economy, increase wealth, tools quality, weapons. These are the actions needed for NPC to use natural resources:
  • Dig or search for resources along the movement paths (Done)
  • Know which tool is needed for digging/harvesting (Not done)
  • Remember a location when they find a resource (Done)
  • See objects that lie on the ground, so can be picked up and used (Done)

Building villages

This is the most important part of the tribe system. The tribe should be able to :

  • Keep a list of houses/buildings which can be created by the tribe (Not done)
  • Keep a cost associated to the creation of each building and the resources needed (Not done)
  • Have a function associated to each building, which can be house for sleeping, or can be a forge to make items, or a well to get water, or storage building to store tribe wealth. (Not done)
  • Be able to build and spawn houses/buildings in a predefined area. (Done)
  • Keep a list of houses/buildings which are owned by the tribe (Partly)
  • Use those buildings for their primary function (Only done for sleeping)

Building caves

Tribes should be able to dig the ground/walls and build caves. They can then use those areas to live and to hunt.

  • Keep a list of building blocks the tribe can use to create the dungeon (Not done)
  • Use the autogenerated dungeon function to generate the caves (Not done)
  • know the cost in terms of resources (Not done)
  • know the time needed to create each block (Not done)
  • spawn one block or multiple blocks (Not done)

Development

Operations

Operations are the base unit from NPCs which behaviors and ultimately, tribes, are built. The full list of operations is currently available on this page. The current operations set suffices for now but might be a subject to change if, while developing, we realize we can't make our actors do certain actions.

Behaviors

Described here, behaviors are the set of operations that governs the life of an npc. The only changes this expansion requires is to populate the db with more behaviors that correspond to types of tribes. (discussed more below, on Tribal Object)

Reactions

Reactions are certain world events triggered by NPC Perceptions. The before-mentioned list of perceptions is also a subject to change, based on the needs encountered. Besides the possibility of populating the perception list, there is no technical issue to be addressed on Reactions.

Recipes

This is the fundamental building block for tribes. Better scheduling and ways to keep multiple objectives active should be implemented. Together with the Tribe Object this is where the main work would be.

Tribe Object

The tribe object keeps all states, information of the tribe, and all memories the tribe has collected. The recipes, behavior, and operations all interact with the tribe object either directly or through the NPC. As new functions are added to the recipe handling supporting functions are expected to be needed in the Tribe Object.

Additional ideas