moving files to different computer

reworked focuser mobs to fire blue energy draining laser instead of charging player
This commit is contained in:
landgreen
2024-11-29 18:47:49 -08:00
parent 97c5509278
commit 1966173f88
3 changed files with 142 additions and 129 deletions

View File

@@ -60,12 +60,12 @@ const level = {
// for (let i = 0; i < 1; i++) powerUps.directSpawn(450, -50, "warp"); // for (let i = 0; i < 1; i++) powerUps.directSpawn(450, -50, "warp");
// for (let i = 0; i < 7; i++) powerUps.directSpawn(m.pos.x + 200, m.pos.y - 250, "research", false); // for (let i = 0; i < 7; i++) powerUps.directSpawn(m.pos.x + 200, m.pos.y - 250, "research", false);
// spawn.bodyRect(575, -700, 150, 150); //block mob line of site on testing // spawn.bodyRect(575, -700, 150, 150); //block mob line of site on testing
// level.substructure(); // level.cocoon();
level[simulation.isTraining ? "walk" : "initial"]() //normal starting level ************************************************** level[simulation.isTraining ? "walk" : "initial"]() //normal starting level **************************************************
// for (let i = 0; i < 5; ++i) spawn.sneaker(1900, -500) // for (let i = 0; i < 1; ++i) spawn.shieldingBoss(1900, -500)
// for (let i = 0; i < 1; i++) spawn.mantisBoss(1900, -500) // for (let i = 0; i < 1; i++) spawn.mantisBoss(1900, -500)
// for (let i = 0; i < 1; ++i) powerUps.directSpawn(m.pos.x + 50 * Math.random(), m.pos.y + 50 * Math.random(), "entanglement"); // for (let i = 0; i < 1; ++i) powerUps.directSpawn(m.pos.x + 50 * Math.random(), m.pos.y + 50 * Math.random(), "entanglement");
@@ -3093,8 +3093,9 @@ const level = {
// ctx.font = "50px Arial"; // ctx.font = "50px Arial";
// ctx.fillStyle = "rgba(0,0,0,0.3)" // ctx.fillStyle = "rgba(0,0,0,0.3)"
// for (let i = 0; i < 5; i++) { // for (let i = 0; i < 5; i++) {
// const wiggle = 10 // const wiggle = 2
// ctx.fillText("move", 500 + wiggle * Math.random(), -500 + wiggle * Math.random()); // ctx.fillText("move", 500 + wiggle * Math.random(), -500 + wiggle * Math.random());
// ctx.fillText("move", 500, -400);
// } // }
//push around power ups stuck in the tube wall //push around power ups stuck in the tube wall
@@ -8154,6 +8155,46 @@ const level = {
powerUps.directSpawn(2100, 925, "heal"); powerUps.directSpawn(2100, 925, "heal");
powerUps.directSpawn(625, -100, "heal"); powerUps.directSpawn(625, -100, "heal");
}, },
cocoon() {
// simulation.fallHeight = 4000
level.announceMobTypes()
level.setPosToSpawn(-3800, 950);
level.exit.x = 3750
level.exit.y = -625
level.defaultZoom = 2000
simulation.zoomTransition(level.defaultZoom)
document.body.style.backgroundColor = "#d0d5d5";
color.map = "#444"
level.custom = () => {
level.exit.drawAndCheck();
level.enter.draw();
};
level.customTopLayer = () => {
ctx.fillStyle = "rgba(0,255,255,0.1)" //"#d4f4f4" //exit
ctx.fillRect(3535, -1050, 500, 475);
//shadows
ctx.fillStyle = "rgba(0,20,60,0.09)"
// ctx.fillRect(-4025, -1050, 1750, 2275);
};
//boxes center on zero,zero with deep walls to hide background
spawn.mapRect(4000, -2000, 2000, 4000); //right map wall
spawn.mapRect(-6000, -2000, 2000, 4000); //left map wall
spawn.mapRect(-6000, -4000, 12000, 3000); //map ceiling
spawn.mapRect(-6000, 1000, 12000, 3000); //floor
// spawn.randomMob(2825, 75, 0.9);
// spawn.randomLevelBoss(2400, 600);
// spawn.secondaryBossChance(800, -300)
// powerUps.spawnStartingPowerUps(600, 375);
// powerUps.addResearchToLevel() //needs to run after mobs are spawned
},
lock() { lock() {
level.announceMobTypes() level.announceMobTypes()
level.setPosToSpawn(0, -65); //lower start level.setPosToSpawn(0, -65); //lower start

View File

@@ -3089,28 +3089,32 @@ const spawn = {
if (this.seePlayer.yes && dist2 < 4000000) { if (this.seePlayer.yes && dist2 < 4000000) {
const rangeWidth = 2000; //this is sqrt of 4000000 from above if() const rangeWidth = 2000; //this is sqrt of 4000000 from above if()
//targeting laser will slowly move from the mob to the player's position //targeting laser will slowly move from the mob to the player's position
this.laserPos = Vector.add(this.laserPos, Vector.mult(Vector.sub(player.position, this.laserPos), 0.1)); this.laserPos = Vector.add(this.laserPos, Vector.mult(Vector.sub(player.position, this.laserPos), 0.03));
let targetDist = Vector.magnitude(Vector.sub(this.laserPos, m.pos)); let targetDist = Vector.magnitude(Vector.sub(this.laserPos, m.pos));
const r = 12; const r = 12;
ctx.beginPath(); ctx.beginPath();
ctx.moveTo(this.position.x, this.position.y); ctx.moveTo(this.position.x, this.position.y);
if (targetDist < r + 16) { if (targetDist < r + 16) {
targetDist = r + 10; targetDist = r + 10;
//charge at player if (m.immuneCycle < m.cycle) {
const forceMag = this.accelMag * 40 * this.mass; m.damage(0.0003 * simulation.dmgScale);
const angle = Math.atan2(this.seePlayer.position.y - this.position.y, this.seePlayer.position.x - this.position.x); if (m.energy > 0.1) m.energy -= 0.003
this.force.x += forceMag * Math.cos(angle); }
this.force.y += forceMag * Math.sin(angle); ctx.beginPath();
} ctx.moveTo(this.position.x, this.position.y);
// else { ctx.lineTo(m.pos.x, m.pos.y);
//high friction if can't lock onto player ctx.lineTo(m.pos.x + (Math.random() - 0.5) * 3000, m.pos.y + (Math.random() - 0.5) * 3000);
// Matter.Body.setVelocity(this, { ctx.lineWidth = 2;
// x: this.velocity.x * 0.98, ctx.strokeStyle = "rgb(0,0,255)";
// y: this.velocity.y * 0.98 ctx.setLineDash([125 * Math.random(), 125 * Math.random()]);
// }); ctx.stroke();
// } ctx.setLineDash([]);
if (dist2 > 80000) { ctx.beginPath();
const laserWidth = 0.002; ctx.arc(m.pos.x, m.pos.y, 40, 0, 2 * Math.PI);
ctx.fillStyle = "rgba(0,0,255,0.1)";
ctx.fill();
} else {
const laserWidth = 0.0005;
let laserOffR = Vector.rotateAbout(this.laserPos, (targetDist - r) * laserWidth, this.position); let laserOffR = Vector.rotateAbout(this.laserPos, (targetDist - r) * laserWidth, this.position);
let sub = Vector.normalise(Vector.sub(laserOffR, this.position)); let sub = Vector.normalise(Vector.sub(laserOffR, this.position));
laserOffR = Vector.add(laserOffR, Vector.mult(sub, rangeWidth)); laserOffR = Vector.add(laserOffR, Vector.mult(sub, rangeWidth));
@@ -3120,7 +3124,7 @@ const spawn = {
sub = Vector.normalise(Vector.sub(laserOffL, this.position)); sub = Vector.normalise(Vector.sub(laserOffL, this.position));
laserOffL = Vector.add(laserOffL, Vector.mult(sub, rangeWidth)); laserOffL = Vector.add(laserOffL, Vector.mult(sub, rangeWidth));
ctx.lineTo(laserOffL.x, laserOffL.y); ctx.lineTo(laserOffL.x, laserOffL.y);
ctx.fillStyle = `rgba(0,0,255,${Math.max(0, 0.3 * r / targetDist)})` ctx.fillStyle = `rgba(0,0,255,${Math.max(0, 0.6 * r / targetDist)})`
ctx.fill(); ctx.fill();
} }
} else { } else {
@@ -3128,6 +3132,69 @@ const spawn = {
} }
} }
}, },
// focuser(x, y, radius = 30 + Math.ceil(Math.random() * 10)) {
// radius = Math.ceil(radius * 0.7);
// mobs.spawn(x, y, 4, radius, "rgb(0,0,255)");
// let me = mob[mob.length - 1];
// Matter.Body.setDensity(me, 0.003); //extra dense //normal is 0.001
// me.restitution = 0;
// me.laserPos = me.position; //required for laserTracking
// me.repulsionRange = 1200000; //squared
// me.accelMag = 0.00009 * simulation.accelScale;
// me.frictionStatic = 0;
// me.friction = 0;
// me.onDamage = function () {
// this.laserPos = this.position;
// };
// spawn.shield(me, x, y);
// me.do = function () {
// this.seePlayerByLookingAt();
// this.checkStatus();
// this.attraction();
// const dist2 = this.distanceToPlayer2();
// //laser Tracking
// if (this.seePlayer.yes && dist2 < 4000000) {
// const rangeWidth = 2000; //this is sqrt of 4000000 from above if()
// //targeting laser will slowly move from the mob to the player's position
// this.laserPos = Vector.add(this.laserPos, Vector.mult(Vector.sub(player.position, this.laserPos), 0.1));
// let targetDist = Vector.magnitude(Vector.sub(this.laserPos, m.pos));
// const r = 12;
// ctx.beginPath();
// ctx.moveTo(this.position.x, this.position.y);
// if (targetDist < r + 16) {
// targetDist = r + 10;
// //charge at player
// const forceMag = this.accelMag * 40 * this.mass;
// const angle = Math.atan2(this.seePlayer.position.y - this.position.y, this.seePlayer.position.x - this.position.x);
// this.force.x += forceMag * Math.cos(angle);
// this.force.y += forceMag * Math.sin(angle);
// }
// // else {
// //high friction if can't lock onto player
// // Matter.Body.setVelocity(this, {
// // x: this.velocity.x * 0.98,
// // y: this.velocity.y * 0.98
// // });
// // }
// if (dist2 > 80000) {
// const laserWidth = 0.002;
// let laserOffR = Vector.rotateAbout(this.laserPos, (targetDist - r) * laserWidth, this.position);
// let sub = Vector.normalise(Vector.sub(laserOffR, this.position));
// laserOffR = Vector.add(laserOffR, Vector.mult(sub, rangeWidth));
// ctx.lineTo(laserOffR.x, laserOffR.y);
// let laserOffL = Vector.rotateAbout(this.laserPos, (targetDist - r) * -laserWidth, this.position);
// sub = Vector.normalise(Vector.sub(laserOffL, this.position));
// laserOffL = Vector.add(laserOffL, Vector.mult(sub, rangeWidth));
// ctx.lineTo(laserOffL.x, laserOffL.y);
// ctx.fillStyle = `rgba(0,0,255,${Math.max(0, 0.3 * r / targetDist)})`
// ctx.fill();
// }
// } else {
// this.laserPos = this.position;
// }
// }
// },
flutter(x, y, radius = 20 + 6 * Math.random()) { flutter(x, y, radius = 20 + 6 * Math.random()) {
mobs.spawn(x, y, 7, radius, '#16576b'); mobs.spawn(x, y, 7, radius, '#16576b');
let me = mob[mob.length - 1]; let me = mob[mob.length - 1];

121
todo.txt
View File

@@ -1,24 +1,6 @@
******************************************************** NEXT PATCH ************************************************** ******************************************************** NEXT PATCH **************************************************
reworked m.switchWorlds() (used in many-worlds and similar effects) reworked focuser mobs to fire blue energy draining laser instead of charging player
no longer has extra bot build up
effects that carry over into next world:
your total tech count
effects of non-removeable tech, like determinism
mass production research ramps up by 5->4 each time
bot fabrications cost ramp is increased to (+1 per 4)-->(+1 per 3)
lowered minimum threshold for making small heals from over healing to 13->20 health
snakeBoss invulnerable phase is 5->4 seconds long
time dilation disables level based lasers
adjusted laser sensor paths on substructure level
move splash screen buttons to bottom right
added a start button
details menus in splash screen now have individual widths instead of sharing with each other
bugs
non-renewables change color for ammo power ups on current level
******************************************************** BUGS ******************************************************** ******************************************************** BUGS ********************************************************
@@ -58,18 +40,18 @@ player can become crouched while not touching the ground if they exit the ground
*********************************************************** TODO ***************************************************** *********************************************************** TODO *****************************************************
animate adding new tech or guns or field to the text menu new level - something with movers, rubber band blocks
css transitions or trigger an animation? button/switch input ideas from Cocoon game
bold for 3-5 seconds pick up blocks that have a rubber band attached to a sliding switch
is bold going to move other text up and down? as player moves the vector direction of the rubber band will move the slider left or right
dark opacity 1 font use this to open doors, move larger blocks, ...
switches that toggle left, right when player presses input.field while standing nearby
new level - something with movers replace laser off on switch?
platform that rises up when player presses input.field while standing
How to instruct player to use field on these?
rework focuser mobs to fire blue laser instead of charging player color with field #0ff
like in classic 7-1-2017 draw field effect
this makes more sense that a bean is focusing make it still functional without the field button
!!conformal - similar rules for small and big scales linked to holographic principle !!conformal - similar rules for small and big scales linked to holographic principle
@@ -81,47 +63,14 @@ rework focuser mobs to fire blue laser instead of charging player
only after wormhole eats a block fire? only after wormhole eats a block fire?
or just increase plasma length after eating block? or just increase plasma length after eating block?
new level element - motion trigger for laser
new level heist
above - a building with rooms and doors like office/warehouse
below - long indoor tunnels like sewers
dark colors
narrow branching paths
elements
motion triggered lasers
doors opened by buttons
button that opens 1 door, but closes another when down
make the button down state easier, have extra power ups
make a text orb for JUNK text to make JUNK more clear make a text orb for JUNK text to make JUNK more clear
extended vertical flip to edge cases:
!!stored circular graphics simulation.drawList.push
procedural animation procedural animation
https://www.youtube.com/watch?v=qlfh_rv6khY https://www.youtube.com/watch?v=qlfh_rv6khY
not implemented random constraint ideas________________________
mob death spawns something
mob bullets
bosses heals nearby mobs
ammo power ups give 0.7x ammo
2x research costs
mobs slowly regen health
exit door takes 10x time to open,
and while door is opening (ghosters, suckers) attack?
can't have more then 15 bullets
how to code?
remove 2 random tech and return them next level
tech: ice-VII - 1.5x duration for ice-IX tech: ice-VII - 1.5x duration for ice-IX
tech: - freezing grenades/explosions tech: - freezing grenades/explosions
tech: - when you get a bot, get a second bot tech: - when you get a bot, get a second bot
tech: - after killing a Boss tech: - after killing a Boss
heal to full heal to full
gain 3x damage for the rest of the level gain 3x damage for the rest of the level
@@ -159,12 +108,6 @@ tech: atomic pile - lose 1 health if you are above the maximum energy
do damage? do damage?
plasma torch tech? plasma torch tech?
figure out how to put instructions for controls in background on initial level
mouse smooth makes the text position jitter when it moves sub pixels
hide the jitter with artificial jitter to make it seem intentional
make it look like the instructions are on a fuzzy TV screen
when player presses move buttons highlight the box/letter for those buttons
make player mass an adjustable var in the skin make player mass an adjustable var in the skin
does this mess with jump height or air control? does this mess with jump height or air control?
increase mass and movement speed at the same time increase mass and movement speed at the same time
@@ -174,10 +117,6 @@ increase mass and movement speed at the same time
possible player.mass bad interactions possible player.mass bad interactions
grapple grapple
rework energy and health HUD
make both diegetic?
how? not sure there is a good way to do this...
tech - after a power up is duplicated tech - after a power up is duplicated
update text to random effect after choosing tech, or after each trigger, or on first display of tech update text to random effect after choosing tech, or after each trigger, or on first display of tech
pick 1 effect at random pick 1 effect at random
@@ -201,43 +140,9 @@ tech - getting caught in an explosion gives you _____
damage for 10 seconds? damage for 10 seconds?
heals heals
tech - limit total number of tech to like 10?
tech - destroying blocks gives _____
removeJunkTechFromPool doesn't seem to remove the correct amount
wormholes that end inside wall check to see if the space before the wall is safe and end there instead
can use laser code
tech: - (1 + 0.01)x for each tech, gun, field you've picked up
scales with born rule, duplication, remove tech
explosions have a chance to spawn spores explosions have a chance to spawn spores
infinite feedback loop with spores that explode? infinite feedback loop with spores that explode?
make sure healing isn't effected by simulation.healScale
instead heal orb size should be scaled
but the ratio between size and heal shouldn't be effected
boss - tracks the position, velocity, angle of power ups, blocks, and bullets it fires
reactor only?
will rewind time
after damage threshold?
does it track player bullets?
button/switch input ideas from Cocoon game
pick up blocks that have a rubber band attached to a sliding switch
as player moves the vector direction of the rubber band will move the slider left or right
use this to open doors, move larger blocks, ...
switches that toggle left, right when player presses input.field while standing nearby
replace laser off on switch?
platform that rises up when player presses input.field while standing
How to instruct player to use field on these?
color with field #0ff
draw field effect
make it still functional without the field button
tech - getting a new gun also gives you 2 random tech for that gun tech - getting a new gun also gives you 2 random tech for that gun
or a field? or a field?
can these guntech tech be converted into a player choice? can these guntech tech be converted into a player choice?