Maze Game
this is an early prototype that I made
arrow keys or wasd to move
esc to... escape
p to print data: triple click to select all. copy paste. you can hide this by pressing h
e to open/close menu in editor
r to rotate the shooter
use arrow keys or a and d to move between pages of official levels.
Latest update:
MOD SUPPORT OH MY GOD YESSSSS LETS GOOOO (press "c")
Comments
Log in with itch.io to leave a comment.
test mod:
what it does:
- adds a new level (page 3)
(It has a boss fight):
code:
//this runs every frame
if (where_at === "playing" && place_at === "post drawing" && vars.tag === "boss lvl 1") {
var angle = Math.atan2(py - vars.boss_y + 15, px - vars.boss_x + 15);
vars.boss_x += Math.cos(angle) * 0.5;
vars.boss_y += Math.sin(angle) * 0.5;
ctx.fillStyle = "rgb(255, 0, 200)";
ctx.fillRect(vars.boss_x, vars.boss_y, 30, 30);
if (directions.up) {
vars.boss_y += 3;
}
if (directions.down) {
vars.boss_y -= 3;
}
if (directions.left) {
vars.boss_x += 3;
}
if (directions.right) {
vars.boss_x -= 3;
}
vars.wait1 --;
if (vars.stage === 1) {
if (vars.wait1 <= 0) {
angle = rand(Math.PI * 2);
for(var u = 0; u < 6; u ++) {
bullets.push(new bullet(vars.boss_x + 15, vars.boss_y + 15, Math.cos(angle) * 5, Math.sin(angle) * 5));
angle += Math.PI / 3;
}
vars.wait1 = 100;
}
} else if (vars.stage === 2) {
if (vars.wait1 <= 0) {
vars.wait1 = 50;
angle = rand(Math.PI * 2);
for(var u = 0; u < 50; u ++) {
bullets.push(new bullet(vars.boss_x + 15, vars.boss_y + 15, Math.cos(angle) * 8, Math.sin(angle) * 8));
angle += Math.PI / 25;
}
}
} else if (vars.stage === 3) {
if (vars.wait1 <= 0) {
vars.wait1 = 50;
for(var u = 0; u < 5; u++) {
bullets.push(new bullet(vars.boss_x + 15, vars.boss_y + 15, Math.cos(vars.attack_angle) * 4, Math.sin(vars.attack_angle) * 4));
vars.attack_angle += Math.PI / 25;
}
vars.attack_angle = rand(Math.PI * 2);
}
}
vars.stage_wait --;
if (vars.stage_wait <= 0) {
vars.stage_wait = 800;
vars.stage = ran(3) + 1;
vars.wait1 = 0;
}
}
if (where_at === "official levels" && place_at === "levels post drawing" && page === 2) {
console.log("you should see the thing lol");
ctx.fillStyle = "rgb(200, 200, 200)";
ctx.fillRect(100, 100, 100, 100);
ctx.strokeStyle = "rgb(0, 0, 0)";
ctx.lineWidth = 1;
if (mouse_inside(100, 100, 100, 100)) {
ctx.lineWidth = 3;
if (md) {
lava_blocks = [new l(-64,-98,52,1073,"lava"),new l(-36,944,924,52,"lava"),new l(891,181,59,815,"lava"),new l(874,938,41,72,"lava"),new l(-28,-103,914,57,"lava"),new l(872,-104,88,289,"lava"),new l(215,299,67,75,"lava"),new l(728,-18,113,64,"lava"),new l(763,-59,46,73,"lava"),new l(823,-2,78,31,"lava"),new l(31,-9,111,44,"lava"),new l(63,-54,41,54,"lava"),new l(-17,5,63,19,"lava"),new l(32,876,120,40,"lava"),new l(80,913,31,33,"lava"),new l(-17,882,61,23,"lava"),new l(750,876,105,37,"lava"),new l(785,901,30,47,"lava"),new l(853,884,37,18,"lava"),new l(463,305,60,76,"lava"),new l(463,515,64,65,"lava"),new l(208,497,68,78,"lava"),new l(501,106,208,53,"lava"),new l(93,114,221,41,"lava"),new l(64,763,187,42,"lava"),new l(504,756,287,42,"lava"),];
where_at = "playing";
vars.tag = "boss lvl 1";
}
}
ctx.strokeRect(100, 100, 100, 100);
ctx.fillStyle = "rgb(0, 0, 0)";
ctx.textAlign = "center";
ctx.font = "20px Georgia";
ctx.fillText("1st boss!", 150, 90);
}
//this only runs once
vars.tag = 0;
vars.boss_x = 350;
vars.boss_y = 0;
vars.wait1 = 100;
vars.stage_wait = 800;
vars.stage = 2;
vars.attack_angle = 0;
console.log("yay");