Complete Electronics Tutorial
This page is currently a work in progress.
The goal of this page is to be a complete electronics tutorial for new players and seasoned ones who want to learn more about electronics, and to replace the existing electronics tutorial that has not been updated since 2011.
Contents
Intro to Electronics
This section is primarily for new players, so if you already know about the basics of electricity, SWCH, WIFI, and INST, you can skip ahead to the next section.
Basics of Electricity in TPT
How SPRK Works
SPRK, found in the electronics menu, is the basis of all electronics in TPT. SPRK is an indestructible solid that cannot be placed, but it can be "drawn" on to metals and conductive elements. SPRK will transfer itself to any conductive elements within 2 pixels. This allows SPRK to move along conductive elements, which include all metals, WATR and SLTW, MERC, and QRTZ (when under pressure). As seen below, different conductors (METL, GOLD, WATR, and SLTW) conduct at different speeds.
Technical Details
When a conductive element is sparked, it is replaced with SPRK and the ctype of the SPRK is set to that element. The life of the SPRK is set to 4 and when it reaches 0, the SPRK will replace itself with its ctype, allowing it to turn back into the original element.
Basic Conductors
The most basic conductors are METL, PSCN, and NSCN, which are found in the electronics menu. These are what you will use most of the time to transfer electricity. METL conducts to both PSCN and NSCN, and both PSCN and NSCN conduct to metal, as demonstrated below.
However, things get a bit complicated. While PSCN conducts to both METL and NSCN, NSCN cannot conduct to PSCN.
This behavior can be used to make a diode, which allows electricity to flow only one way.
Using BTRY
BTRY is an element that can be used to constantly spark any conductor. Simply place one pixel of it and it will work.
Using INSL
Another useful electronic element is INSL, which completely blocks heat and electricity. This can be used to prevent SPRK from jumping over a 1-pixel gap.
Using SWCH to Control Electronics
SWCH is an element that is used to control the flow of electricity by turning it on and off. SWCH is turned on and off by PSCN and NSCN, like many other powered elements you will learn about later, and conducts to and from METL.
Using WIFI to Transfer Electricity
WIFI makes it easy to transfer electricity instantly over long distances instead of using long wires. WIFI takes electricity from METL and only conducts to NSCN. After placing a pixel of WIFI (it must be used in single pixels), you have to set the channel. WIFI has 100 temperature-dependent channels located every 100 degrees, which can be set manually using the PROP tool, but the recommended way is to use jacob1's Set WIFI script found in the Script Manager. This useful tool simply asks you to input the channel number and sets it for you. As seen in the picture, WIFI's color is dependent on its channel.
Using INST
INST is another way to transfer electricity instantly over long distances, but in the form of a wire. Unlike other conductive elements, INST can only take electricity from PSCN and can only conduct to NSCN. It can not conduct to itself over 1-pixel gaps, and it can cross over itself freely, making it possibly one of the most useful electronic elements.
Basic ARAY Usage
ARAY Basics
ARAY is an element that allows another way of transferring electricity over a long distance, and it is also the fastest conductor in the game. Unlike other electronic elements, it must be triggered by an adjacent conductor, which must be METL, PSCN (which will be covered later), or INST. When triggered, it emits a line of BRAY (a hidden solid element) that fades away after 30 frames. If this BRAY hits a conductor, it will spark it.
If 2 of these BRAY rays collide, it will create a "point" of BRAY that lasts for 1020 frames.
ARAY allows conductors to be sparked from a distance and aids in making electronic devices more compact and faster.
Useful ARAY Tricks
Using ARAY with SWCH
Along with switching electricity on and off, SWCH can also be used to control BRAY. When SWCH is on, BRAY can freely pass through, but when it is off, BRAY is blocked.
Using ARAY with FILT
FILT can be used to remove the 30-frame delay when firing ARAY, making it the fastest way to conduct electricity. Simply draw FILT where the BRAY beam will be, and use the ARAY. BRAY will disappear instantly inside FILT, and beams can intersect without creating points. BRAY that passes through FILT will be tinted the color of the FILT.
Using ARAY with INST
One more useful feature of ARAY is that if it is triggered with INST, the BRAY beam will pass through multiple conductors.
Using PTCT and NTCT To Make Logic Gates
PTCT/NTCT Basics
PTCT and NTCT are elements found in the electronics menu that conduct electricity based on how hot they are. PTCT only conducts when cold (<100 degrees) and NTCT only conducts when hot (>100 degrees). The easiest way to heat them is to spark a pixel of METL placed 1 pixel away, as METL gradually heats up when sparked.
The image below shows PTCT (bottom) and NTCT (top) in action.
Logic Gates
If you are new to TPT and electronic engineering, you might be wondering what logic gates are. Logic gates are electronic devices that create an output based on inputs they receive. They work the same way in real-life electronic circuits and in TPT. Every basic logic gate has 2 inputs (with the exception of the NOT gate) and 1 output. Both the inputs and the output can be one of two states: ON and OFF, HIGH and LOW, or 1 and 0. In TPT, ON/HIGH/1 means that the output is sparked and OFF/LOW/0 means that it is not sparked. This tutorial will use HIGH and LOW.
While PTCT and NTCT can be used to make logic gates, they have mostly been replaced by much faster logic gates made using advanced ARAY techniques, which you will learn about later. However, it is still a good idea to learn how PTCT/NTCT logic works, because you might see it when looking at older electronics saves.
OR Gates
An OR gate is a logic gate that will output HIGH if either of its inputs or both of its inputs are HIGH and the easiest to make in TPT as it consists of 2 diodes with the output connected together.
AND Gates
An AND gate will only output HIGH when both of its inputs are HIGH. It is the easiest-to-understand logic gate using the old technology.
XOR Gates
A XOR gate (eXclusive OR) will only output HIGH if one of its inputs is HIGH (not both). It is one of the more complicated gates to create at a small size in TPT, but luckily someone has already done that for you.
Useful Electronic Devices
Making a Shift Register
Making a Ring Counter
Making a Binary Counter
Making SWCH Memory
Using Powered Elements
Using DLAY
Using FRAY
Using STOR
Using LCRY
Using Sensors
There are 3 sensors in TPT which are all found in the sensors menu. They are DTEC, which sparks any nearby conductors if it detects a particle of its ctype, TSNS, which sparks any nearby conductors if it is touching a particle with a temperature higher than its own, and PSNS, which sparks any nearby conductors when the pressure is higher than its temperature.
Using Other Elements
PUMP and GPMP
PUMP and GPMP are powered elements that are activated with PSCN and deactivated with NSCN. PUMP will create pressure equal to its temperature and GPMP will create gravity equal to its temperature (Newtonian Gravity must be enabled.)
HSWC
HSWC is a powered element that is active by PSCN and deactivated by NSCN. When turned off it does not conduct heat, but when turned on it conducts heat quickly.
PCLN/PBCN/PVOD
These are all powered elements activated by PSCN and deactivated by NSCN that act as CLNE, BCLN, and VOID when turned on.