Skip to content

Object DNA

Michael Wagner edited this page Oct 30, 2020 · 1 revision

The player and NPC characters abilities and attributes are determined by their DNA. When coming across a dead NPC the player has the choice to merge both their DNA strings to acquire new functionality or modify its existing ones.

The challenge now is to find a design that fulfils the following requirements:

  • simple representation of DNA, either as binary or hexadecimal string
  • contains information about attributes and skills (a.k.a. executable functions)
  • object core info e.g., not temporary attributes like position, can be encoded in DNA and DNA can be decoded into a the same object again
  • allow for emergence, maybe attributes influence skills etc.
  • low to no possibility of invalid genes
  • crossing of DNA strings of two characters to acquire new attributes/skills or improve current ones
  • avoiding or (maybe more interestingly) a possibility of mitigating dead-end mutations like inability to move

Building blocks and inter-dependencies

Group all attributes and skills into sense/process/actuate categories.

Sensing attributes and skills influence how the PC/NPC perceives the environment around it. This could be vision, hearing, touching etc. They could be ranged and melee sensors with possible attributes being range and accuracy.

Processing determines how the sensor input is used to generate actions. This is most likely only relevant to the artificial intelligence.

Actuation describes all possible ways for a PC/NPC to interact with the environment and itself. This could be ways of moving through the world e.g., flying, walking, jumping or attacks, inspection and whatever else.

Pros:

  • potentially enormous amount of attribute-skill combinations
  • feels more generic and rich in variety

Cons:

  • difficult to balance
  • need to find meaningful inter-dependencies between attributes/skills of different categories

Outline

Sensors

Sensors are basically filters to what an individual can perceive from its surrounding.

relevant attributes

  • range

relevant actions

  • get all objects
  • get terrain

Processor

Processors build decision trees that an individual follows to find out which action to execute every turn. NOTE: This would be most relevant to the AI. How can processors be useful for the player?

relevant attributes

  • tbd

relevant actions

  • tbd

Actuator

Actuators allow objects to interact with their environment. They can be considered as leaves of the decision tree as well.

relevant attributes:

  • velocity
  • power
  • health
  • defense

relevant actions:

  • move target {self | other object} to tile
  • destroy tile
  • fix tile
Clone this wiki locally