Share your repls and programming experiences

← Back to all posts
dashy dash game REMASTERED
CursorsDev (721)

heyo, dashy dash was pretty nice, but i took it to the next level with starz (the name of this game).

starz is about a color hole (a black hole, but colorful) trying to eat other stars. unfortunately, bob (the hole's name) can only eat starz the same color as him. fortunately, bob can change colors by pressing the space bar.

try to survive and get the most points :)

controls:

WASD or arrow keys to move
Space to change color/boost

hacks:

v Key - Vector; see where you are going
l Key - Lines; see where stars are going
c Key - Color; see where stars the same color as you are going

How it was made

Alright, time to get technical. First off, I would like to review the enemies in the game. They may seem smarter than my previous games' enemies, but in reality, they are the same. The only difference is that they follow an offset from the player, not the player themselves.

This makes it seem like they have minds of their own and sometimes they 'dodge' your dive.

Next I want to talk about game design. The principle is still the same; you dash around and defeat enemies. What's different is that now you can always defeat SOMETHING, but there are a lot more things that can defeat YOU.

There's not much to talk about actually.

bacc to my olde style of talking ig.

Comments
hotnewtop
angrydoge (462)

.... and this 404 page is supposed to do what?. @Hacky

[deleted]

yo is it the wrong page? nvm, and what is that cisco?

tussiez (874)

@angrydoge SECURITY THREAT DETECTED AND BLOCKED

Bookie0 (5676)

Really cool! You should add a favicon! :D

KarmaIsKrazy (16)

Isnt as good as the last two but here's another page icon

AndrewMarkarian (5)

I know how much Cisco hates me.

epicman702 (464)

I'm getting an error?

SilvermoonCat (377)

@CursorsDev hmm please explain why there’s a black screen ty

JBloves27 (1533)

Ohhhh! Youre back! Nice game btw!

CURSORS ALIVEE!!

Whippingdot (431)

AWESOMELOVEITTHANKYOUYOUGODLYLESGOOOTHISAWESOMEGAMEIDIDN'TKNOWWEHADTHISMANYTALENTEDPEOPLEINOURCOMMUNITYLESFREKINGGOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO

ChristopherDai (74)

Let's be honest.
This game is not fun.

Whippingdot (431)

let's be honest, we all have different opinions @ChristopherDai

GABELACANLALE (31)

@Whippingdot ehhh, do you think you'll play thhis game 24/7? Or play an actually fun game. Its only good because you know someone took their hard work, but if this was actually launched in a play store, no one would probably play it. I've never seen a person who really would play such a simple game that is this, actually, the developers may play it for testing.

Whippingdot (431)

@GABELACANLALE & @ChristopherDai why can't you just appreciate someone who worked hard to make a game. You guys have to be haters. You try making this

GABELACANLALE (31)

@Whippingdot I said "its only good because you know someone took their hard work". Its not fun, we just play it because were being nice to a person who did hard work.

ChristopherDai (74)

Well, seems like I take "appreciating hard work" as dishonesty. So I said, "let's be honest". Yet the game is beautiful, it's not fun. @Whippingdot

Whippingdot (431)

It is fun for me. i love playing it THO IT MAKES ME RAGE GRRRRRRRRRRRRRRAAAAA @ChristopherDai

CursorsDev (721)

gonna have to be honest here, if you think it's not fun, then don't say anything at all. you're ruining the vibe smh >:c

ChristopherDai (74)

yeah sure. Your other games are fine but this is boring. But still beautiful. @CursorsDev

CursorsDev (721)

tbh i this game beats the others

ChristopherDai (74)

I like the clicker one. And the ball one, you shoot the ball with the mouse to eat red balls to not die. That's interesting. @CursorsDev

Whippingdot (431)

HE SAID DON'T SAY ANYTHING IF YOU DON'T HAVE ANYTHING NICE TO SAY @ChristopherDai

peternielsen112 (29)

Awesome Awesome

"This is like, so awesome."

-Me

JakeHu2020 (17)

nice game! and, should I add a hack to that too?

noway15 (30)

dashy dash 2 lol

LeoXu2 (29)

go to console and input this setInterval(function() {spawn()}, 1);

dustdude (0)

i like how u can just hop into the wall and come out the other side, useful when ur cornered

JuanjoseCaycedo (0)

OMG BRO I JUST GOT 513 SCORE RN!!

thetwinkybob (14)


I made the orbs spawn instantly, made the color list only red and turned on bot trails
also boost makes me go super fast so i got like 1000 score or smth but this isnt that

thetwinkybob (14)


here it is
highest i could get before it was about to crash

dustdude (0)

@thetwinkybob how'd u make the orbs spawn instantly? sry im a noob

CyberHacker101 (109)

Dude ur repls KEEP getting better are you some type of wizard or something

thetwinkybob (14)

nice
I am not sure how to use the cheats but pretty fun.

thetwinkybob (14)

edit, I get it now but the | command doesnt seem to work

JuanjoseCaycedo (0)

WOOO 77 seconds 96 score

BanditBoiz (0)
<!DOCTYPE html><html> <head> <title>starz</title> <style> html { height: 100%; overflow: hidden; }
        body {
            height: 100%;
            margin: 0;
            background-color: black;
            display: grid;
            place-items: center;
        }
        
        canvas {
            width: 100vw;

height: calc(100vw * (9/16));
background-color: black;
border: 1px solid white;
box-sizing: border-box;
}
</style>

</head>
<body>
    <canvas id="canvas"></canvas>
    <script>
        const canvas = document.getElementById("canvas");
        const ctx = canvas.getContext("2d");
        canvas.width = 1600;
        canvas.height = 900;
        
        let lines = false;
        let vel = false;
        let clr = false;
        
        class Ball {
            static colors = ["red", "orange", "yellow", "green", "blue", "indigo", "violet"];
        
            constructor(x, y, r) {
                this.x = x;
                this.y = y;
                this.r = r;
                
                this.i = 0;
                this.c = Ball.colors[this.i];
                this.canChange = true;
                this.boost = false;
                
                this.yv = 0;
                this.xv = 0;
            }
            
            update(deltaTime) {
                this.x += this.xv * deltaTime;
                this.y += this.yv * deltaTime;
                
                this.xv *= 0.99;
                this.yv *= 0.99;
                
                if (Math.abs(this.xv) < 8) this.xv = 0;
                if (Math.abs(this.yv) < 8) this.yv = 0;
                
                if (this.xv < 8 && this.xv) this.xv += 4;
                if (this.yv < 8 && this.yv) this.yv += 4;
                if (this.xv > 8 && this.xv) this.xv -= 4;
                if (this.yv > 8 && this.yv) this.yv -= 4;
                
                if (keys["KeyA"] || keys["ArrowLeft"]) this.xv -= 10;
                if (keys["KeyD"] || keys["ArrowRight"]) this.xv += 10;
                if (keys["KeyW"] || keys["ArrowUp"]) this.yv -= 10;
                if (keys["KeyS"] || keys["ArrowDown"]) this.yv += 10;
                
                if (this.xv > 300) this.xv = 300;
                if (this.xv < -300) this.xv = -300;
                if (this.yv > 300) this.yv = 300;
                if (this.yv < -300) this.yv = -300;
                
                if ((keys["KeyA"] && keys["KeyW"]) ||
                    (keys["KeyA"] && keys["KeyS"]) ||
                    (keys["KeyD"] && keys["KeyW"]) ||
                    (keys["KeyD"] && keys["KeyS"]) ||
                    (keys["ArrorLeft"] && keys["ArrowUp"]) ||
                    (keys["ArrowLeft"] && keys["ArrowDown"]) ||
                    (keys["ArrowRight"] && keys["ArrowUp"]) ||
                    (keys["ArrowRight"] && keys["ArrowDown"])
                ) {
                    this.yv *= 0.985;
                    this.xv *= 0.985;
                }
                
                if (keys["Space"] && this.canChange) {
                    this.i++;
                    this.c = Ball.colors[this.i % Ball.colors.length];
                    this.canChange = false;
                    this.boost = true;
                    setTimeout(() => this.canChange = true, 1500);
                    setTimeout(() => this.boost = false, 500);
                }
                
                if (this.boost) {
                    this.xv *= 1.25;
                    this.yv *= 1.25;
                }
                
                if (this.x + this.r < 0) {
                    this.x = canvas.width - this.r;
                } else if (this.x - this.r > canvas.width) {
                    this.x = 0 + this.r;
                }
                
                if (this.y + this.r < 0) {
                    this.y = canvas.height - this.r;
                } else if (this.y - this.r > canvas.height) {
                    this.y = 0 + this.r;
                }
                
                this.draw();
            }
            
            draw() {
                ctx.fillStyle = this.c;
                ctx.beginPath();
                ctx.arc(this.x, this.y, this.r, 0, Math.PI * 2, false);
                ctx.closePath();
                ctx.fill();
                
                if (vel) {
                    ctx.strokeStyle = this.c;
                    ctx.beginPath();
                    ctx.moveTo(this.x, this.y);
                    ctx.lineTo(this.x + this.xv, this.y + this.yv);
                    ctx.closePath();
                    ctx.stroke();
                }
            }
        }
        
        class Enemy {
            static enemies = [];
        
            constructor(x, y, c, tx, ty) {
                this.x = x;
                this.y = y;
                this.c = c;
                this.r = 8;
                this.tx = tx;
                this.ty = ty;
            }
        
            update(deltaTime) {
                const dx = this.x - ball.x + this.tx;
                const dy = this.y - ball.y + this.ty;
                const d = Math.sqrt(dx * dx + dy * dy);
                
                if (this.c === ball.c) {
                    this.x += dx / d;
                    this.y += dy / d;
                } else {
                    this.x -= dx / d;
                    this.y -= dy / d;
                }
                
                if (this.x + this.r < 0) {
                    this.x = canvas.width - this.r;
                } else if (this.x - this.r > canvas.width) {
                    this.x = 0 + this.r;
                }
                
                if (this.y + this.r < 0) {
                    this.y = canvas.height - this.r;
                } else if (this.y - this.r > canvas.height) {
                    this.y = 0 + this.r;
                }
                
                if (ball.boost) {
                    this.x += Math.random() * 2 - 1;
                    this.y += Math.random() * 2 - 1;
                }
                
                this.draw();
            }
        
            draw() {
                ctx.fillStyle = this.c;
                ctx.beginPath();
                ctx.arc(this.x, this.y, this.r, 0, Math.PI * 2, false);
                ctx.closePath();
                ctx.fill();
                
                if (lines || (clr && this.c === ball.c)) {
                    ctx.strokeStyle = this.c;
                    ctx.beginPath();
                    ctx.moveTo(this.x, this.y);
                    ctx.lineTo(ball.x - this.tx, ball.y - this.ty);
                    ctx.closePath();
                    ctx.stroke();
                }
            }
        }
        
        const ball = new Ball(canvas.width / 2, canvas.height / 2, 18);
        
        let deltaTime = 0;
        let lastTime = 0;
        let pts = 0;
        let gameOver = false;
        let frame = 0;
        
        ctx.textAlign = "center";
        
        function animate(ms) {
            if (gameOver) return;
            
            const time = ms / 1000;
            deltaTime = time - lastTime;
            lastTime = time;
            
            ctx.fillStyle = "rgba(0, 0, 0, 0.1)";
            ctx.fillRect(0, 0, canvas.width, canvas.height);
            
            ball.update(deltaTime);
            
            ctx.font = "16px monospace";
            ctx.fillStyle = "white";
            ctx.fillText(pts, ball.x, ball.y + ball.r / 2 - 3);
            
            Enemy.enemies.forEach((e, i) => {
                e.update(deltaTime);
                
                if (Math.sqrt(Math.pow(e.x - ball.x, 2) + Math.pow(e.y - ball.y, 2)) < e.r + ball.r) {
                    if (ball.c === e.c) {
                        Enemy.enemies.splice(i, 1);
                        pts++;
                    } else {
                        gameOver = true;
                        cancelAnimationFrame(req);
                        ctx.font = "96px monospace";
                        ctx.fillStyle = "lightgreen";
                        ctx.fillText(`game over`, canvas.width / 2, canvas.height / 2);
                        ctx.font = "36px monospace";
                        ctx.fillText(`time: ${Math.floor(frame / 60)} seconds`, canvas.width / 2, canvas.height / 2 + 72);
                        ctx.fillText(`score: ${pts}`, canvas.width / 2, canvas.height / 2 + 128);
                        setTimeout(() => location.reload(), 2500);
                    }
                }
            });
            
            req = requestAnimationFrame(animate);
            
            frame++;
        }
        
        let req = requestAnimationFrame(animate);
        
        const keys = {};
        
        document.addEventListener("keydown", (e) => {
            if (e.code === "KeyL") lines = !lines;
            if (e.code === "KeyV") vel = !vel;
            if (e.code === "KeyC") clr = !clr;
            keys[e.code] = true;
        });
        
        document.addEventListener("keyup", (e) => {
            delete keys[e.code];
        });
        
        let time = 2500;
        
        function spawn() {
            let x = Math.floor(Math.random() * (canvas.width - 16));
            let y = Math.floor(Math.random() * (canvas.height - 16));
            while (Math.sqrt(Math.pow(x - ball.x, 2) + Math.pow(y - ball.y, 2)) < 256) {
                x = Math.floor(Math.random() * (canvas.width - 16));
                y = Math.floor(Math.random() * (canvas.height - 16));
            }
            const enemy = new Enemy(
                x, 
                y, 
                Ball.colors[Math.floor(Math.random() * Ball.colors.length)],
                Math.round(Math.random() * ball.r * 16 - ball.r * 8),
                Math.round(Math.random() * ball.r * 16 - ball.r * 8),
            );
            Enemy.enemies.push(enemy);
            time -= 50;
            if (time < 500) time = 500;
            setTimeout(spawn, time);
        }
        
        setTimeout(spawn, time);
    </script>
</body>
</html>
SudhanshuMishra (67)

why is this game so cool and interesting and beautiful and attractive and calming and loream ipsum dolor sit amet some text to apprciate