scroll menus

shotgun balance
  ice-shot: less spread, higher damage, more crystals
  needle-shot: more needles, higher damage, less spread
  foam-shot: 1 more bubble

power up selection and pause menu elements scroll individually now
  it looks great on my computer, but different operating systems and browsers are unpredictable
  let me know if text is hidden or if it doesn't scroll for you and what OS and browser you're on
This commit is contained in:
landgreen
2021-07-26 06:15:06 -07:00
parent 271791703f
commit 3977b44ec7
10 changed files with 57 additions and 62 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -202,9 +202,7 @@
<div> <div>
<details id="updates"> <details id="updates">
<summary>updates</summary> <summary>updates</summary>
<div id="updates-div" class="details-div" style="font-size: 70%;height: 400px;overflow: scroll;max-width: 450px;"> <div id="updates-div" class="details-div" style="font-size: 70%;height: 400px;overflow: scroll;max-width: 450px;"></div>
</div>
</details> </details>
</div> </div>
<div> <div>

View File

@@ -2057,7 +2057,7 @@ const b = {
friction: 0, friction: 0,
frictionAir: 0.023, frictionAir: 0.023,
restitution: 0.9, restitution: 0.9,
dmg: 0.5, //damage done in addition to the damage from momentum dmg: 0.55, //damage done in addition to the damage from momentum
lookFrequency: 14 + Math.floor(8 * Math.random()), lookFrequency: 14 + Math.floor(8 * Math.random()),
endCycle: simulation.cycle + 150 * tech.isBulletsLastLonger + Math.floor(25 * Math.random()), endCycle: simulation.cycle + 150 * tech.isBulletsLastLonger + Math.floor(25 * Math.random()),
classType: "bullet", classType: "bullet",
@@ -2781,7 +2781,7 @@ const b = {
if (tech.isNailRadiation) { if (tech.isNailRadiation) {
mobs.statusDoT(who, tech.isFastRadiation ? 12 : 3, tech.isSlowRadiation ? 240 : (tech.isFastRadiation ? 30 : 120)) // one tick every 30 cycles mobs.statusDoT(who, tech.isFastRadiation ? 12 : 3, tech.isSlowRadiation ? 240 : (tech.isFastRadiation ? 30 : 120)) // one tick every 30 cycles
} else { } else {
let dmg = b.dmgScale * 5.5 let dmg = b.dmgScale * 6
if (tech.isCrit && who.isStunned) dmg *= 4 if (tech.isCrit && who.isStunned) dmg *= 4
who.damage(dmg, tech.isNeedleShieldPierce); who.damage(dmg, tech.isNeedleShieldPierce);
simulation.drawList.push({ //add dmg to draw queue simulation.drawList.push({ //add dmg to draw queue
@@ -3775,8 +3775,8 @@ const b = {
name: "shotgun", name: "shotgun",
description: "fire a wide <strong>burst</strong> of short range <strong> bullets</strong>", description: "fire a wide <strong>burst</strong> of short range <strong> bullets</strong>",
ammo: 0, ammo: 0,
ammoPack: 5, ammoPack: 4.5,
defaultAmmoPack: 5, defaultAmmoPack: 4.5,
have: false, have: false,
do() {}, do() {},
fire() { fire() {
@@ -3933,10 +3933,10 @@ const b = {
}); });
} }
} else if (tech.isIceShot) { } else if (tech.isIceShot) {
const spread = (m.crouch ? 0.6 : 1.6) const spread = (m.crouch ? 0.7 : 1.2)
for (let i = 0, len = 16 * (tech.isShotgunReversed ? 1.6 : 1); i < len; i++) { for (let i = 0, len = 18 * (tech.isShotgunReversed ? 1.6 : 1); i < len; i++) {
// iceIX(speed = 0, dir = m.angle + Math.PI * 2 * Math.random(), where = { x: m.pos.x + 30 * Math.cos(m.angle), y: m.pos.y + 30 * Math.sin(m.angle) }) { // iceIX(speed = 0, dir = m.angle + Math.PI * 2 * Math.random(), where = { x: m.pos.x + 30 * Math.cos(m.angle), y: m.pos.y + 30 * Math.sin(m.angle) }) {
b.iceIX(14 + 30 * Math.random(), m.angle + spread * (Math.random() - 0.5)) b.iceIX(25 + 32 * Math.random(), m.angle + spread * (Math.random() - 0.5))
} }
} else if (tech.isFoamShot) { } else if (tech.isFoamShot) {
const spread = (m.crouch ? 0.35 : 0.7) const spread = (m.crouch ? 0.35 : 0.7)
@@ -3944,7 +3944,7 @@ const b = {
x: m.pos.x + 25 * Math.cos(m.angle), x: m.pos.x + 25 * Math.cos(m.angle),
y: m.pos.y + 25 * Math.sin(m.angle) y: m.pos.y + 25 * Math.sin(m.angle)
} }
const number = 14 * (tech.isShotgunReversed ? 1.6 : 1) const number = 13 * (tech.isShotgunReversed ? 1.6 : 1)
for (let i = 0; i < number; i++) { for (let i = 0; i < number; i++) {
const SPEED = 25 + 12 * Math.random(); const SPEED = 25 + 12 * Math.random();
const angle = m.angle + spread * (Math.random() - 0.5) const angle = m.angle + spread * (Math.random() - 0.5)
@@ -3952,7 +3952,7 @@ const b = {
} }
} else if (tech.isNeedleShot) { } else if (tech.isNeedleShot) {
const number = 12 * (tech.isShotgunReversed ? 1.6 : 1) const number = 12 * (tech.isShotgunReversed ? 1.6 : 1)
const spread = (m.crouch ? 0.04 : 0.08) const spread = (m.crouch ? 0.03 : 0.05)
let angle = m.angle - (number - 1) * spread * 0.5 let angle = m.angle - (number - 1) * spread * 0.5
for (let i = 0; i < number; i++) { for (let i = 0; i < number; i++) {
b.needle(angle) b.needle(angle)

View File

@@ -264,13 +264,13 @@ const build = {
el = document.getElementById("pause-grid-right") el = document.getElementById("pause-grid-right")
el.style.display = "grid" el.style.display = "grid"
el.innerHTML = text el.innerHTML = text
if (countTech > 5 || b.inventory.length > 6) { // if (countTech > 5 || b.inventory.length > 6) {
document.body.style.overflowY = "scroll"; // document.body.style.overflowY = "scroll";
document.body.style.overflowX = "hidden"; // document.body.style.overflowX = "hidden";
} // }
}, },
unPauseGrid() { unPauseGrid() {
document.body.style.overflow = "hidden" // document.body.style.overflow = "hidden"
document.getElementById("pause-grid-left").style.display = "none" document.getElementById("pause-grid-left").style.display = "none"
document.getElementById("pause-grid-right").style.display = "none" document.getElementById("pause-grid-right").style.display = "none"
window.scrollTo(0, 0); window.scrollTo(0, 0);

View File

@@ -25,10 +25,10 @@ const level = {
// tech.giveTech("causality bombs") // tech.giveTech("causality bombs")
// b.giveGuns("wave beam") // b.giveGuns("wave beam")
// tech.giveTech("phonon") // tech.giveTech("phonon")
// tech.giveTech("bound state") // tech.giveTech("cardinality")
// tech.giveTech("isotropic radiator") // tech.giveTech("isotropic radiator")
// for (let i = 0; i < 9; i++) tech.giveTech("spherical harmonics")
// for (let i = 0; i < 3; i++) tech.giveTech("packet length") // for (let i = 0; i < 3; i++) tech.giveTech("packet length")
// for (let i = 0; i < 4; i++) tech.giveTech()
level.intro(); //starting level level.intro(); //starting level
// level.testing(); //not in rotation, used for testing // level.testing(); //not in rotation, used for testing

View File

@@ -643,7 +643,7 @@ const m = {
simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-r'>research</span><span class='color-symbol'>--</span><br>${powerUps.research.count}`) simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-r'>research</span><span class='color-symbol'>--</span><br>${powerUps.research.count}`)
for (let i = 0; i < 6; i++) powerUps.spawn(m.pos.x + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "heal", false); for (let i = 0; i < 6; i++) powerUps.spawn(m.pos.x + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "heal", false);
m.energy = m.maxEnergy m.energy = m.maxEnergy
if (m.immuneCycle < m.cycle + 360) m.immuneCycle = m.cycle + 360 //disable this.immuneCycle bonus seconds if (m.immuneCycle < m.cycle + 300) m.immuneCycle = m.cycle + 300 //disable this.immuneCycle bonus seconds
simulation.wipe = function() { //set wipe to have trails simulation.wipe = function() { //set wipe to have trails
ctx.fillStyle = "rgba(255,255,255,0.03)"; ctx.fillStyle = "rgba(255,255,255,0.03)";
ctx.fillRect(0, 0, canvas.width, canvas.height); ctx.fillRect(0, 0, canvas.width, canvas.height);
@@ -672,7 +672,7 @@ const m = {
simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-r'>research</span><span class='color-symbol'>--</span> simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-r'>research</span><span class='color-symbol'>--</span>
<br>${powerUps.research.count}`) <br>${powerUps.research.count}`)
for (let i = 0; i < 6; i++) powerUps.spawn(m.pos.x + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "heal", false); for (let i = 0; i < 6; i++) powerUps.spawn(m.pos.x + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "heal", false);
if (m.immuneCycle < m.cycle + 360) m.immuneCycle = m.cycle + 360 //disable this.immuneCycle bonus seconds if (m.immuneCycle < m.cycle + 300) m.immuneCycle = m.cycle + 300 //disable this.immuneCycle bonus seconds
simulation.wipe = function() { //set wipe to have trails simulation.wipe = function() { //set wipe to have trails
ctx.fillStyle = "rgba(255,255,255,0.03)"; ctx.fillStyle = "rgba(255,255,255,0.03)";
ctx.fillRect(0, 0, canvas.width, canvas.height); ctx.fillRect(0, 0, canvas.width, canvas.height);

View File

@@ -160,10 +160,10 @@ const powerUps = {
document.getElementById("choose-grid").style.transitionDuration = "0s"; document.getElementById("choose-grid").style.transitionDuration = "0s";
}, 500); }, 500);
if (tech.isExtraChoice) { // if (tech.isExtraChoice) {
document.body.style.overflowY = "scroll"; // document.body.style.overflowY = "scroll";
document.body.style.overflowX = "hidden"; // document.body.style.overflowX = "hidden";
} // }
simulation.paused = true; simulation.paused = true;
simulation.isChoosing = true; //stops p from un pausing on key down simulation.isChoosing = true; //stops p from un pausing on key down
build.pauseGrid(true) build.pauseGrid(true)
@@ -206,7 +206,7 @@ const powerUps = {
document.getElementById("choose-background").style.opacity = "0" document.getElementById("choose-background").style.opacity = "0"
document.body.style.cursor = "none"; document.body.style.cursor = "none";
document.body.style.overflow = "hidden" // document.body.style.overflow = "hidden"
simulation.paused = false; simulation.paused = false;
simulation.isChoosing = false; //stops p from un pausing on key down simulation.isChoosing = false; //stops p from un pausing on key down
if (m.immuneCycle < m.cycle + tech.collisionImmuneCycles) m.immuneCycle = m.cycle + tech.collisionImmuneCycles; //player is immune to damage for 30 cycles if (m.immuneCycle < m.cycle + tech.collisionImmuneCycles) m.immuneCycle = m.cycle + tech.collisionImmuneCycles; //player is immune to damage for 30 cycles

View File

@@ -82,7 +82,7 @@
if (index === 'random') { if (index === 'random') {
let options = []; let options = [];
for (let i = 0; i < tech.tech.length; i++) { for (let i = 0; i < tech.tech.length; i++) {
if (tech.tech[i].count < tech.tech[i].maxCount && tech.tech[i].allowed() && !tech.tech[i].isJunk && !tech.tech[i].isLore) options.push(i); if (tech.tech[i].count < tech.tech[i].maxCount && tech.tech[i].allowed() && !tech.tech[i].isJunk && !tech.tech[i].isLore && !tech.tech[i].isBadRandomOption) options.push(i);
} }
// give a random tech from the tech I don't have // give a random tech from the tech I don't have
if (options.length > 0) { if (options.length > 0) {
@@ -3826,7 +3826,7 @@
}, },
{ {
name: "foam-shot", name: "foam-shot",
description: "the <strong>shotgun</strong> fires <strong>14</strong> <strong>foam</strong> bubbles", description: "the <strong>shotgun</strong> fires <strong>13</strong> <strong>foam</strong> bubbles",
isGunTech: true, isGunTech: true,
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -3845,7 +3845,7 @@
}, },
{ {
name: "ice-shot", name: "ice-shot",
description: "the <strong>shotgun</strong> fires <strong>16</strong> <strong class='color-s'>ice IX</strong> crystals", description: "the <strong>shotgun</strong> fires <strong>18</strong> <strong class='color-s'>ice IX</strong> crystals",
isGunTech: true, isGunTech: true,
maxCount: 1, maxCount: 1,
count: 0, count: 0,

View File

@@ -5,7 +5,7 @@
body { body {
font-family: "Helvetica", "Arial", sans-serif; font-family: "Helvetica", "Arial", sans-serif;
margin: 0; margin: 0;
/* overflow: hidden; */ overflow: hidden;
background-color: #fff; background-color: #fff;
user-select: none; user-select: none;
cursor: auto; cursor: auto;
@@ -123,19 +123,6 @@ summary {
z-index: 12; z-index: 12;
} }
#choose-background {
position: absolute;
z-index: 3;
width: 100%;
height: 100%;
background-color: #ccc;
/* opacity: 0.6; */
/* display: none; */
visibility: hidden;
opacity: 0;
transition: opacity 0.25s linear;
}
#construct { #construct {
display: none; display: none;
position: absolute; position: absolute;
@@ -152,6 +139,19 @@ summary {
border: 1px #333 solid; border: 1px #333 solid;
} }
#choose-background {
position: absolute;
z-index: 3;
width: 100%;
height: 100%;
background-color: #ccc;
/* opacity: 0.6; */
/* display: none; */
visibility: hidden;
opacity: 0;
transition: opacity 0.25s linear;
}
#choose-grid { #choose-grid {
position: absolute; position: absolute;
top: 50%; top: 50%;
@@ -172,6 +172,9 @@ summary {
visibility: hidden; visibility: hidden;
opacity: 0; opacity: 0;
transition: opacity 0.25s linear; transition: opacity 0.25s linear;
align-content: start;
max-height: 100vh;
overflow: auto;
} }
.choose-grid-module { .choose-grid-module {
@@ -207,7 +210,8 @@ summary {
/* grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); */ /* grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); */
grid-auto-rows: minmax(auto, auto); grid-auto-rows: minmax(auto, auto);
grid-gap: 0px; grid-gap: 0px;
align-content: space-between; align-content: start;
/* align-content: space-between; */
z-index: 2; z-index: 2;
font-size: 1.3em; font-size: 1.3em;
@@ -216,11 +220,15 @@ summary {
#pause-grid-right { #pause-grid-right {
justify-content: end; justify-content: end;
position: relative; position: relative;
overflow: auto;
max-height: 100vh;
} }
#pause-grid-left { #pause-grid-left {
justify-content: start; justify-content: start;
position: relative; position: relative;
overflow: auto;
max-height: 100vh;
} }
.pause-grid-module { .pause-grid-module {

View File

@@ -1,27 +1,16 @@
******************************************************** NEXT PATCH ******************************************************** ******************************************************** NEXT PATCH ********************************************************
shotgun techs: shotgun balance
(I haven't done enough testing so let me know if these different shotgun modes aren't balanced) ice-shot: less spread, higher damage, more crystals
worm shot needle-shot: more needles, higher damage, less spread
ice-IX shot foam-shot: 1 more bubble
foam shot
needle shot
foam lasts much longer on shielded mobs power up selection and pause menu elements scroll individually now
overall foam damage is reduced about 8% it looks great on my computer, but different operating systems and browsers are unpredictable
let me know if text is hidden or if it doesn't scroll for you and what OS and browser you're on
attacks that drain energy don't work when the player is immune to harm
slime, radiation fields, black holes
energy regen that consumes something (ammo, blocks, power ups) now works when immune to harm
but passive energy regen is still stopped while you are immune to harm
pilot wave field can no longer hit intangible mobs with blocks
it was too annoying that you can't use blocks to move around so I reverted it back
******************************************************** TODO ******************************************************** ******************************************************** TODO ********************************************************
snake boss tail should shrink in size
mob that grows or gets a shield when player is near mob that grows or gets a shield when player is near
and charges when player is near and charges when player is near
charge triggers an escape mode charge triggers an escape mode