removed level.fillBG

added new graphics to several maps

to level developers: level.fillBG and level.fill no longer work,
you should draw backgrounds directly in level.custom like this:
level.custom = () => {
    ctx.fillStyle = "rgba(0,255,255,0.1)";
    ctx.fillRect(6400, -550, 300, 350);
    level.playerExitCheck();
    level.exit.draw();
    level.enter.draw();
};
This commit is contained in:
landgreen
2021-03-31 18:03:08 -07:00
parent 4848cc4e73
commit 94314f7a59
6 changed files with 489 additions and 1138 deletions

BIN
.DS_Store vendored

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -19,7 +19,6 @@ const simulation = {
simulation.checks(); simulation.checks();
ctx.save(); ctx.save();
simulation.camera(); simulation.camera();
level.drawFillBGs();
level.custom(); level.custom();
simulation.draw.powerUp(); simulation.draw.powerUp();
mobs.draw(); mobs.draw();
@@ -30,7 +29,6 @@ const simulation = {
m.draw(); m.draw();
m.hold(); m.hold();
// v.draw(); //working on visibility work in progress // v.draw(); //working on visibility work in progress
level.drawFills();
level.customTopLayer(); level.customTopLayer();
simulation.draw.drawMapPath(); simulation.draw.drawMapPath();
b.fire(); b.fire();
@@ -54,13 +52,13 @@ const simulation = {
m.airControl() m.airControl()
} }
// level.checkZones(); // level.checkZones();
level.custom();
level.checkQuery(); level.checkQuery();
m.move(); m.move();
m.look(); m.look();
simulation.checks(); simulation.checks();
ctx.save(); ctx.save();
simulation.camera(); simulation.camera();
level.custom();
m.draw(); m.draw();
level.customTopLayer(); level.customTopLayer();
simulation.draw.wireFrame(); simulation.draw.wireFrame();
@@ -715,8 +713,6 @@ const simulation = {
m.fireCDcycle = 0 m.fireCDcycle = 0
m.drop(); m.drop();
m.hole.isOn = false; m.hole.isOn = false;
level.fill = [];
level.fillBG = [];
level.zones = []; level.zones = [];
level.queryList = []; level.queryList = [];
simulation.drawList = []; simulation.drawList = [];

View File

@@ -3486,67 +3486,9 @@ const spawn = {
}, },
boost(x, y, height = 1000) { boost(x, y, height = 1000) {
spawn.mapVertex(x + 50, y + 35, "120 40 -120 40 -50 -40 50 -40"); spawn.mapVertex(x + 50, y + 35, "120 40 -120 40 -50 -40 50 -40");
// level.addZone(x, y, 100, 30, "fling", {Vx:Vx, Vy: Vy});
level.addQueryRegion(x, y - 20, 100, 20, "boost", [ level.addQueryRegion(x, y - 20, 100, 20, "boost", [
[player], body, mob, powerUp, bullet [player], body, mob, powerUp, bullet
], -1.21 * Math.sqrt(Math.abs(height))); ], -1.21 * Math.sqrt(Math.abs(height)));
let color = "rgba(200,0,255,";
level.fillBG.push({
x: x,
y: y - 25,
width: 100,
height: 25,
color: color + "0.2)"
});
level.fillBG.push({
x: x,
y: y - 55,
width: 100,
height: 55,
color: color + "0.1)"
});
level.fillBG.push({
x: x,
y: y - 120,
width: 100,
height: 120,
color: color + "0.05)"
});
},
laserZone(x, y, width, height, dmg) {
level.addZone(x, y, width, height, "laser", {
dmg
});
level.fill.push({
x: x,
y: y,
width: width,
height: height,
color: "#f00"
});
},
deathQuery(x, y, width, height) {
level.addQueryRegion(x, y, width, height, "death", [
[player], mob
]);
level.fill.push({
x: x,
y: y,
width: width,
height: height,
color: "#f00"
});
},
platform(x, y, width, height) {
const size = 20;
spawn.mapRect(x, y + height, width, 30);
level.fillBG.push({
x: x + width / 2 - size / 2,
y: y,
width: size,
height: height,
color: "#f0f0f3"
});
}, },
blockDoor(x, y, blockSize = 60) { blockDoor(x, y, blockSize = 60) {
spawn.mapRect(x, y - 290, 40, 60); // door lip spawn.mapRect(x, y - 290, 40, 60); // door lip

View File

@@ -920,7 +920,7 @@
description: "<strong>20%</strong> chance to build a <strong class='color-bot'>bot</strong> after killing a mob<br>the <strong class='color-bot'>bot</strong> lasts for about <strong>20</strong> seconds", description: "<strong>20%</strong> chance to build a <strong class='color-bot'>bot</strong> after killing a mob<br>the <strong class='color-bot'>bot</strong> lasts for about <strong>20</strong> seconds",
maxCount: 3, maxCount: 3,
count: 0, count: 0,
frequency: 2, frequency: 1,
isBotTech: true, isBotTech: true,
allowed() { allowed() {
return b.totalBots() > 0 && !tech.sporesOnDeath && !tech.nailsDeathMob && !tech.isExplodeMob return b.totalBots() > 0 && !tech.sporesOnDeath && !tech.nailsDeathMob && !tech.isExplodeMob
@@ -938,7 +938,7 @@
description: "a <strong class='color-bot'>bot</strong> fires <strong>nails</strong> at mobs in line of sight", description: "a <strong class='color-bot'>bot</strong> fires <strong>nails</strong> at mobs in line of sight",
maxCount: 9, maxCount: 9,
count: 0, count: 0,
frequency: 2, frequency: 1,
isBot: true, isBot: true,
isBotTech: true, isBotTech: true,
allowed() { allowed() {
@@ -983,7 +983,7 @@
description: "a <strong class='color-bot'>bot</strong> fires <strong>foam</strong> at nearby mobs", description: "a <strong class='color-bot'>bot</strong> fires <strong>foam</strong> at nearby mobs",
maxCount: 9, maxCount: 9,
count: 0, count: 0,
frequency: 2, frequency: 1,
isBot: true, isBot: true,
isBotTech: true, isBotTech: true,
allowed() { allowed() {
@@ -1028,7 +1028,7 @@
description: "a <strong class='color-bot'>bot</strong> <strong>defends</strong> the space around you<br>ignites an <strong class='color-e'>explosion</strong> after hitting a mob", description: "a <strong class='color-bot'>bot</strong> <strong>defends</strong> the space around you<br>ignites an <strong class='color-e'>explosion</strong> after hitting a mob",
maxCount: 9, maxCount: 9,
count: 0, count: 0,
frequency: 2, frequency: 1,
isBot: true, isBot: true,
isBotTech: true, isBotTech: true,
allowed() { allowed() {
@@ -1073,7 +1073,7 @@
description: "a <strong class='color-bot'>bot</strong> uses <strong class='color-f'>energy</strong> to emit a <strong class='color-laser'>laser</strong> beam<br>that targets nearby mobs", description: "a <strong class='color-bot'>bot</strong> uses <strong class='color-f'>energy</strong> to emit a <strong class='color-laser'>laser</strong> beam<br>that targets nearby mobs",
maxCount: 9, maxCount: 9,
count: 0, count: 0,
frequency: 2, frequency: 1,
isBot: true, isBot: true,
isBotTech: true, isBotTech: true,
allowed() { allowed() {
@@ -1118,7 +1118,7 @@
description: "a <strong class='color-bot'>bot</strong> is locked in <strong>orbit</strong> around you<br><strong>stuns</strong> and <strong class='color-d'>damages</strong> mobs on <strong>contact</strong>", description: "a <strong class='color-bot'>bot</strong> is locked in <strong>orbit</strong> around you<br><strong>stuns</strong> and <strong class='color-d'>damages</strong> mobs on <strong>contact</strong>",
maxCount: 9, maxCount: 9,
count: 0, count: 0,
frequency: 2, frequency: 1,
isBot: true, isBot: true,
isBotTech: true, isBotTech: true,
allowed() { allowed() {
@@ -1172,7 +1172,7 @@
description: "a <strong class='color-bot'>bot</strong> <strong class='color-d'>damages</strong> mobs while it <strong>traces</strong> your path<br>regen <strong>6</strong> <strong class='color-f'>energy</strong> per second when it's near", description: "a <strong class='color-bot'>bot</strong> <strong class='color-d'>damages</strong> mobs while it <strong>traces</strong> your path<br>regen <strong>6</strong> <strong class='color-f'>energy</strong> per second when it's near",
maxCount: 9, maxCount: 9,
count: 0, count: 0,
frequency: 2, frequency: 1,
isBot: true, isBot: true,
isBotTech: true, isBotTech: true,
allowed() { allowed() {
@@ -1234,7 +1234,7 @@
description: "use <strong>1</strong> <strong class='color-r'>research</strong> to spawn a random <strong>bot</strong><br><strong>quadruple</strong> the <strong class='flicker'>frequency</strong> of finding <strong>bot</strong> <strong class='color-m'>tech</strong>", description: "use <strong>1</strong> <strong class='color-r'>research</strong> to spawn a random <strong>bot</strong><br><strong>quadruple</strong> the <strong class='flicker'>frequency</strong> of finding <strong>bot</strong> <strong class='color-m'>tech</strong>",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 2, frequency: 1,
isBotTech: true, isBotTech: true,
allowed() { allowed() {
return (b.totalBots() > 1 && powerUps.research.count > 0) || build.isExperimentSelection return (b.totalBots() > 1 && powerUps.research.count > 0) || build.isExperimentSelection
@@ -1330,7 +1330,7 @@
description: "increase <strong>block</strong> collision <strong class='color-d'>damage</strong> by <strong>100%</strong><br>charge <strong>throws</strong> more <strong>quickly</strong> for less <strong class='color-f'>energy</strong>", description: "increase <strong>block</strong> collision <strong class='color-d'>damage</strong> by <strong>100%</strong><br>charge <strong>throws</strong> more <strong>quickly</strong> for less <strong class='color-f'>energy</strong>",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 2, frequency: 1,
allowed() { allowed() {
return m.fieldUpgrades[m.fieldMode].name !== "wormhole" return m.fieldUpgrades[m.fieldMode].name !== "wormhole"
}, },
@@ -1380,7 +1380,7 @@
description: `after receiving <strong class='color-harm'>harm</strong> from a <strong>collision</strong> become<br><strong>immune</strong> to <strong class='color-harm'>harm</strong> for an extra <strong>0.75</strong> seconds`, description: `after receiving <strong class='color-harm'>harm</strong> from a <strong>collision</strong> become<br><strong>immune</strong> to <strong class='color-harm'>harm</strong> for an extra <strong>0.75</strong> seconds`,
maxCount: 9, maxCount: 9,
count: 0, count: 0,
frequency: 2, frequency: 1,
allowed() { allowed() {
return true return true
}, },
@@ -1916,7 +1916,7 @@
description: "increase your <strong>maximum</strong> <strong class='color-f'>energy</strong> by <strong>50</strong>", description: "increase your <strong>maximum</strong> <strong class='color-f'>energy</strong> by <strong>50</strong>",
maxCount: 9, maxCount: 9,
count: 0, count: 0,
frequency: 2, frequency: 1,
allowed() { allowed() {
return m.maxEnergy > 0.99 return m.maxEnergy > 0.99
}, },

View File

@@ -1,15 +1,16 @@
******************************************************** NEXT PATCH ******************************************************** ******************************************************** NEXT PATCH ********************************************************
tech: 1-body problem - do 100% damage if there is only 1 active bullet added new graphics to several maps
experiment mode and junk tech: random aiming to level developers: level.fillBG and level.fill no longer work,
you should draw backgrounds directly in level.custom like this:
bug fix - sniper, shooter aiming might be improved (no more firing backwards) level.custom = () => {
or maybe I just made it worse, let me know ctx.fillStyle = "rgba(0,255,255,0.1)";
ctx.fillRect(6400, -550, 300, 350);
bug fix - Shift registers level.playerExitCheck();
level.exit.draw();
working on rewriting the way backgrounds and foregrounds are drawn on each level (in progress) level.enter.draw();
};
******************************************************** BUGS ******************************************************** ******************************************************** BUGS ********************************************************
@@ -42,7 +43,11 @@ fix door.isOpen actually meaning isClosed?
******************************************************** TODO ******************************************************** ******************************************************** TODO ********************************************************
add water dips to sewers tech shotgun - crouching makes your spread very small
remove spread reduction on nail shot
doesn't apply to slug
add water drops to sewers
move power ups in front of blocks, make blocks not transparent? move power ups in front of blocks, make blocks not transparent?