Welcome to the Creatures Wiki! Log in and join the community.

Difference between revisions of "CAOS"

From Creatures Wiki
Jump to navigation Jump to search
(→‎External links: - Adding CAOS Chaos)
(add Category:CAOS [surprised it wasn't in already . . .])
Line 25: Line 25:
*[http://www.gamewaredevelopment.co.uk/cdn/cdn_more.php?CDN_article_id=112 Getting Started with CAOS - C3/DS]
*[http://www.gamewaredevelopment.co.uk/cdn/cdn_more.php?CDN_article_id=112 Getting Started with CAOS - C3/DS]
*[http://www.edash.net/members/caos_chaos.php AquaShee's CAOS Chaos - C3/DS]
*[http://www.edash.net/members/caos_chaos.php AquaShee's CAOS Chaos - C3/DS]

Revision as of 00:22, 29 January 2005


CAOS is the generic name for the embedded scripting language used in all games in the Creatures series. Note that the details of CAOS vary from engine to engine, but all incarnations have some overarching similarities. CAOS is used to make objects such as COBs or agents, and even controls breeding patterns - there are many tutorials (see External Links) which can help you to learn the CAOS language.

CAOS is a register-based language, with a set of opcodes with fixed argument lists. Local variables are not supported. The basic unit of CAOS code is the command which can be injected and executed by the engine. However, CAOS is mostly used in scripts, blocks of code identified by four integers - three identifying the object for which the script applies (0 may be used as a wildcard), and one identifying the event the script triggers on. Those are the backbone of the actual game, declaring the different forms of interactions between the different agents (a term for the programming objects introduced with Creatures 3 - every gadget or even creature in the world is an agent) by defining actions to be taken when certain events happen (from time triggered ones to collisions with other objects or even clicks). Each script may contain subroutines, however as they cannot be shared and do not have local variables, they are little more than a convenience.

CAOS scripts have 100 registers of the form VAxx to use to hold temporary variables. In addition, an object may be selected into the special register TARG, and then 100 attributes of the object may be accessed with registers of the form OVxx. In most cases an object must be selected into TARG before it is acted upon.

Note that while Creatures and Creatures 2, for performance reasons, use unsigned bytes (0-255) as integer types, latter versions of the engine utilize floating point numbers (eg: 3.141592).

History of CAOS versions

External links