Share your repls and programming experiences

← Back to all posts
Asteroids!
h
CodeLongAndPros (1589)

I've made my first game, asteroids.

Your goal is to get to the end as many times as you can in 60 seconds.

If you hit an asteroid, you go *boom* and are dead.
You use the Arrow keys (forward/back) to move.

The number of asteroids created gets doubled every 5 times you get to the end.

This uses replitdb to store the scores, and uses the Red Hat Display font.

All images © myself

This code is licensed under the BSD license.
That means you have to keep the source open, and credit me.

Well, so long!

Edits:

  • Added highscore to start screen

Whoops! I've been an explorer for so long, I forgot what it was without it. You'll need to enable explorer to use the replit db.

Comments
hotnewtop
Bookie0 (6023)

nice game!

but several times, i dont die when i hit asteroids which is fine tbh lol

[deleted]

Good job u should get a coding job to make jobs for jobs

[deleted]

Jobs!

[deleted]

Jobey jobey [email protected]

[deleted]

Memedriod has died plz say oof to bring him back- memedriod [email protected]

[deleted]

Who’s Jim?-memedriods [email protected]

Gabby8C0des8 (27)

the astroid looks like lil cookie crumbs zooming towards me :)

CodeLongAndPros (1589)

@Gabby8C0des8 I got the impression of potatoes.

PattanAhmed (1397)

@CodeLongAndPros Oh no!
I really want to play this game with be an explorer :(
Thanks!

CodeLongAndPros (1589)

@PattanAhmed Here, it's now compatible, but you can't save scores.

PattanAhmed (1397)

@CodeLongAndPros Cool!
But why the game is ending while it has remaining time 44 seconds?
Thanks?

CodeLongAndPros (1589)

@PattanAhmed You hit an asteroid, go *boom*, and are ded.

CodeLongAndPros (1589)

@PattanAhmed

Remember: don't forget to upvote this if you like it
- Noone ever.

DannyIsCoding (695)

This is FUN :) Great game!

CodeLongAndPros (1589)

@DannyIsCoding Thanks. It was inspired by a 70s Atari game, except I added textures, bar code, and a high score to it.

JosephSanthosh (1171)

There should be a leaderboard or a point-system.

JosephSanthosh (1171)

Did you have to pay for the license? @CodeLongAndPros

JosephSanthosh (1171)

i ONLY HAD 30 SECS not 1 minute, the time keeps changing! @CodeLongAndPros

CodeLongAndPros (1589)

@JosephSanthosh
1. The BSD license is free
2. Fixed it.

CodeLongAndPros (1589)

@JosephSanthosh

please mark this as the answer if it helped

JosephSanthosh (1171)

Uhhhhh! What? This is in share not ask ! @CodeLongAndPros

CodeLongAndPros (1589)

@JosephSanthosh well, you should never turn down a chance for cycles, right? </scarcasm>

JosephSanthosh (1171)

This doesn't make sense! What are you trying to say? @CodeLongAndPros

CodeLongAndPros (1589)

@JosephSanthosh Well, some people say the pls mark as answer, and I was looking at the upvotes…
It’s a different way to say „please upvote„, I guess.

JosephSanthosh (1171)

oh so you want me to upvote you ? ... @CodeLongAndPros

DynamicSquid (4630)

is that CodeLong doing python?