Login

Fancade Wiki

Updated Script Limit.md (markdown)

... ...
@@ -8,7 +8,11 @@ Fancade has a hard script limit. After a certain number of scripts in the editor
8 8
[[/uploads/Screenshot_20210609-094759_Fancade.png]]
9 9
10 10
### Optimized Scripting
11
- For the most ambitious of projects script limit has proven itself to be the greatest wall, leaving the very same projects abandoned, scrapped or just barely hanging on the limit unable to get new game features and mechanics. In Fancade 1.11.3 however, "Optimized Scripting" feature has been introduced, significantly reducing script limit usage and effectively giving more freedom in coding complex games (further explanation is given later at this page).
11
- For the most ambitious of projects script limit has proven itself to be the greatest wall, leaving the very same projects abandoned, scrapped or just barely hanging on the limit unable to get new game features and mechanics. In Fancade 1.11.3 however, "Optimized Scripting" feature has been introduced, significantly reducing script limit usage and effectively giving more freedom in coding complex games. With this feature only the first instance of the custom block put into the level counts every script inside it towards the script limit, the additional instances of the block then contributes only 1 point each to the script limit.
12
13
[[/uploads/optimized-scripting-demonstration.jpg]]
14
* As you can see in the first picture the script consumes about 5% script limit. The second picture then shows that 2 instances of the same script still consumes about 5% of the script limit rather than 10% of it.
15
12 16
13 17
# Technical Details
14 18
The introduction of advanced inspect allowed for more robust testing, which helped in discovering some key insights regarding the elusive script limit. Among those, Andrew Clark's discoveries were crucial for our current understanding of it.
... ...
@@ -19,7 +23,6 @@ The limit is 4096. The value doesn't matter as much as how you decide to use the
19 23
* [Script Blocks](https://www.fancade.com/wiki/Script/Script%20Limit.md#script-blocks)
20 24
* [Wire Splits](https://www.fancade.com/wiki/Script/Script%20Limit.md#wire-splits)
21 25
* [Pointer Dereferencing](https://www.fancade.com/wiki/Script/Script%20Limit.md#pointer-dereferencing)
22
* [Optimized Scripting](https://www.fancade.com/wiki/Script/Script%20Limit.md#optimized-scripting2)
23 26
24 27
### Script Blocks
25 28
Every script block counts as 1 script towards the total limit. It does not matter which script block it is, as long as it is an inbuilt script block, it adds 1 to the counter. The attached image has 4 script blocks, thus the script consumption is 4/4096 or roughly 0.1%.
... ...
@@ -51,13 +54,6 @@ Known script blocks that output a pointer are all the Get Variable and List Elem
51 54
Known script blocks that accept a pointer as input are the Variable inputs of the List Element blocks, the Variable input of the Menu Item block and, increment and decrement block.
52 55
![Pointer in](https://media.discordapp.net/attachments/852037487987392529/855655587852451840/Screenshot_20210619-091908_Fancade.png)
53 56
54
### Optmized Scripting
55
Fancade 1.11.3 introduced the "optimized scripting" feature,
56
now with this feature only the first instance of the custom block put into the world counts every script inside it towards the script limit, the additional instances of the block then contributes only 1 point each to the script limit.
57
58
[[/uploads/optimized-scripting-demonstration.jpg]]
59
* As you can see in the first picture the script consumes about 5% script limit. The second picture then shows that 2 instances of the same script still consumes about 5% of the script limit rather than 10% of it.
60
61 57
## Tips
62 58
Here are some general tips to conserve the limit as much as possible.
63 59
Fancade Wiki