From a2a3731cdd3008740026b28efc65065254fda161 Mon Sep 17 00:00:00 2001
From: slweeb <91897291+slweeb@users.noreply.github.com>
Date: Sun, 11 Jan 2026 13:52:44 -0500
Subject: [PATCH] Version 1.13.2 - January 11, 2026
+ Edit Mode
~ Moved Special tools to the edit tab
~ Expect more tools in the future
+ Relations - Multiple pixels as a single entity
+ Group and Ungroup tool in edit tab
+ Grouped pixels fall and move as one structure
+ Grouped pixels are ungrouped when broken or changing states
+ Grouped pixels can displace fluids (Experimental)
+ More Shift-Select functionality:
+ Battery can set a frequency to create timers
+ Image tool can set element
~ Fire begins more yellow and gets redder quicker
+ Icing (Hidden) made with Butter and Sugar
~ Liquids and Gases appear less grainy
~ Settings changes
+ Speed option in Settings to replace TPS button
+ Keybind: T to change TPS
~ Renamed E button to Elem button
~ Improved simulation speeds
- Removed World Gen
~ We recommend the PRNGworldgenlib.js mod, a much better world generator
- Removed Cheerful Mode
[Changes]
+ Escape can be pressed to cancel while drawing a line
+ Fillers can be painted and will fight other colors
+ Portals show destination lines when hovered over or selected
+ Portal In can be selected with the Elem button by typing 'Portal'
+ Lightning placed near certain elements will change color
+ Worms can break down Flour, Dough, Adobe, Paper, Confetti, Cellulose, Cheese, and Potato
+ Worms can move through Mulch
+ Radiation will radiate Batter
+ Rad Steam causes Cheese to rot
~ Filters and Gates are Acid-resistant
~ Portals no longer teleport Fuse
~ Ruler measures diagonal lines as a pixel count instead of hypotenuse
~ Unique flame colors for Nickel, Iron, and Mercury
~ Rearranged Special category
~ Opening the Info, Mods, or Settings menus will pause the game
~ Steam: All canvas sizes now stretch to the full screen width
+ Assigned densities to many solids
+ Keybind: Quote (") to toggle Edit Mode
[Bug Fixes]
~ Fixed: Dragging pixels through Filters creates ghost pixels
~ Fixed: Filters can break when transporting to Gates or Pipes
~ Fixed: Pixels are rendered in incorrect position when mixing with Pipe, Filter, or Gate
~ Fixed: Broken modded saves are loaded every bootup
~ Fixed: Precision Dot is misaligned with 2- and 4-wide brushes
~ Fixed: Portals can't transmit electricity if surrounded by pixels
~ Fixed: E-cloner can't be set to Fuse by clicking on it
~ Fixed: Some saves throw TypeError "Cannot set properties of undefined"
~ Fixed: Prop tool always unpauses after dialog
~ Fixed: Z and Backspace keys select Heat by default instead of Sand
~ Fixed: Random can't place Fire, Plasma, Ink, Bless, Rock Wall, Cold Fire, Sun, Pointer, or Art
~ Fixed: Elem dialog doesn't close if button is pressed again
~ Fixed: Wrong font when language set to Italian
~ Fixed: Magnesium melts at a much lower temperature than expected
~ Fixed: Shift-selecting Random and inputting 'random' causes errors
[Technical]
~ Note: Optimizations mean a lot of code was rewritten, please report any issues and be patient
~ Note: Don't pass an 'rgba' color to drawSquare, use the 'alpha' argument instead
+ Pixel relations system
+ Used to group pixels together
+ '_r' pixel property to identify its relation (should be an integer)
+ 'trackPaint' element property (boolean)
+ 'painted' pixel property (color code) given to these elements when painted
+ "Failed to load" message instead of hanging forever
~ 'con' contents only render if element has existing 'canContain' property
~ 'onMouseDown' element event only triggers with left clicks
~ Acid Gas 'ignore' property is now identical to Acid
~ Elements with a set density but no state are set to solid
~ Fuse no longer shows hidden element
~ Save version is now sb7
---
archive.txt | 127 ++
changelog.html | 76 ++
changelog.txt | 74 ++
controls.html | 6 +-
controls.txt | 7 +-
index.html | 2382 ++++++++++++++++++++++----------------
lang/it.json | 2 +-
mods/PRNGworldgenlib.js | 8 +-
mods/classic_textures.js | 2 +
mods/devtests.js | 58 +
mods/glow.js | 19 +-
mods/survival.js | 2 +-
style.css | 25 +
13 files changed, 1759 insertions(+), 1029 deletions(-)
diff --git a/archive.txt b/archive.txt
index 1b97ab52..df7a3ee1 100644
--- a/archive.txt
+++ b/archive.txt
@@ -102,3 +102,130 @@
if (elements[key].breakInto[i]!==null && !elements[elements[key].breakInto]) { delete elements[key].breakInto; }
}
}
+
+
+
+
+
+let xstart = x-1;
+let ystart = y-1;
+let xsize = pixelSize3;
+let ysize = pixelSize3;
+if (!isEmpty(x-1, y)) {
+ xstart ++;
+ xsize -= pixelSize;
+}
+if (!isEmpty(x+1, y)) {
+ xsize -= pixelSize;
+}
+if (!isEmpty(x, y-1)) {
+ ystart ++;
+ ysize -= pixelSize;
+}
+if (!isEmpty(x, y+1)) {
+ ysize -= pixelSize;
+}
+
+ctx.fillRect(canvasCoord(xstart), canvasCoord(y), xsize, pixelSize);
+ctx.fillRect(canvasCoord(x), canvasCoord(ystart), pixelSize, ysize);
+
+
+
+if (Math.random() < 0.5) {
+let trapped = true;
+for (let i = 0; i < adjacentCoords.length; i++) {
+ const coord = adjacentCoords[i];
+ const x = pixel.x + coord[0];
+ const y = pixel.y + coord[1];
+ if (!(y > height-currentSaveData.border || y < currentSaveData.border || x > width-currentSaveData.border || x < currentSaveData.border) &&
+ (pixelMap[x][y] === undefined ||
+ elements[pixelMap[x][y].element].id !== info.id)
+ ) {
+ trapped = false;
+ break;
+ }
+}
+if (trapped === true) {
+ pixel.opti = pixelTicks;
+ return false;
+}
+}
+
+
+
+
+function worldGen(worldtype) {
+ var complexity = worldtype.complexity || 20;
+ var heightVariance = worldtype.heightVariance || 0.5;
+ var baseHeight = height-(height*(worldtype.baseHeight || 0.5));
+ var layers = worldtype.layers || {0:"rock"};
+ var yoffsets = generateTerrainHeights(width,heightVariance,complexity);
+ // 2D world vertical generator
+ for (var x = 0; x <= width; x++) {
+ var yoffset = yoffsets[x];
+ var worldHeight = baseHeight+yoffset;
+ for (var y = 0; y <= height; y++) {
+ // Change element type based on y, from grass > dirt > rock > basalt
+ if (y > worldHeight) {
+ // distance from the bottom of worldHeight
+ var frombottom = worldHeight-(y-worldHeight);
+ var element = null;
+ for (var i in layers) {
+ var layer = layers[i];
+ if (layer[0] == 0 && yoffset < 0) {
+ layer[0] = yoffset;
+ }
+ if (frombottom > worldHeight*layer[0] && Math.random() < (layer[2] || 1)) {
+ if (elements[layer[1]]) {
+ element = layer[1];
+ break
+ }
+ }
+ }
+ if (y >= height && (currentSaveData.voidY || currentSaveData.loopY)) {
+ element = currentSaveData.borderElem ? null : "wall";
+ }
+ if ((x >= width || x === 0) && (currentSaveData.voidX || currentSaveData.loopX)) {
+ element = currentSaveData.borderElem ? null : "wall";
+ }
+ if (element) {
+ createPixel(element,x,y);
+ if (worldtype.temperature) {
+ pixelMap[x][y].temp = worldtype.temperature;
+ }
+ }
+ }
+ }
+ }
+ // decor
+ if (worldtype.decor) {
+ for (var i = 0; i < worldtype.decor.length; i++) {
+ var decor = worldtype.decor[i];
+ var element = decor[0];
+ var chance = decor[1];
+ for (var x = 1; x < width; x++) {
+ var y = decor[2] || 5;
+ // add or subtract worldtype.decorVariance from y
+ y += Math.round(Math.random()*(worldtype.decorVariance||2) - (worldtype.decorVariance||2)/2);
+ if (Math.random() < chance && isEmpty(x,y)) {
+ createPixel(element,x,y);
+ if (worldtype.temperature) {
+ pixelMap[x][y].temp = worldtype.temperature;
+ }
+ if (decor[3]) {
+ pixelMap[x][y].color = pixelColorPick(pixelMap[x][y],decor[3])
+ }
+ }
+ }
+ }
+ }
+}
+
+// Generate worldgen options
+// Loop through the worldgentypes object, add the key to the #worldgenselect select as an option with the value of the key and the name of the key capitalized and underscores replaced with spaces
+for (var key in worldgentypes) {
+ document.getElementById("worldgenselect").innerHTML += "";
+}
+if (settings["worldgen"] && !worldgentypes[settings["worldgen"]]) {
+ settings["worldgen"] = "off";
+}
\ No newline at end of file
diff --git a/changelog.html b/changelog.html
index e5d1d6d6..83761cdc 100644
--- a/changelog.html
+++ b/changelog.html
@@ -113,6 +113,82 @@
+ Grouped pixels are ungrouped when broken or changing states
+
+ Grouped pixels can displace fluids (Experimental)
+
+ More Shift-Select functionality:
+
+ Battery can set a frequency to create timers
+
+ Image tool can set element
+
~ Fire begins more yellow and gets redder quicker
+
+ Icing (Hidden) made with Butter and Sugar
+
~ Liquids and Gases appear less grainy
+
~ Settings changes
+
+ Speed option in Settings to replace TPS button
+
+ Keybind: T to change TPS
+
~ Renamed E button to Elem button
+
~ Improved simulation speeds
+
- Removed World Gen
+
~ We recommend the PRNGworldgenlib.js mod, a much better world generator
+
- Removed Cheerful Mode
+
[Changes]
+
+ Escape can be pressed to cancel while drawing a line
+
+ Fillers can be painted and will fight other colors
+
+ Portals show destination lines when hovered over or selected
+
+ Portal In can be selected with the Elem button by typing 'Portal'
+
+ Lightning placed near certain elements will change color
+
+ Worms can break down Flour, Dough, Adobe, Paper, Confetti, Cellulose, Cheese, and Potato
+
+ Worms can move through Mulch
+
+ Radiation will radiate Batter
+
+ Rad Steam causes Cheese to rot
+
~ Filters and Gates are Acid-resistant
+
~ Portals no longer teleport Fuse
+
~ Ruler measures diagonal lines as a pixel count instead of hypotenuse
+
~ Unique flame colors for Nickel, Iron, and Mercury
+
~ Rearranged Special category
+
~ Opening the Info, Mods, or Settings menus will pause the game
+
~ Steam: All canvas sizes now stretch to the full screen width
+
+ Assigned densities to many solids
+
+ Keybind: Quote (") to toggle Edit Mode
+
[Bug Fixes]
+
~ Fixed: Dragging pixels through Filters creates ghost pixels
+
~ Fixed: Filters can break when transporting to Gates or Pipes
+
~ Fixed: Pixels are rendered in incorrect position when mixing with Pipe, Filter, or Gate
+
~ Fixed: Broken modded saves are loaded every bootup
+
~ Fixed: Precision Dot is misaligned with 2- and 4-wide brushes
+
~ Fixed: Portals can't transmit electricity if surrounded by pixels
+
~ Fixed: E-cloner can't be set to Fuse by clicking on it
+
~ Fixed: Some saves throw TypeError "Cannot set properties of undefined"
+
~ Fixed: Prop tool always unpauses after dialog
+
~ Fixed: Z and Backspace keys select Heat by default instead of Sand
+
~ Fixed: Random can't place Fire, Plasma, Ink, Bless, Rock Wall, Cold Fire, Sun, Pointer, or Art
+
~ Fixed: Elem dialog doesn't close if button is pressed again
+
~ Fixed: Wrong font when language set to Italian
+
~ Fixed: Magnesium melts at a much lower temperature than expected
+
~ Fixed: Shift-selecting Random and inputting 'random' causes errors
+
[Technical]
+
~ Note: Optimizations mean a lot of code was rewritten, please report any issues and be patient
+
~ Note: Don't pass an 'rgba' color to drawSquare, use the 'alpha' argument instead
+
+ Pixel relations system
+
+ Used to group pixels together
+
+ '_r' pixel property to identify its relation (should be an integer)
+
+ 'trackPaint' element property (boolean)
+
+ 'painted' pixel property (color code) given to these elements when painted
+
+ "Failed to load" message instead of hanging forever
+
~ 'con' contents only render if element has existing 'canContain' property
+
~ 'onMouseDown' element event only triggers with left clicks
+
~ Acid Gas 'ignore' property is now identical to Acid
+
~ Elements with a set density but no state are set to solid
+
~ Fuse no longer shows hidden element
+
~ Save version is now sb7
+
+
[Version 1.13.1 - December 18, 2025 - G&G Hotfix]
~ This is a quick group of bug fixes and improvements following yesterday's update.
diff --git a/changelog.txt b/changelog.txt
index 0c5ebcb5..4bf35a87 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -4,6 +4,80 @@ See sneak peaks for upcoming updates on the Discord: https://discord.gg/ejUc6YPQ
A fancier version of this changelog can be found here: https://sandboxels.R74n.com/changelog
+[Version 1.13.2 - January 11, 2026]
+ + Edit Mode
+ ~ Moved Special tools to the edit tab
+ ~ Expect more tools in the future
+ + Relations - Multiple pixels as a single entity
+ + Group and Ungroup tool in edit tab
+ + Grouped pixels fall and move as one structure
+ + Grouped pixels are ungrouped when broken or changing states
+ + Grouped pixels can displace fluids (Experimental)
+ + More Shift-Select functionality:
+ + Battery can set a frequency to create timers
+ + Image tool can set element
+ ~ Fire begins more yellow and gets redder quicker
+ + Icing (Hidden) made with Butter and Sugar
+ ~ Liquids and Gases appear less grainy
+ ~ Settings changes
+ + Speed option in Settings to replace TPS button
+ + Keybind: T to change TPS
+ ~ Renamed E button to Elem button
+ ~ Improved simulation speeds
+ - Removed World Gen
+ ~ We recommend the PRNGworldgenlib.js mod, a much better world generator
+ - Removed Cheerful Mode
+ [Changes]
+ + Escape can be pressed to cancel while drawing a line
+ + Fillers can be painted and will fight other colors
+ + Portals show destination lines when hovered over or selected
+ + Portal In can be selected with the Elem button by typing 'Portal'
+ + Lightning placed near certain elements will change color
+ + Worms can break down Flour, Dough, Adobe, Paper, Confetti, Cellulose, Cheese, and Potato
+ + Worms can move through Mulch
+ + Radiation will radiate Batter
+ + Rad Steam causes Cheese to rot
+ ~ Filters and Gates are Acid-resistant
+ ~ Portals no longer teleport Fuse
+ ~ Ruler measures diagonal lines as a pixel count instead of hypotenuse
+ ~ Unique flame colors for Nickel, Iron, and Mercury
+ ~ Rearranged Special category
+ ~ Opening the Info, Mods, or Settings menus will pause the game
+ ~ Steam: All canvas sizes now stretch to the full screen width
+ + Assigned densities to many solids
+ + Keybind: Quote (") to toggle Edit Mode
+ [Bug Fixes]
+ ~ Fixed: Dragging pixels through Filters creates ghost pixels
+ ~ Fixed: Filters can break when transporting to Gates or Pipes
+ ~ Fixed: Pixels are rendered in incorrect position when mixing with Pipe, Filter, or Gate
+ ~ Fixed: Broken modded saves are loaded every bootup
+ ~ Fixed: Precision Dot is misaligned with 2- and 4-wide brushes
+ ~ Fixed: Portals can't transmit electricity if surrounded by pixels
+ ~ Fixed: E-cloner can't be set to Fuse by clicking on it
+ ~ Fixed: Some saves throw TypeError "Cannot set properties of undefined"
+ ~ Fixed: Prop tool always unpauses after dialog
+ ~ Fixed: Z and Backspace keys select Heat by default instead of Sand
+ ~ Fixed: Random can't place Fire, Plasma, Ink, Bless, Rock Wall, Cold Fire, Sun, Pointer, or Art
+ ~ Fixed: Elem dialog doesn't close if button is pressed again
+ ~ Fixed: Wrong font when language set to Italian
+ ~ Fixed: Magnesium melts at a much lower temperature than expected
+ ~ Fixed: Shift-selecting Random and inputting 'random' causes errors
+ [Technical]
+ ~ Note: Optimizations mean a lot of code was rewritten, please report any issues and be patient
+ ~ Note: Don't pass an 'rgba' color to drawSquare, use the 'alpha' argument instead
+ + Pixel relations system
+ + Used to group pixels together
+ + '_r' pixel property to identify its relation (should be an integer)
+ + 'trackPaint' element property (boolean)
+ + 'painted' pixel property (color code) given to these elements when painted
+ + "Failed to load" message instead of hanging forever
+ ~ 'con' contents only render if element has existing 'canContain' property
+ ~ 'onMouseDown' element event only triggers with left clicks
+ ~ Acid Gas 'ignore' property is now identical to Acid
+ ~ Elements with a set density but no state are set to solid
+ ~ Fuse no longer shows hidden element
+ ~ Save version is now sb7
+
[Version 1.13.1 - December 18, 2025 - G&G Hotfix]
~ This is a quick group of bug fixes and improvements following yesterday's update.
+ More Shift-Select functionality:
diff --git a/controls.html b/controls.html
index 7b47c61b..42db7caa 100644
--- a/controls.html
+++ b/controls.html
@@ -108,6 +108,7 @@
Streak view
4
Outline view
5
Hide canvas
H
+
Change speed (TPS)
T
Toggle GUI
F1
Capture screenshot
C or F2
Paste image or Load save file
Ctrl + V or Drag & Drop
@@ -129,8 +130,9 @@
Plus (+)
Increase the cursor size
Reset
Clear the entire canvas
Replace
Override existing pixels when placing
-
E
Select any element by name
-
TPS
Change how fast the simulation runs (Default 30tps)
+
Elem
Select any element by name
+
Edit
Switch to Edit Mode and show editing tools
+
Info
Open the element info screen
Saves
Open the Save & Load menu
Mods
Open the Mod Manager
diff --git a/controls.txt b/controls.txt
index 6b41b068..3e6267d2 100644
--- a/controls.txt
+++ b/controls.txt
@@ -31,6 +31,7 @@ F or F11 = Toggle Fullscreen
4 = Streak View
5 = Outline View
H = Hide Canvas
+T = Change Speed (TPS)
F1 = Toggle GUI / HUD
F2 or C = Capture Screenshot
Drag & Drop = Insert an image or load save file
@@ -39,7 +40,7 @@ Ctrl + S = Open save prompt
Ctrl + Shift + S = Instant save
Ctrl + O = Load save
Ctrl + Shift + O = Reload last save
-Escape = Close Menu / Clear Logs
+Escape = Cancel Action / Close Menu / Clear Logs
; = Replace Mode
Shift + Mid Click = Pick Element (Copy Properties)
Shift + Button = Extra manual element controls
@@ -56,8 +57,8 @@ Minus = Decrease the cursor size
Plus = Increase the cursor size
Reset = Clear the entire simulation
Replace = Override existing pixels when placing
-E = Select any element by name
-TPS = Change how fast the simulation runs
+Elem = Select any element by name
+Edit = Switch to Edit Mode and show editing tools
Info = Open the element info screen
Saves = Open the Save & Load menu
Mods = Open the Mod Manager
diff --git a/index.html b/index.html
index 8d058f87..1645c173 100644
--- a/index.html
+++ b/index.html
@@ -49,8 +49,8 @@
@@ -119,21 +119,25 @@
+
@@ -20824,22 +21193,20 @@ window.onload = function() {
-
- ?
-
- Language
-
+ Random Events
+
+
+
+ SpeedAir Temp
@@ -20856,12 +21223,6 @@ Cancer, Landmine, Grenade, Smoke Grenade">?
-
- World Gen [Beta]
-
- Image Elem
@@ -20878,24 +21239,6 @@ Cancer, Landmine, Grenade, Smoke Grenade">?