Add compiler

This commit is contained in:
Asraelite 2024-05-17 18:37:51 +02:00
parent 476972f85a
commit 3f3125ef43
31 changed files with 2625 additions and 3 deletions

7
doc/lbp/general_tips.md Normal file
View file

@ -0,0 +1,7 @@
https://web.archive.org/web/20160324052734/http://www.lbpcentral.com/forums/showthread.php?92215-Tips-and-Tricks
Logic is counted TWICE on the thermo when sackboy is in the level so if you have a complicated chip, it might be best to use a sackbot. (I set the controliinator for that sackbot to a color channel as nearest player seems to lag for me in beta)
How to adjust the camera WHILE creating or moving stuff around: Pause, go to settings and in the bottom you'll see an option called ''Create'' There you'll find ''Touch create mode'' Then you can set it to ''Camera'' and be able to zoom and move the camera around, no matter what you're doing!
Faster travel in the editor: Use Oddsock or Swoop while creating, they're much faster at moving and hovering around ( Of course you'll need to change character to test in-editor )

63
doc/lbp/logic_research.md Normal file
View file

@ -0,0 +1,63 @@
(when a gate has multiple inputs, unless specified otherwise, the speed applies to all of the inputs)
# General
For multiple inputs, dependencies are evaluated by the order they appear on the gate, top to bottom.
# Selector
Cycle input is slow. It does not evaluate its dependencies early.
Other inputs are fast and behave as normal gates.
# Microchip
(with one input and no outputs)
All inputs fast
The activate input is checked before and independently of the regular inputs.
Other inputs are then checked top-to-bottom
Activation before other, older gates? No
With inner microchips and no inputs/outputs -> tag propogration is instant [microchip_activation_0]
# Sequencer
(with one input and no outputs)
All inputs fast
# Sackbot trick
Converting analog to digital with a sackbot is instant. It can be done multiple times per frame and occurs during the same phase as logic gates.
A sackbot uses about 1/250th of a thermometer (~4000 units). It has 16 inputs that can be used (~250 thermometer units per analog-to-digital conversion).
The output can be on for two frames instead of the expected one.
# Physics
Activating a destroyer and a tag on an object in the same frame causes the tag sensor to not activate.
# Non-terminal components
Timer: fast
Counter: fast
Toggle: fast
Randomiser: fast
Wave generator: fast
# Terminal components
Emitter: slow
Tag: slow
Mover: slow