── i ─ Legal ──────────────── Copyright (C) @Maarten_ 2022-present Provide credit as described in Scratch guidelines §4.3 https://scratch.mit.edu/community_guidelines ── ii ─ Turbowarp ───────────── https://turbowarp.org/712512208/ ── 0 ─ Index ──────────────── 1. Glossary 2. Description 3. Limitations 4. Uses 5. Tags ── 1 ─ Glossary ───────────── System - Internal system related functions/data Memory - Internal project memory CloneAllocations - Pointers to the clone's memory region (malloc) Malloc - Allocate a block of memory with specified size Frametime - How much time in ms taken to perform a single frame OperationCount - Amount of operations per frame required to meet demand for running this on each clone Clone - Clone related functions/data VisionStep - How far to move each step forward from entity VisionResolution - Denseness in pixels horizontal from field of view VisionRange - Amount of pixels vertical from field of view VisionFOV - Field of view of entity Walls - Walls engine related HitboxData - Data used for hitbox calculation RenderData - Data used for quick rendering of walls ── 2 ─ Description ──────────── Creates 8 clones, each with their respective memory of 10 cells. Each clone creates a view based on the settings, able to be changed using the slider variables. This view detects using a distance algorithm whether it is 'touching' another entity, other than itself. It now also detects whether a wall is in its view. When it touches, it temporarily changes the pen colour to red to signify this. The view also detects whether it is at the edge of the Scratch field. It then stops with continuing the line, causing a significant performance boost. ── 3 ─ Limitations ──────────── Amount of operations required are a lot, especially with many entities at the same time. To fix this, consider lowering any setting that might affect performance. The variable updating this number, and its mathematical equation calculating it, can be found inside the editor. Performance can also be further optimised based on your use-case! ── 4 ─ Uses ──────────────── It is encouraged to view the source code by clicking “see inside”. You might want to make a shooter game with bots that detect using vision, and if it detects a player, attempts to move to them. In such use-case, the engine can be further optimised* to stop the view whenever it detects a player, to prevent doing further useless operations. * If your game has multiple players you could detect the closest, and stop detecting behind a player, preserving detection range. ── 5 ─ Tags ────────────────