Item System

Item System Class Diagram

Piles

Item Creation System

Parametrized Building Blocks

Item structure

Materials

Shape

Functions

Special Item Types

How to handle these?

Attaching Items Together

Handling Attached Items / Compound Items(?)

Attachment Properties

Attachment Types

Rigid Attachments

Joints

Elastic Attachment

Sliding Attachments

Gravity or other force and friction keeping two items together

Functions

Containtment

Items inside other items, bags, stomach, basket, bottle, pressurized vat, space ship.

Shaping Items

Altering Item Properties

Special Item Shapes

1D items

Rope, string, etc. Consists of many segments in a sequence. Can be rolled up to a normal item. Can be unrolled, tied to other items or ropes at any point.

Some properties:

2D Items

Canvas, etc. Not supported. Instead, sails, balloons, clothes, etc are normal items. This way we can code in things like reaction to wind or fillable with gas manually, instead of coming up with a system that is complex enough that it could simulate the building and working of a warm air balloon. Easier for players too, working with more comfortable sized components.

Animation of reaction to wind etc might be supported though? Flags, billowing sail(?), clothes, hair, etc. Might not affect game physics, though. Perhaps in the future.

3D Items

Normal items are 'solid 3D items'. But it could also be possible to have non-solid 3D items. For example, squichy / elastic items (bouncy giant mushrooms, whatever). These are different from fluids, because they still consist of a latticework of elastic strings connected to each other.

Stuff

We need to also be able to handle materials such as rock, clay, soil, sand, water, and gas in the environment and in containers. These can also be mixed together if put in the same container, or dropped close by. Gases & liquids mix easier than powders & pastes, solid stuff doesn't mix.

Solids

Such as rock. These are relatively simple, if they have been extracted from the ground they are just stone boulder / block / pebble / etc shaped items of the material. So these are just normal items, and those we already can handle.

Pastes

Clay, honey, etc.
These have no fixed shape, but they still tend to stick together in one clump, unles divided. A special stuff item shape can be used to make an item that is made from some paste. The material specifies how runny etc it is, and the shape adjusts itself to the ground if dropped. Difficult to carry in the hands if the volume exceeds that of what the hands can carry... that observation might be generalized. Containers that are water proof have no problems, and can hold up to their volume.

Powders

Soil, sand, sugar, flour, small pebbles(?), berries(?).
These range in size from a few cm to very small grains. I'm not sure if we should include stuff where an individual grain can be candled separately.. Perhaps that should be split out into an own category, or just be handled by pile objects?
These need powder proof containers. They scatter more or less easily in the wind. when dropped on ground forms a heap/pile(?). When lots dropped, forms a ground layer.

Liquids

Water, blood, syrup, Green Slime, etc.
Need liquidproo container. When dropped on ground, spreads out into a pool. When lots dropped, forms a liquid layer, and runs downhill. The ground also absorbs some amount of liquids per time unit, and they might dry, etc.

Gases

Need air-tight container. When released, forms a cloud, that disperses more or less fast. Either sinks to the ground and spreads out, or rises up and spreads out, or just spreads out. Can have effects on things, so kept track of, until it is sufficiently thin.