Skip to content

Instantly share code, notes, and snippets.

@rdococ
rdococ / jevil.lua
Created July 9, 2024 00:23
jevil but it's a tpt energy particle
local elem, sim = elements, sim
local random, floor, min, max, sin, cos, atan2, sqrt, abs, ceil, exp = math.random, math.floor, math.min, math.max, math.sin, math.cos, math.atan2, math.sqrt, math.abs, math.ceil, math.exp
local pi = math.pi
local unpack = unpack
local partCreate, partProp, partKill, partExists, partChangeType = sim.partCreate, sim.partProperty, sim.partKill, sim.partExists, sim.partChangeType
local neighbors = sim.neighbors
local JEVL = elem.allocate("rdococ", "jevl")
elem.element(JEVL, elem.element(elem.DEFAULT_PT_ELEC))
@rdococ
rdococ / mirrortale.md
Created May 17, 2024 22:00
MirrorTale chatgpt generated au

Undertale AU: "MirrorTale"

Premise: In "MirrorTale," the Underground is a world where everything and everyone has a mirror counterpart. These counterparts are reflections of the original characters but with opposite personalities and roles. The protagonist, Frisk, must navigate this mirrored world, uncovering the truth behind the reflections and striving to bring balance between the two realities.

Key Differences:

  1. Setting:
    • The Underground is a vibrant, colorful world full of light and energy, in contrast to the original's darker and more somber tones.
  • Instead of being trapped underground, the monsters live in a series of sky islands, suspended in the clouds.
@rdococ
rdococ / logic-circuits.lua
Last active May 2, 2025 17:49
Instant logic circuits for TPT
--[[
Logic Circuits v2
32-bit logic wires and gates!
v2:
* 32-bit logic
* Recalculate values only on change
* Bug fixes
]]
@rdococ
rdococ / mvsd.lua
Last active May 21, 2024 12:30
moving solids
--[[
Moving Solids v0.9
- Convex & concave destructible rigidbodies
- High jank
- Objects currently don't respect undo, and save rather poorly :( (though I have some ideas for how to make it work)
]]
local drawLine, drawPixel, fillRect = graphics.drawLine, graphics.drawPixel, graphics.fillRect
local rand = math.random
NOTE: This might not be accurate. I am currently going through the diagnosis process for ADHD, and self-reflection and observation of my
own symptoms has led me to believe I may not have had autism in the first place. I may be a victim of misdiagnosis, not autism
glorification. However, some other autists do seem to feel the same as I did, so the 'PSA' remains for now.
Autism isn't an identity, it's a mental disorder that causes unnecessary suffering to millions of people across the globe.
Even those with otherwise high functioning struggle day to day with maintaining their mental state and engaging in communication
& lateral thinking.
If you have a form of autism that has no effect on your life besides a quirky personality, good for you. But that's not the case for
the majority of autists, and we're all too busy trying to juggle sensory overloads, meltdowns and attempting to function as well as
@rdococ
rdococ / chickens.lua
Last active April 9, 2024 11:12
Chickens for TPT
--[[
Chickens
yeah this script is stupid but i love it
]]
local elem, sim = elements, sim
local random, floor, min, max, sin, cos, atan2, sqrt, abs, ceil, exp = math.random, math.floor, math.min, math.max, math.sin, math.cos, math.atan2, math.sqrt, math.abs, math.ceil, math.exp
local pi = math.pi
local unpack = unpack
@rdococ
rdococ / dirt.lua
Last active April 9, 2024 11:12
I think someone eats this
--[[
Dirt v4
It's... dirt. And a few related elements.
v4:
- Added FIRT
- DIRT falling into water now separates into CLST & SLCN
v3:
- Heat dries DIRT
@rdococ
rdococ / exotic_particles.lua
Last active January 22, 2025 13:33
Exotic Particles for TPT
--[[
Exotic Particles v12
==
Several elements based on extreme and/or hypothetical states of matter.
Elements
=
- HIGS
Higgs bosons. Generate pressure, "condenses" tachyons into more HIGS.
@rdococ
rdococ / tachyons.lua
Last active November 22, 2023 02:30
Tachyons in TPT
--[[Tachyons v0.27
= How it works =
1. Track all the tachyons and negatachyons in the current frame.
2. If any tachyons are created, rewind the game, reconstructing the tachyon on every frame to determine its time-reversed trajectory.
3. Once all tachyons are destroyed, let the simulation run forwards again, constructing negatachyons when and where the tachyons were destroyed.
4. Once the game catches back up, if any negatachyons can't trace their trajectory to a tachyon, rewind to erase them from the timeline.
= Notes =
- Tachyon/negatachyon pairs are detected leniently in an attempt to prevent false positives. When a negatachyon dies, it must be within line of sight of a tachyon created at the exact same position as itself.
@rdococ
rdococ / alchemistry.lua
Last active January 19, 2024 21:38
Lua mod for TPT adding several alchemical substances
--[[
Alchemistry v7
This mod is all things antiquity. Includes various acids, powders and organic substances using their historical names and believed reactions from the time. Things you can do:
- Craft several acids from 'green vitriol'
- Boil acids to precipitate dissolved substances
- Dissolve gold
- Transmute iron to silver, and silver to gold
- Manufacture gunpowder
- Craft poultices that heal STKM and destroy VIRS