Version 1.10.1 - October 5, 2024 - Creepy Crawlies

[Version 1.10.1 - October 5, 2024 - Creepy Crawlies]
   [Crawly]
    + Spider, will climb and create Webs
    + Web (Hidden), will trap bugs
    + Ants can climb walls
   [Creepy]
    + Soul (Hidden), from Humans
    + Ectoplasm (Hidden)
    + Tombstone, spawns Souls
    ~ Note: Soul features will move to the souls.js mod after October
    + Candy is candy corn-colored
    + Humans will wear orange shirts on Halloween
   [Changes]
    + Fire can heat existing pixels when placed over them
    + Wet Sand and Mud release Steam when heated
    + Smashing Clouds can release their Water
    + Water will create Bubbles before boiling
    + Dirty Water can be purified before boiling
    + Panicking humans will cause others to panic
    + Rice can be fermented
    + Rats can eat Vines
    + Bleach kills Algae
    + Salt slowly dissolves in Bleach
    + Bleach destroys Ink and Dye
    + Bleach stains Porcelain Shards brown
    + Caramel dissolves in Vinegar
    + Image tool set to Paint will recolor pixels
    + Midas Touch converts hot liquids to Molten Gold
    ~ Thermite can no longer form Slag
    ~ Milk boils more realistically
    ~ Increased minimum temperature for Meat to make Grease
    ~ Blaster explodes into less Plasma
    ~ Moved Hive to after Bee when unhidden
    + Rust alias 'Iron Oxide'
   [Bug Fixes]
    ~ Fixed: Mix with Replace Mode deletes pixels
    ~ Fixed: Cannot Erase lines on mobile
    ~ Fixed: Heat glow appears in inappropriate views
    ~ Fixed: Void can be dragged
    ~ Fixed: Oxidized Copper can't sink in liquids
    ~ Fixed: Pressure Plate doesn't conduct Heat or sink
    ~ Fixed: Fire created by molten pixels isn't hot enough
    ~ Fixed: Mods added with backslash can't be removed
    ~ Fixed: Single Sponge pixels have NaN moisture
    ~ Fixed: Non-string hoverStat values crash simulation
    ~ Fixed: Crash when pixel changes state into a customColor element
   [Technical]
    + URL parameter ?holiday=false disables holiday events
    + Pressure Plate 'min' attribute for minimum density
    + 'onStateHigh' and 'onStateLow' element properties
    + 'buttonGlow' element property
    + Saves with abnormally large canvases display a warning
    + createPixel and changePixel functions accept null values
    ~ Corn updated to use 'onStateHigh' property
    ~ Pixel 'glow' attribute can be false to override default
    ~ Pixel 'glow' attribute is removed when pixel changes
    ~ Random element is no longer hard-coded
This commit is contained in:
slweeb 2024-10-05 11:53:31 -04:00
parent 33711ba4cd
commit b9717b2802
6 changed files with 1166 additions and 565 deletions

View File

@ -109,6 +109,66 @@
<p>The original <a href="https://sandboxels.r74n.com/changelog.txt">plain text version</a> of this is still maintained.</p>
</div>
<h2 id="1.10.1">[Version 1.10.1 - October 5, 2024 - Creepy Crawlies]</h2>
<ul>
<li>[Crawly]</li>
<li>+ Spider, will climb and create Webs</li>
<li>+ Web (Hidden), will trap bugs</li>
<li>+ Ants can climb walls</li>
<li>[Creepy]</li>
<li>+ Soul (Hidden), from Humans</li>
<li>+ Ectoplasm (Hidden)</li>
<li>+ Tombstone, spawns Souls</li>
<li>~ Note: Soul features will move to the souls.js mod after October</li>
<li>+ Candy is candy corn-colored</li>
<li>+ Humans will wear orange shirts on Halloween</li>
<li>[Changes]</li>
<li>+ Fire can heat existing pixels when placed over them</li>
<li>+ Wet Sand and Mud release Steam when heated</li>
<li>+ Smashing Clouds can release their Water</li>
<li>+ Water will create Bubbles before boiling</li>
<li>+ Dirty Water can be purified before boiling</li>
<li>+ Panicking humans will cause others to panic</li>
<li>+ Rice can be fermented</li>
<li>+ Rats can eat Vines</li>
<li>+ Bleach kills Algae</li>
<li>+ Salt slowly dissolves in Bleach</li>
<li>+ Bleach destroys Ink and Dye</li>
<li>+ Bleach stains Porcelain Shards brown</li>
<li>+ Caramel dissolves in Vinegar</li>
<li>+ Image tool set to Paint will recolor pixels</li>
<li>+ Midas Touch converts hot liquids to Molten Gold</li>
<li>~ Thermite can no longer form Slag</li>
<li>~ Milk boils more realistically</li>
<li>~ Increased minimum temperature for Meat to make Grease</li>
<li>~ Blaster explodes into less Plasma</li>
<li>~ Moved Hive to after Bee when unhidden</li>
<li>+ Rust alias 'Iron Oxide'</li>
<li>[Bug Fixes]</li>
<li>~ Fixed: Mix with Replace Mode deletes pixels</li>
<li>~ Fixed: Cannot Erase lines on mobile</li>
<li>~ Fixed: Heat glow appears in inappropriate views</li>
<li>~ Fixed: Void can be dragged</li>
<li>~ Fixed: Oxidized Copper can't sink in liquids</li>
<li>~ Fixed: Pressure Plate doesn't conduct Heat or sink</li>
<li>~ Fixed: Fire created by molten pixels isn't hot enough</li>
<li>~ Fixed: Mods added with backslash can't be removed</li>
<li>~ Fixed: Single Sponge pixels have NaN moisture</li>
<li>~ Fixed: Non-string hoverStat values crash simulation</li>
<li>~ Fixed: Crash when pixel changes state into a customColor element</li>
<li>[Technical]</li>
<li>+ URL parameter ?holiday=false disables holiday events</li>
<li>+ Pressure Plate 'min' attribute for minimum density</li>
<li>+ 'onStateHigh' and 'onStateLow' element properties</li>
<li>+ 'buttonGlow' element property</li>
<li>+ Saves with abnormally large canvases display a warning</li>
<li>+ createPixel and changePixel functions accept null values</li>
<li>~ Corn updated to use 'onStateHigh' property</li>
<li>~ Pixel 'glow' attribute can be false to override default</li>
<li>~ Pixel 'glow' attribute is removed when pixel changes</li>
<li>~ Random element is no longer hard-coded</li>
</ul>
<h2 id="1.10">[Version 1.10 - August 2, 2024 - Return of the Sand]</h2>
<ul>
<li>+ Rice</li>

View File

@ -6,6 +6,64 @@ 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.10.1 - October 5, 2024 - Creepy Crawlies]
[Crawly]
+ Spider, will climb and create Webs
+ Web (Hidden), will trap bugs
+ Ants can climb walls
[Creepy]
+ Soul (Hidden), from Humans
+ Ectoplasm (Hidden)
+ Tombstone, spawns Souls
~ Note: Soul features will move to the souls.js mod after October
+ Candy is candy corn-colored
+ Humans will wear orange shirts on Halloween
[Changes]
+ Fire can heat existing pixels when placed over them
+ Wet Sand and Mud release Steam when heated
+ Smashing Clouds can release their Water
+ Water will create Bubbles before boiling
+ Dirty Water can be purified before boiling
+ Panicking humans will cause others to panic
+ Rice can be fermented
+ Rats can eat Vines
+ Bleach kills Algae
+ Salt slowly dissolves in Bleach
+ Bleach destroys Ink and Dye
+ Bleach stains Porcelain Shards brown
+ Caramel dissolves in Vinegar
+ Image tool set to Paint will recolor pixels
+ Midas Touch converts hot liquids to Molten Gold
~ Thermite can no longer form Slag
~ Milk boils more realistically
~ Increased minimum temperature for Meat to make Grease
~ Blaster explodes into less Plasma
~ Moved Hive to after Bee when unhidden
+ Rust alias 'Iron Oxide'
[Bug Fixes]
~ Fixed: Mix with Replace Mode deletes pixels
~ Fixed: Cannot Erase lines on mobile
~ Fixed: Heat glow appears in inappropriate views
~ Fixed: Void can be dragged
~ Fixed: Oxidized Copper can't sink in liquids
~ Fixed: Pressure Plate doesn't conduct Heat or sink
~ Fixed: Fire created by molten pixels isn't hot enough
~ Fixed: Mods added with backslash can't be removed
~ Fixed: Single Sponge pixels have NaN moisture
~ Fixed: Non-string hoverStat values crash simulation
~ Fixed: Crash when pixel changes state into a customColor element
[Technical]
+ URL parameter ?holiday=false disables holiday events
+ Pressure Plate 'min' attribute for minimum density
+ 'onStateHigh' and 'onStateLow' element properties
+ 'buttonGlow' element property
+ Saves with abnormally large canvases display a warning
+ createPixel and changePixel functions accept null values
~ Corn updated to use 'onStateHigh' property
~ Pixel 'glow' attribute can be false to override default
~ Pixel 'glow' attribute is removed when pixel changes
~ Random element is no longer hard-coded
[Version 1.10 - August 2, 2024 - Return of the Sand]
+ Rice
+ Galvanized Steel (Hidden)

1389
index.html

File diff suppressed because it is too large Load Diff

View File

@ -128,6 +128,7 @@
<tr><td>fools.js</td><td>Adds back FOOLS Mode</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
<tr><td>fools24.js</td><td>Adds back the 2024 Multiversal Update (v5.9.1)</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
<tr><td>smooth_water.js</td><td>Changes water mechanics so that it flows in one direction until it bounces off of something</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
<tr><td>souls.js</td><td>Adds Human Souls, Ectoplasm, and Tombstones</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
<tr><td>spring.js</td><td>Many nature elements, like sakura trees, butterflies, beehives, and more</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
<tr><td>survival.js</td><td>With limited resources, you must craft, sell, and buy to progress</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
<tr><td>velocity.js</td><td>Beta for explosion velocity, and later wind, which may come to the base game in the future</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>

79
mods/lighting_test.js Normal file
View File

@ -0,0 +1,79 @@
lightCoordsLevel1 = [
[-1,-3],[0,-3],[1,-3],
[-2,-2],[2,-2],
[-3,-1],[3,-1],
[-3,-0],[3,-0],
[-3,1],[3,1],
[-2,2],[2,2],
[-1,3],[0,3],[1,3],
]
lightCoordsLevel2 = [
[-1,-2],[0,-2],[1,-2],
[-2,-1],[2,-1],
[-2,0],[2,0],
[-2,1],[2,1],
[-1,2],[0,2],[1,2],
]
lightCoordsLevel3 = [
[-1,-1],[1,-1],
[-1,1],[1,1],
]
lightCoordsLevel3Extra = [
[1,0],[-1,0],[0,1],[0,-1]
]
glowAmount = 2;
viewInfo[4] = {
name: "lighting",
effects: true,
colorEffects: true,
pixel: viewInfo[1].pixel,
pre: function(ctx){
const pixelSize3 = pixelSize*3;
const pixelSize7 = pixelSize*7
const pixelSize5 = pixelSize*5
ctx.globalAlpha = 0.1;
for (let i = 0; i < currentPixels.length; i++) {
const pixel = currentPixels[i];
if (elements[pixel.element].id === elements.fire.id) {
ctx.fillStyle = pixel.color;
/* no occulusion: */
ctx.fillRect(canvasCoord(pixel.x-1), canvasCoord(pixel.y-3), pixelSize3, pixelSize7);
if (!isEmpty(pixel.x,pixel.y+1) && !isEmpty(pixel.x,pixel.y-1)) {
continue;
}
ctx.fillRect(canvasCoord(pixel.x-3), canvasCoord(pixel.y-1), pixelSize7, pixelSize3);
if (!isEmpty(pixel.x+1,pixel.y) && !isEmpty(pixel.x-1,pixel.y)) {
continue;
}
ctx.fillRect(canvasCoord(pixel.x-2), canvasCoord(pixel.y-2), pixelSize5, pixelSize5);
// ctx.globalAlpha = 0.1;
// lightCoordsLevel1.forEach(coords => {
// let x = pixel.x+coords[0]; let y = pixel.y+coords[1];
// if (!outOfBounds(x,y) && pixelMap[pixel.x+coords[0]][pixel.y+coords[1]] === undefined) {
// ctx.fillRect(x*pixelSize, y*pixelSize, pixelSize, pixelSize);
// }
// });
// ctx.globalAlpha = 0.2;
// lightCoordsLevel2.forEach(coords => {
// let x = pixel.x+coords[0]; let y = pixel.y+coords[1];
// if (!outOfBounds(x,y) && pixelMap[pixel.x+coords[0]][pixel.y+coords[1]] === undefined) {
// ctx.fillRect(x*pixelSize, y*pixelSize, pixelSize, pixelSize);
// }
// });
// ctx.globalAlpha = 0.3;
// lightCoordsLevel3.forEach(coords => {
// let x = pixel.x+coords[0]; let y = pixel.y+coords[1];
// if (!outOfBounds(x,y) && pixelMap[pixel.x+coords[0]][pixel.y+coords[1]] === undefined) {
// ctx.fillRect(x*pixelSize, y*pixelSize, pixelSize, pixelSize);
// }
// });
}
}
ctx.globalAlpha = 1;
}
}

144
mods/souls.js Normal file
View File

@ -0,0 +1,144 @@
elements.soul = {
color: "#87fff9",
tick: function(pixel) {
if (pixel.y <= 1) { deletePixel(pixel.x,pixel.y); return; }
if (Math.random() < 0.05) {
if (!tryMove(pixel,pixel.x,pixel.y-1)) {
if (!isEmpty(pixel.x,pixel.y-1,true)) {
var hitPixel = pixelMap[pixel.x][pixel.y-1];
if (elements[hitPixel.element].movable) {
swapPixels(pixel,hitPixel);
}
}
}
}
var dir = pixel.flipX ? -1 : 1;
if (!pixel.stage) {
if (Math.random() < 0.25) {
if (!tryMove(pixel,pixel.x+dir,pixel.y-( Math.random() < 0.33 ? 1 : 0 ))) {
pixel.flipX = !pixel.flipX;
}
if (Math.random() < 0.1) {
pixel.stage = 1;
pixel.flipX = Math.random() < 0.5;
}
}
}
else if (pixel.stage === 1) {
if (!tryMove(pixel,pixel.x+dir,pixel.y+1)) { pixel.flipX = !pixel.flipX; }
if (Math.random() < 0.25) {
pixel.stage = 2;
pixel.flipX = Math.random() < 0.5;
}
}
else if (pixel.stage === 2) {
if (Math.random() < 0.25) {
var dirX = Math.floor(Math.random() * (2 - -1) + -1);
var dirY = Math.floor(Math.random() * (2 - -1) + -1);
tryMove(pixel,pixel.x+dirX,pixel.y+dirY);
}
if (Math.random() < 0.01) {
pixel.stage = 0;
pixel.flipX = Math.random() < 0.5;
}
}
if (!pixel.glow) {
if (Math.random() < 0.25) { pixel.glow = true; }
}
else if (Math.random() < 0.01) {
pixel.glow = false;
}
if (Math.random() < 0.0002 && isEmpty(pixel.x,pixel.y+1)) {
createPixel("ectoplasm",pixel.x,pixel.y+1);
}
if (Math.random() < 0.001) {
for (var i = 0; i < adjacentCoords.length; i++) {
var coords = adjacentCoords[i];
var x = pixel.x + coords[0];
var y = pixel.y + coords[1];
if (isEmpty(x,y)) {
createPixel("flash",x,y);
pixelMap[x][y].temp = -10;
}
}
}
doDefaults(pixel);
},
reactions: {
"light_bulb": { charged:true, elem2:"explosion" },
"led_r": { charged:true, elem2:"explosion" },
"led_g": { charged:true, elem2:"explosion" },
"led_b": { charged:true, elem2:"explosion" },
"wire": { charge2:1, chance:0.05 },
"body": { attr2:{"panic":20} },
"proton": { elem1:null },
},
temp: -10,
hardness: 100,
flippableX: true,
glow: true,
state: "gas",
density: 1000,
ignoreAir: true,
category: "life",
insulate: true,
hidden: true
}
elements.ectoplasm = {
color: ["#ADF9E7","#c1fbed"],
behavior: behaviors.LIQUID,
tick: function(pixel) {
if (pixel.temp >= -10 && Math.random() < 0.01 && pixelTicks-pixel.start > 100) {
deletePixel(pixel.x,pixel.y)
}
},
reactions: {
"body": { attr2:{"panic":20} }
},
temp: -10,
category: "liquids",
state: "liquid",
density: 0.0001,
ignoreAir: true,
insulate: true,
viscosity: 1666,
hardness: 100,
hidden: true
}
elements.head.breakInto = "soul";
elements.head.burnInto = "soul";
elements.head.stateHigh = "soul";
elements.head.stateLow = "soul";
elements.head.onDelete = function(pixel) {
releaseElement(pixel,"soul");
}
elements.head.onChange = function(pixel,element) {
if (element !== "soul") {
releaseElement(pixel,"soul");
}
}
elements.bless.reactions.soul = { elem2:"human" }
elements.bless.reactions.ectoplasm = { elem2:null }
elements.tombstone = {
color: ["#5f5f5f","#434343","#282828"],
behavior: [
"XX|CR:soul%0.01|XX",
"CR:soul%0.01|XX|CR:soul%0.01",
"XX|XX|XX",
],
category:"special",
tempHigh: 950,
stateHigh: "magma",
state: "solid",
density: 2550,
hardness: 0.5,
breakInto: ["rock","rock","rock","rock","soul","ectoplasm"],
onStateHigh: function(pixel) {
releaseElement(pixel,"soul");
},
buttonGlow: "#87fff9"
}