The attributes are accessed using accessor functions. Accessors can be used to add archetypes etc.
An action is an event that happens in the world. Action can access and modify the state of the world.
An entity is active it has some tasks that are running. An active entity is an actor.
Actors are entities that have some task running. Actors can be characters, active items or daemons.
The world map is constructed from areas. Areas can have sub-areas, so they form an area tree. Some areas are obstacles, some are just grass or other ground areas and some are entities.
Archetypes include attributes that are shared by a group of actors.
Attribute is a piece of knowledge that tells something about an entity. Entities can have attributes like weight, dexterity or hit points.
One of the most important elements in RPGs are battles. There are several different ways to implement battles that have been used in computer games. I'll call these ways battle modes.
Bodies are areas that represent entities on the world map.
In Hissim, buildings have two roles: people can live at them and people can work at them. In the graphics engine, a building needs to have two graphical modes, one for when the player is outside a building, and one for inside. Another possibility is that the door is a portal and the insides of a building are in a separate area.
Characters are actors like animals, NPCs or players. Player characters also have tasks and plans to control them.
Collision detection is needed to implement obstacles.
Community is a town, village or other group of people located in a same area. Hissim can generate communities from a seed population and parameters that control how the people in the communities act.
Continuous behaviour is an attribute that depends on the state of the world, for example time. A task can maintain a continuous behaviour.
Country owns communities and has citizens. Countries can have wars between each other.
Daemons are actors that do not have bodies.
In ecology, we have communities of animals or plants. We could simulate them just like communities of people. Another possibility is to use more simple simulation for them.
An object in the game: character, item or building.
Actors can communicate by sending events.
In the map editor, grid can be used to place areas like in tile based games.
Hissim can generate population for the world. Because Hissim simulates everything, it can also generate relationships and family histories. With Hissim it's possible to have special attributes that might have caused special events in past.
Interactive tasks are tasks that send and receive events with other actors.
Items are entities like money, swords or food. Items like bread can be splat to two breads. To implement this, materials are needed.
World simulation can have several levels of detail. When the player is in a community, it can run on normal level of detail. When player is outside the community, it can run forward with less details.
In linear logic, we have resources that can be used only once. Because of this, linear logic is suitable for planning.
Hissim generates a life story for every character. This include events like birth, marriage, getting children, moving and changing jobs.
In Hissim, the lifestyle includes the attributes that control the behaviour of a person.
Logic is used for knowledge representation and symbolic reasoning in AI.
The actors need knowledge to determine what they should do. Some actors might be able to get knowledge from the world directly. Some knowledge might be stored into an internal, reflected world. Structured and complex knowledge can be stored as logical formulas. With logical formulas, also the reasons why an actor knows a formula can be stored.
The map includes all the areas in the world or a community.
The Map Editor can be used to edit maps and animations.
An item can have an amount of material. When an item is splat, the amount of material is still same.
Monads represent computations. Both actions and tasks can be seen as computations. So both are monads.
Non-player characters are characters fully controlled by the computer.
Passive entities are entities that do not have any tasks. Items are usually passive.
Plans are internal objects that control the behaviour of characters. Plans are generated by tasks. A plan can include tasks. When these tasks are executed, they extend or replace the current task. For example the task a >>> fun x -> b first plans the task a. Then it generates a plan that first runs the plan generated by a, then plans the task b and finally runs the plan generated by b.
When a plan is running, it uses actions to modify the world. Planning is also an action: it is an event that happens in the world.
The task system is good for describing how the NPC should act, but not for describing what it should do. For mimicking rational behaviour, some knowledge about the world is needed. Some logic can be used to represent knowledge and reason about that knowledge. Then NPCs can generate plans to achieve their goals.
When a portal area is triggered, it moves an actor to another place.
When an actor has two plans that should be executed at the same time, it has to select one of them -- the one with larger priority. For example task priority (pass 10.0) task generates a plan that has constant priority 10.0.
One of the attributes the person in Hissim have is profession. Profession determines where a person can work. Profession can also affect the lifestyle in other ways. In the town simulator, profession determines the tasks a person has when at work.
The characters belong to different races. In Hissim, the most important function of races is that two persons belonging to different races cannot have children.
An advantage of handling the world functionally is that every NPC can have it's own light internal world. In this world, the NPC can store it's knowledge about the world and other actors. The world can also be used to store information about archetypes. Using the tasks from an archetypes, the actor can take a role associated with the archetype.
This world can also be used for simulation, just like the main world. An NPC might run his internal world forward when planning some actions. Because of the level of detail system it should be also possible to plan a long time forward. Someday NPCs might be able to tell stories about some events. Then reflection could be used by other NPCs to see if the stories make any sense.
The games are written using scripting. There are several kinds of scripting:
Both Hissim and the town simulator can be used to simulate the world. Also the task engine simulates the actors.
An important feature in computer role playing games is the predefined, possibly non-linear, story. The task system above doesn't support stories directly, it can only be used to script one entity at once. So some more support for stories is needed on top of the normal scripting system. Another possibility is that the story is not predefined. Then a planning system can be used to invent events that help players to achieve their goals.
A task tells a character how it should act. The task has two parts: generating a plan and then executing it.
A template area has empty subareas that can be replaced by other areas. This can be used in town generation for example. Houses might have placeholders for furniture and inhabitants.
Areas can have triggers associated with them. When an area intersects with another, an action is triggered.
Town generator can use Hissim generated or handwritten data. The data includes buildings with inhabitants. Also items and other objects are needed. Then the generator places the buildings and connects them with a road network. Towngen can also add trees, stones and other obstacles. When the town data is exported from Hissim, it is also possible to add possessions for persons.
Town simulator will use the data structures of town generator to simulate a town in a level of detail that is higher than Hissim but lower than normal game level. It uses the scripting system described above. This simulator should run fast enough so that it can be determined if economy is balanced or not. Most features of the town simulator can be added easily to the game engine, just the low level tasks change.
The world includes the map and the actors.
The first phase in world generation is planning the races and the history of the world. Based on this plan, a Hissim script can be written. Then Hissim can execute the script and generate the population in the world. For the game, the Hissim data is not enough. The town generator takes a community and determines places for the buildings and connects the buildings with roads. It also adds items for persons and buildings. A map can be now generated. The map uses some predefined elements that can be built using the map editor. Also the resulting map can be edited with the map editor.
Last modified: Friday, January 9, 2004