From e86ec0c37dfb74e6d081343628b87e10c4180d1b Mon Sep 17 00:00:00 2001 From: landgreen Date: Sun, 8 Nov 2020 05:55:45 -0800 Subject: [PATCH] sentry mini black hole mobs travel through walls mod: radioactive contamination - after a mob or shield dies, leftover radiation spreads to a nearby mob mod: half-wave rectifier - railgun overfills with energy when you charge instead of draining removed rail gun mod - frame dragging bug fixed - rail gun bugs out when your charge speed gets very low mod: sentry - mines are modified to automatically fire nails at nearby targets for 12 seconds --- .gitignore | 2 + js/bullet.js | 74 +++++++++++++++------- js/game.js | 2 +- js/level.js | 22 +++---- js/mob.js | 32 +++++++++- js/mods.js | 91 +++++++++++++++++++++------ js/spawn.js | 26 ++++---- todo.txt | 174 +++++++++++++++++++++++---------------------------- 8 files changed, 260 insertions(+), 163 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..72e0db3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ + +.jsbeautifyrc diff --git a/js/bullet.js b/js/bullet.js index df9a245..0721575 100644 --- a/js/bullet.js +++ b/js/bullet.js @@ -594,7 +594,11 @@ const b = { }); Matter.Body.setAngularVelocity(this, 0) } - this.arm(); + if (mod.isMineSentry) { + this.sentry(); + } else { + this.arm(); + } //sometimes the mine can't attach to map and it just needs to be reset const that = this @@ -619,18 +623,47 @@ const b = { this.stillCount++ } } - if (this.stillCount > 25) this.arm(); + if (this.stillCount > 25) { + if (mod.isMineSentry) { + this.sentry(); + } else { + this.arm(); + } + } + }, + sentry() { + this.lookFrequency = game.cycle + 60 + this.endCycle = game.cycle + 720 + this.do = function() { //overwrite the do method for this bullet + this.force.y += this.mass * 0.002; //extra gravity + if (game.cycle > this.lookFrequency) { + this.lookFrequency = 14 + Math.floor(5 * Math.random()) + this.do = function() { //overwrite the do method for this bullet + this.force.y += this.mass * 0.002; //extra gravity + if (!(game.cycle % this.lookFrequency) && !mech.isBodiesAsleep) { //find mob targets + b.targetedNail(this.position, 1, 45 + 5 * Math.random(), 1100, false) + if (!(game.cycle % (this.lookFrequency * 6))) { + game.drawList.push({ + x: this.position.x, + y: this.position.y, + radius: 8, + color: "#fe0", + time: 4 + }); + } + } + } + } + } }, arm() { this.lookFrequency = game.cycle + 60 this.do = function() { //overwrite the do method for this bullet this.force.y += this.mass * 0.002; //extra gravity - if (game.cycle > this.lookFrequency) { this.isArmed = true this.lookFrequency = 50 + Math.floor(27 * Math.random()) game.drawList.push({ - //add dmg to draw queue x: this.position.x, y: this.position.y, radius: 10, @@ -1138,7 +1171,7 @@ const b = { World.add(engine.world, bullet[me]); //add bullet to world Matter.Body.setVelocity(bullet[me], velocity); }, - targetedNail(position, num = 1, speed = 50 + 10 * Math.random(), range = 1200) { + targetedNail(position, num = 1, speed = 50 + 10 * Math.random(), range = 1200, isRandomAim = true) { const targets = [] //target nearby mobs for (let i = 0, len = mob.length; i < len; i++) { if (mob[i].dropPowerUp) { @@ -1159,7 +1192,7 @@ const b = { y: targets[index].y + SPREAD * (Math.random() - 0.5) } b.nail(position, Vector.mult(Vector.normalise(Vector.sub(WHERE, position)), speed), 1.1) - } else { // aim in random direction + } else if (isRandomAim) { // aim in random direction const ANGLE = 2 * Math.PI * Math.random() b.nail(position, { x: speed * Math.cos(ANGLE), @@ -2830,8 +2863,8 @@ const b = { have: false, fire() { if (mod.isCapacitor) { - if (mech.energy > 0.15) { - mech.energy -= 0.15 + if (mech.energy > 0.16) { + mech.energy -= 0.16 mech.fireCDcycle = mech.cycle + Math.floor(30 * b.fireCD); const me = bullet.length; bullet[me] = Bodies.rectangle(mech.pos.x + 50 * Math.cos(mech.angle), mech.pos.y + 50 * Math.sin(mech.angle), 60, 14, { @@ -2982,7 +3015,7 @@ const b = { bullet[me].endCycle = Infinity bullet[me].charge = 0; bullet[me].do = function() { - if (mech.energy < 0.005 && !mod.isRailTimeSlow) { + if (mech.energy < 0.005 && !mod.isRailEnergyGain) { mech.energy += 0.05 + this.charge * 0.3 mech.fireCDcycle = mech.cycle + 120; // cool down if out of energy this.endCycle = 0; @@ -2995,10 +3028,6 @@ const b = { this.do = function() { this.force.y += this.mass * 0.0003 / this.charge; // low gravity that scales with charge } - if (mod.isRailTimeSlow) { - game.fpsCap = game.fpsCapDefault - game.fpsInterval = 1000 / game.fpsCap; - } Matter.Body.scale(this, 8000, 8000) // show the bullet by scaling it up (don't judge me... I know this is a bad way to do it) this.endCycle = game.cycle + 140 @@ -3045,17 +3074,20 @@ const b = { } } else { // charging on mouse down mech.fireCDcycle = Infinity //can't fire until mouse is released - const lastCharge = this.charge - let chargeRate = (mech.crouch) ? 0.98 : 0.984 - chargeRate *= Math.pow(b.fireCD, 0.03) - this.charge = this.charge * chargeRate + (1 - chargeRate) // this.charge converges to 1 - if (mod.isRailTimeSlow) { - game.fpsCap = 30 //new fps - game.fpsInterval = 1000 / game.fpsCap; + const previousCharge = this.charge + let smoothRate = 0.98 * (mech.crouch ? 0.99 : 1) * (0.98 + 0.02 * b.fireCD) //small b.fireCD = faster shots, b.fireCD=1 = normal shot, big b.fireCD = slower chot + this.charge = this.charge * smoothRate + 1 * (1 - smoothRate) + + // let chargeRate = (mech.crouch) ? 0.98 : 0.984 + // chargeRate *= Math.pow(b.fireCD, 0.03) + // this.charge = this.charge * chargeRate + (1 - chargeRate) // this.charge converges to 1 + if (mod.isRailEnergyGain) { + mech.energy += (this.charge - previousCharge) * 1.66 //energy drain is proportional to charge gained, but doesn't stop normal mech.fieldRegen } else { - mech.energy -= (this.charge - lastCharge) * 0.28 //energy drain is proportional to charge gained, but doesn't stop normal mech.fieldRegen + mech.energy -= (this.charge - previousCharge) * 0.33 //energy drain is proportional to charge gained, but doesn't stop normal mech.fieldRegen } + //draw targeting let best; let range = 3000 diff --git a/js/game.js b/js/game.js index ad1dac7..3b560f7 100644 --- a/js/game.js +++ b/js/game.js @@ -724,7 +724,7 @@ const game = { if (mech.lastKillCycle + 300 > mech.cycle) { //effects active for 5 seconds after killing a mob if (mod.isEnergyRecovery) mech.energy += mech.maxEnergy * 0.05 - if (mod.isHealthRecovery) mech.addHealth(0.01) + if (mod.isHealthRecovery) mech.addHealth(0.01 * mech.maxHealth) } if (!(game.cycle % 420)) { //once every 7 seconds diff --git a/js/level.js b/js/level.js index f8528f0..b236734 100644 --- a/js/level.js +++ b/js/level.js @@ -16,13 +16,9 @@ const level = { // game.enableConstructMode() //used to build maps in testing mode // game.zoomScale = 1000; // game.setZoom(); - // mech.isCloak = true; // mech.setField("wormhole") - // b.giveGuns("laser") - // for (let i = 0; i < 10; i++) { - // mod.giveMod("laser-bot"); - // } - // mod.giveMod("cardinality") + b.giveGuns("mine") + mod.giveMod("sentry") level.intro(); //starting level @@ -152,11 +148,11 @@ const level = { // spawn.spawner(1600, -500) // spawn.sniper(1700, -120, 50) // spawn.bomberBoss(1400, -500) - spawn.launcher(1800, -120) + spawn.sucker(1800, -120) // spawn.cellBossCulture(1600, -500) // spawn.powerUpBoss(1600, -500) // spawn.sniper(1200, -500) - // spawn.shield(mob[mob.length - 1], 1200, -500, 1); + // spawn.shield(mob[mob.length - 1], 1800, -120, 1); // spawn.nodeBoss(1200, -500, "launcher") // spawn.snakeBoss(1200, -500) @@ -220,16 +216,16 @@ const level = { document.body.style.backgroundColor = "#ccc"; level.fill.push({ - x: 6400, + x: 5400, y: -550, width: 300, height: 350, color: "rgba(0,255,255,0.1)" }); - spawn.mapRect(-950, 0, 7200, 800); //ground - spawn.mapRect(-950, -1500, 800, 1900); //left wall - spawn.mapRect(-950, -2300, 7200, 800); //roof + spawn.mapRect(-1950, 0, 8200, 1800); //ground + spawn.mapRect(-1950, -1500, 1800, 1900); //left wall + spawn.mapRect(-1950, -3300, 8200, 1800); //roof spawn.mapRect(-250, -200, 1000, 300); // shelf spawn.mapRect(-250, -1700, 1000, 1250); // shelf roof spawn.blockDoor(710, -210); @@ -238,7 +234,7 @@ const level = { spawn.mapRect(5400, -1700, 400, 1150); //right wall spawn.mapRect(5400, -300, 400, 400); //right wall - spawn.mapRect(5700, -2300, 800, 3100); //right wall + spawn.mapRect(5700, -3300, 1800, 5100); //right wall spawn.mapRect(level.exit.x, level.exit.y + 20, 100, 100); //exit bump }, diff --git a/js/mob.js b/js/mob.js index 4129763..d163692 100644 --- a/js/mob.js +++ b/js/mob.js @@ -156,7 +156,7 @@ const mobs = { who.status.push({ effect() { if ((game.cycle - this.startCycle) % 30 === 0) { - let dmg = b.dmgScale * tickDamage + let dmg = b.dmgScale * this.dmg who.damage(dmg); game.drawList.push({ //add dmg to draw queue x: who.position.x + (Math.random() - 0.5) * who.radius * 0.5, @@ -172,7 +172,8 @@ const mobs = { } }, endEffect() {}, - // type: "DoT", + dmg: tickDamage, + type: "dot", endCycle: game.cycle + cycles, startCycle: game.cycle }) @@ -1060,6 +1061,33 @@ const mobs = { powerUps.spawn(this.position.x, this.position.y, type); } } + if (true) { + //look for dots and spread them + let dmgTotal = 0 + for (let i = 0, len = this.status.length; i < len; i++) { + if (this.status[i].type === "dot") dmgTotal += this.status[i].dmg * (this.status[i].endCycle - game.cycle) + } + if (dmgTotal > 0) { //look for closest mob + let closestRadius = 500; + let closestIndex = null; + for (let i = 0, len = mob.length; i < len; ++i) { + const radius = Vector.magnitude(Vector.sub(this.position, mob[i].position)) + if (mob[i].alive && !mob[i].isShielded && radius < closestRadius) { + closestRadius = radius + closestIndex = i + } + } + if (closestIndex) mobs.statusDoT(mob[closestIndex], dmgTotal / 180, 180) + //draw AOE + // game.drawList.push({ //add dmg to draw queue + // x: this.position.x, + // y: this.position.y, + // radius: radius, + // color: "rgba(0,80,80,0.03)", + // time: 15 + // }); + } + } }, removeConsBB() { for (let i = 0, len = consBB.length; i < len; ++i) { diff --git a/js/mods.js b/js/mods.js index add0322..a3e7088 100644 --- a/js/mods.js +++ b/js/mods.js @@ -92,7 +92,7 @@ const mod = { if (mod.restDamage > 1 && player.speed < 1) dmg *= mod.restDamage if (mod.isEnergyDamage) dmg *= 1 + mech.energy / 5.5; if (mod.isDamageFromBulletCount) dmg *= 1 + bullet.length * 0.0038 - if (mod.isRerollDamage) dmg *= 1 + 0.05 * powerUps.reroll.rerolls + if (mod.isRerollDamage) dmg *= 1 + 0.04 * powerUps.reroll.rerolls if (mod.isOneGun && b.inventory.length < 2) dmg *= 1.25 if (mod.isNoFireDamage && mech.cycle > mech.fireCDcycle + 120) dmg *= 1.5 return dmg * mod.slowFire * mod.aimDamage @@ -245,7 +245,7 @@ const mod = { }, { name: "perturbation theory", - description: "increase damage by 5%
for each of your rerolls", + description: "increase damage by 4%
for each of your rerolls", maxCount: 1, count: 0, allowed() { @@ -1885,6 +1885,22 @@ const mod = { mod.isFlechetteExplode = false } }, + { + name: "radioactive contamination", + description: "after a mob or shield dies,
leftover radiation spreads to a nearby mob", + maxCount: 1, + count: 0, + allowed() { + return mod.haveGunCheck("flechettes") || mod.isNailPoison || mod.isHeavyWater || mod.isWormholeDamage + }, + requires: "radiation damage source", + effect() { + mod.isRadioactive = true + }, + remove() { + mod.isRadioactive = false + } + }, { name: "piercing needles", description: "needles penetrate mobs and blocks
potentially hitting multiple targets", @@ -2095,9 +2111,9 @@ const mod = { maxCount: 1, count: 0, allowed() { - return mod.haveGunCheck("mine") + return mod.haveGunCheck("mine") && !mod.isMineSentry }, - requires: "mine", + requires: "mine, not sentry", effect() { mod.isMineAmmoBack = true; }, @@ -2105,6 +2121,22 @@ const mod = { mod.isMineAmmoBack = false; } }, + { + name: "sentry", + description: "mines are modified to target mobs with nails
mines last about 12 seconds", + maxCount: 1, + count: 0, + allowed() { + return mod.haveGunCheck("mine") && !mod.isMineAmmoBack + }, + requires: "mine, not mine reclamation", + effect() { + mod.isMineSentry = true; + }, + remove() { + mod.isMineSentry = false; + } + }, { name: "irradiated nails", description: "nails are made with a cobalt-60 alloy
85% radioactive damage over 2 seconds", @@ -2123,7 +2155,7 @@ const mod = { }, { name: "railroad ties", - description: "nails are 70% larger
increases physical damage by about 25%", + description: "nails are 50% larger
increases physical damage by about 25%", maxCount: 1, count: 0, allowed() { @@ -2131,7 +2163,7 @@ const mod = { }, requires: "nails", effect() { - mod.biggerNails += 0.7 + mod.biggerNails += 0.5 }, remove() { mod.biggerNails = 1 @@ -2346,22 +2378,38 @@ const mod = { // mod.isLargeFoam = false; // } // }, + // { + // name: "frame-dragging", + // description: "slow time while charging the rail gun
charging no longer drains energy", + // maxCount: 1, + // count: 0, + // allowed() { + // return game.fpsCapDefault > 45 && mod.haveGunCheck("rail gun") && !mod.isSlowFPS && !mod.isCapacitor + // }, + // requires: "rail gun and FPS above 45", + // effect() { + // mod.isRailTimeSlow = true; + // }, + // remove() { + // mod.isRailTimeSlow = false; + // game.fpsCap = game.fpsCapDefault + // game.fpsInterval = 1000 / game.fpsCap; + // } + // }, { - name: "frame-dragging", - description: "slow time while charging the rail gun
charging no longer drains energy", + name: "half-wave rectifier", + description: "charging the rail gun overfills your energy
instead of draining it", maxCount: 1, count: 0, allowed() { - return game.fpsCapDefault > 45 && mod.haveGunCheck("rail gun") && !mod.isSlowFPS && !mod.isCapacitor + return mod.haveGunCheck("rail gun") && !mod.isCapacitor }, - requires: "rail gun and FPS above 45", + requires: "rail gun, not capacitor bank", effect() { - mod.isRailTimeSlow = true; + mod.isRailEnergyGain = true; }, remove() { - mod.isRailTimeSlow = false; - game.fpsCap = game.fpsCapDefault - game.fpsInterval = 1000 / game.fpsCap; + mod.isRailEnergyGain = false; } }, { @@ -2370,9 +2418,9 @@ const mod = { maxCount: 1, count: 0, allowed() { - return mod.haveGunCheck("rail gun") && !mod.isRailTimeSlow + return mod.haveGunCheck("rail gun") && !mod.isRailEnergyGain }, - requires: "rail gun", + requires: "rail gun, not half-wave rectifier", effect() { mod.isCapacitor = true; }, @@ -2456,7 +2504,7 @@ const mod = { allowed() { return mod.haveGunCheck("laser") && mod.laserReflections < 3 && !mod.beamSplitter && !mod.isPulseLaser }, - requires: "laser, not specular reflection
not beam splitter", + requires: "laser, not specular reflection
not diffraction grating", effect() { if (mod.wideLaser === 0) mod.wideLaser = 3 mod.isWideLaser = true; @@ -2474,7 +2522,7 @@ const mod = { allowed() { return mod.haveGunCheck("laser") && mod.isWideLaser }, - requires: "laser, not specular reflection
not beam splitter", + requires: "laser, not specular reflection
not diffraction grating", effect() { mod.wideLaser = 4 }, @@ -2494,7 +2542,7 @@ const mod = { allowed() { return mod.haveGunCheck("laser") && mod.laserReflections < 3 && !mod.isWideLaser }, - requires: "laser, not specular reflection
not beam splitter, not diffuse", + requires: "laser, not specular reflection, not diffuse", effect() { mod.isPulseLaser = true; for (i = 0, len = b.guns.length; i < len; i++) { //find which gun @@ -3208,5 +3256,8 @@ const mod = { isWideLaser: null, wideLaser: null, isPulseLaser: null, - timeEnergyRegen: null + timeEnergyRegen: null, + isRadioactive: null, + isRailEnergyGain: null, + isMineSentry: null } \ No newline at end of file diff --git a/js/spawn.js b/js/spawn.js index 63d8513..0172ece 100644 --- a/js/spawn.js +++ b/js/spawn.js @@ -94,7 +94,7 @@ const spawn = { me.frictionAir = 0.01; me.memory = Infinity; me.locatePlayer(); - const density = 1 + const density = 1.1 Matter.Body.setDensity(me, density); //extra dense //normal is 0.001 //makes effective life much larger // spawn.shield(me, x, y, 1); me.onDeath = function() { @@ -160,8 +160,9 @@ const spawn = { } this.mode = 3 this.fill = "#000"; - this.eventHorizon = 1200 - this.rotateVelocity = Math.abs(this.rotateVelocity) * (player.position.x > this.position.x ? 1 : -1) //rotate so that the player can get away + this.eventHorizon = 700 + this.spawnInterval = 600 + this.rotateVelocity = 0.001 * (player.position.x > this.position.x ? 1 : -1) //rotate so that the player can get away if (!this.isShielded) spawn.shield(this, x, y, 1); //regen shield here ? this.modeDo = this.modeAll } @@ -173,12 +174,13 @@ const spawn = { this.modeSuck() this.modeLasers() } + me.spawnInterval = 302 me.modeSpawns = function() { - if ((this.cycle === 2 || this.cycle === 300) && !mech.isBodiesAsleep && mob.length < 40) { + if (!(this.cycle % this.spawnInterval) && !mech.isBodiesAsleep && mob.length < 40) { Matter.Body.setAngularVelocity(this, 0.1) //fire a bullet from each vertex + let whoSpawn = spawn.fullPickList[Math.floor(Math.random() * spawn.fullPickList.length)]; for (let i = 0, len = this.vertices.length; i < len; i++) { - let whoSpawn = spawn.fullPickList[Math.floor(Math.random() * spawn.fullPickList.length)]; spawn[whoSpawn](this.vertices[i].x, this.vertices[i].y); //give the bullet a rotational velocity as if they were attached to a vertex const velocity = Vector.mult(Vector.perp(Vector.normalise(Vector.sub(this.position, this.vertices[i]))), -18) @@ -737,16 +739,17 @@ const spawn = { } } }, - sucker(x, y, radius = 30 + Math.ceil(Math.random() * 70)) { + sucker(x, y, radius = 40 + Math.ceil(Math.random() * 50)) { radius = 9 + radius / 8; //extra small mobs.spawn(x, y, 6, radius, "#000"); let me = mob[mob.length - 1]; me.stroke = "transparent"; //used for drawSneaker me.eventHorizon = radius * 23; //required for blackhole - me.seeAtDistance2 = (me.eventHorizon + 500) * (me.eventHorizon + 500); //vision limit is event horizon - me.accelMag = 0.00009 * game.accelScale; - // me.frictionAir = 0.005; - me.memory = 600; + me.seeAtDistance2 = (me.eventHorizon + 200) * (me.eventHorizon + 200); //vision limit is event horizon + me.accelMag = 0.0001 * game.accelScale; + me.frictionAir = 0.025; + me.collisionFilter.mask = cat.player | cat.bullet + me.memory = Infinity; Matter.Body.setDensity(me, 0.004); //extra dense //normal is 0.001 //makes effective life much larger me.do = function() { //keep it slow, to stop issues from explosion knock backs @@ -756,7 +759,8 @@ const spawn = { y: this.velocity.y * 0.99 }); } - this.seePlayerByDistOrLOS(); + // this.seePlayerByDistOrLOS(); + this.seePlayerCheckByDistance() this.checkStatus(); if (this.seePlayer.recall) { //eventHorizon waves in and out diff --git a/todo.txt b/todo.txt index 1f5a84b..71a45f1 100644 --- a/todo.txt +++ b/todo.txt @@ -1,14 +1,86 @@ +*********** NEXT PATCH *********** -update to mod: anthropic principle - only works once per level - but gives 6 seconds of damage immunity and 2 extra heal power ups +mini black hole mobs travel through walls -most energy regeneration effects now overfill energy above the max by default -piezo electricity over fills energy by 300% (was 100%) +mod: radioactive contamination - after a mob or shield dies, leftover radiation spreads to a nearby mob -************** TODO - n-gon ************** +mod: half-wave rectifier - railgun overfills with energy when you charge instead of draining + removed rail gun mod - frame dragging +bug fixed - rail gun bugs out when your charge speed gets very low + +mod: sentry - mines are modified to automatically fire nails at nearby targets for 12 seconds + +************** BUGS ************** + +bug - crouch and worm hole? -> crouch locked in +bug - getting locked into crouch on community levels, but showing the player as still standing + +bug - capping the fps causes random slow downs, that can be fixed with pause + +bug - mine spawned one new mine every second + after sticking to the top right corner of a wall + notes: had only gun mine, mod mine reclamation, field plasma, +bug - mines spawn extra mines when fired at thin map wall while jumping + +************** MODS ************** + +mod - self destruct - drones explode when they die + drones lose extra time on collisions, so they often explode after a collision + +mod - a bot that eats up health and ammo, but poops out a mod (10 power ups = 1 mod?) + or it poops a reroll after picking up 2 heal/ammo + requires the reroll -> bot mod + 4 rerolls can convert to a bot, also 1 rerolls can convert to 5% damage + the mods that do those effects could be required before you see this bot + it passes through walls + moves slower then the player so you can get to it before the bot if you hurry + disable crystalized armor? + +mod - rerolls give at least 1 mod that applies your field and gun if possible + give fields and guns a tag + also spawn a few rerolls for balance? + +mod: take less harm if you are in the air + require squirrel cage rotor + +mod - explosions apply radiation damage over time + or spawn a neutron bomb with a short timer + +mod - remove a random mod as a condition for picking up a really good mod + +mod - double the player's time rate (like you do with the time dilation mod) + +mod - do something for 2 seconds after firing + if (mech.fireCDcycle + 120) + +mod - do 50% more damage in close, but 50% less at a distance + code it like mod.isFarAwayDmg + have these mods disable each other + +mod - bot very slowly follows you and gives you a bonus when it's in range + it moves through walls + effect: damage bonus?, damage reduction?, push away mobs, limit top speed of mobs/blocks/player? + +mod - foam is attracted to mobs + use a gravitational attraction model? + could foam be attracted to other foam bullets too? + or foam is only attracted to foam bullets that are stuck to mobs + is this too computationally intense? + name - static cling + could also do bremsstrahlung radiation like damage on attachment + +************** TODO ************** + +repeat map in vertical and horizontal space + or at least vertical space + camera looks strange when you teleport player with a high velocity + +sucker mobs do something when they touch blocks + heal + remove the blocks from the map add an ending to the game - maybe the game ending should ask you to open the console and type in some commands + maybe the game ending should ask you to open the console and type in some commands like in the end of doki doki mirror ending (if no cheats) level after final boss battle is the intro level, but flipped left right, with a fake player damage the fake player to end the game @@ -18,24 +90,12 @@ add an ending to the game also game goes on if player attacks, the fake player game never ends if you have used cheats -laser mod - your laser beam fires from your last position, not your current position - or apply to all guns? - -mod: While in the air, time is slowed. - or something else while in air - -a bot that eats ammo and converts them into rerolls - or 2 ammo power ups = 1 reroll - -been getting some fps slow down after playing for a few minutes - this seems to be caused by capping the fps at 60, but 60 fps shouldn't have any slowdown - new status effect: fear - push mob away from player for a time new status effect - apply status effect to mobs that makes blocks attracted to them only lasts a few cycles -in hard and why have some mobs spawn in later in the level +have some mobs spawn in later in the level (in hard and why modes) where at defined points in array levelSpawns = [{x:0,y:0},{x:0,y:0}] store the locations of mobs when the level starts to use as respawn points @@ -44,40 +104,12 @@ in hard and why have some mobs spawn in later in the level after some mobs are dead after the boss is killed -mod - explosions apply radiation damage over time - or spawn a neutron bomb with a short timer - -mod self destruct - drones explode when they die - drones lose extra time on collisions - -foam or spore bullet on dmg shrink effect - it might mess with the foam position of other bullets on the mob - shrink when foam bullets end while attached, or shrink on collision? - -time dilation mod rework / buff (time dilation is cool, but it can feel like a chore) - redistribute effects - take no damage - can fire - 2x move jump fire while field is active - 40% move jump fire always - -mod - after a mob or shield dies, remaining dots look for a new nearby host - or mod: radiation effects can spread to nearby mobs - look for mods that could update description text with count and mod.is information can only use variables that change in effect() and remove() this.description = `8% chance to duplicate spawned power ups
chance to duplicate = ${mod.duplicateChance}` - mouse event e.which is deprecated -mod: take less harm if you are moving fast - require squirrel cage rotor - -bug - mine spawned one new mine every second - after sticking to the top right corner of a wall - notes: had only gun mine, mod mine reclamation, field plasma, - add a flag to some bullets to indicate that mobs can't learn the player position from bullet damage in bullet-mob collisions if isNotRevealPlayerLocation flag is true have the mob still know player location if nearby player on hide if bullet age is above 4 seconds? @@ -90,35 +122,8 @@ add a flag to some bullets to indicate that mobs can't learn the player position add some more computer / AI stuff to the level lore text -mod - mines stun targets nearby when they explode - -mod - do something for 2 seconds after firing - if (mech.fireCDcycle + 120) - -Health mod idea: health can go above max health. At the end of each level, the amount of health above max is halved. - general idea: shrink mech.baseHealth in a mod or field -mod: some drones(or spores) have a chance to spawn as a more power full version - do electric damage to nearby mobs - stun effect? - -a bot that eats up health and ammo, but poops a reroll after picking up 2 power ups - it passes through walls - moves slower then the player so you can get to it before the bot if you hurry - 4 rerolls can convert to a bot, also 1 rerolls can convert to 5% damage - the mods that do those effects could be required before you see this bot - disable crystalized armor? - could convert rerolls, ammo, and health into mods instead - -mod: foam is attracted to mobs - use a gravitational attraction model? - could foam be attracted to other foam bullets too? - or foam is only attracted to foam bullets that are stuck to mobs - is this too computationally intense? - name - static cling - could also do bremsstrahlung radiation like damage on attachment - change player color based on harm reduction standing wave harmonics mod - push things away @@ -134,8 +139,6 @@ use mac automator to speed up your n-gon -> git sync fix door.isOpen actually meaning isClosed -give missiles a suck and delay explosion, like vacuum bomb - level Boss: fractal SierpiƄski triangle https://en.wikipedia.org/wiki/Sierpi%C5%84ski_triangle spawns a 1/2 size version of the boss, this version can also spawn a smaller version, but it is capped at some size level @@ -193,12 +196,6 @@ lore - a robot (the player) gains self awareness to overcome the (mobs, dangerous levels) to achieve a (technological singularity/positive technological feedback loop) -new gun - deploy a turret that last for 20 seconds - fire nails at nearby targets once a second. - use mine code and bot code -mod - mines become a turret that fires nails - it could float to the mouse location on fire - level boss: fires a line intersection in a random direction every few seconds. the last two intersections have a destructive laser between them. @@ -211,17 +208,6 @@ map: prison doors linked to buttons mobs inside the doors? -mod - do 50% more damage in close, but 50% less at a distance - code it like mod.isFarAwayDmg - have these mods disable each other - -mod harmonic shield: slow everything in range around shield (temporal shield) - set max speed? - -mod: bot very slowly follows you and gives you a bonus when it's in range - it moves through walls - effect: damage bonus?, damage reduction?, push away mobs, limit top speed of mobs/blocks/player? - graphic idea: bezier curve that moves smoothly from mob to mob loops around player @@ -237,8 +223,6 @@ movement fluidity wall grab? maybe remove falling damage and block damage? -bug - mines spawn extra mines when fired at thin map wall while jumping - redblobgames.com/articles/visibility https://github.com/Silverwolf90/2d-visibility/tree/master/src could apply to explosions, neutron bomb, player LOS