How to write a World
See
Definitions for the basic terms:
- World
- Mind
- World type (World uses Minds or not)
Clone a World
The easiest way to write a World is often to
Clone an existing World that seems similar to what you want,
and then modify it.
New World: Choose World type and API
If you want to write a World from scratch, use:
Generate a new blank World.
You will need to make two choices:
- World type.
Should your World be controlled by a "Mind" or not?
A Mind is another program that takes "actions" in your World.
- World API.
An "API" is a collection of code and libraries that provides support for a particular type of World.
There are lots of pre-defined APIs. And you can roll your own.
If you clone an existing World, these decisions are made for you.
APIs
Each World defines the API it runs with.
The World home page links to its API.
Authors should examine the API page to see how to write for it.
Any Mind for the World will be running with this API.
New APIs will be added in the future. (For example, ones based on new graphics libraries.)
All old APIs will be kept, so that runs always work.
As far as possible, APIs are designed so that most parts are optional.
Authors can omit parts and, as far as possible, the program will still run.
See List of APIs currently installed.
A "tweaker's box"
Many of the
Starter Worlds
have something called a "tweaker's box".
This is a section at the top of the code
containing things that can be easily changed by a
non-programmer.
(What is below the "tweaker's box" will need programming skills to change.)
This concept encourages users to clone the World and make easy changes.
You might like to consider adding a "tweaker's box" to your own Worlds.