Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 3.04 KB

world.md

File metadata and controls

36 lines (24 loc) · 3.04 KB
description
The World, the place where all Entities live.

World

The world stores all its entities, it contains methods to create, destroy and query them and handles all the internal mechanics. Therefore it is the most important class, you will use the world heavily. Time to play God.

Lifecycle

var world = World.Create();  // Creating a world full of life
world.TrimExcess();          // Frees unused memory
world.Dispose();             // Clearing the world like God in the First Testament
World.Destroy(world);        // Doomsday

{% hint style="info" %} Multiple worlds can be used in parallel, each instance and its entities are completely encapsulated from other worlds {% endhint %}

Best of all, you can create any number of worlds with almost infinite entities. You rarely have so much life and freedom. To be precise,2,147,483,647 worlds with 2,147,483,647 entities each are possible.

Good to know

Now we have a world. A world with all the prerequisites for creating life, changing it and destroying it.

The world has the rudimentary methods on which everything in Arch is based. If you only want to work with them, this is possible and offers one less level of abstraction.

{% hint style="info" %} As an alternative, you can also work ONLY with the world. Without abstraction of entities and co. This principle is called PURE_ECS and will be looked at later. The following documentation refers further to the abstracted entity API. {% endhint %}

Lifecycle ManagementCreating and destroying Entities. entity.md
Structural ChangesAdding/Removing components on Entitiesentity.md
Modification Accessing and modifying components on Entities.entity.md
EnumerationEnumerating/Filtering/Matching Entities.query.md
Bulk/Batch OperationsExecuting operations on Entities in Bulk/Batches.batch-and-bulk.md
LowlevelWorking with Archetypes, Chunks and Entities directly without any wrappers. archetypes-and-chunks.md
MultithreadingAcessing the JobScheduler to run querys or your own Jobs in parallel. multithreading.md
And much more...Working with Events, the CommandBuffer or several other features directly!

We'll go into more detail later. But now enough talk, go on. Something is lurking behind the next bush.