Share your repls and programming experiences

← Back to all posts
Asteroids!
CodeLongAndPros

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.

Voters
programmeruser
Kookiez
Gabby8C0des8
LukeShomper
Wilke000
Jakman
SelenaYang1
DungeonMaster00
PattanAhmed
CodingGoose
Comments
hotnewtop
Bookie0

nice game!

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

CodeLongAndPros
Bookie0
CodeLongAndPros

@Bookie0 I fixed it.

Bookie0

ok great :) @CodeLongAndPros

[deleted]

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

[deleted]

Jobs!

CodeLongAndPros

@MemeDriod huh? what?

[deleted]

Jobey jobey [email protected]

[deleted]

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

CodeLongAndPros

@MemeDriod Well he's dead, Jim.

[deleted]

Who’s Jim?-memedriods [email protected]

Gabby8C0des8

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

CodeLongAndPros

@Gabby8C0des8 I got the impression of potatoes.

Inferno12

Not bad

PattanAhmed

OH, no.!
An error:-

CodeLongAndPros

@PattanAhmed You'll need to be an explorer

PattanAhmed

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

CodeLongAndPros

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

PattanAhmed

@CodeLongAndPros Oh,
Let me try!
Thanks!

PattanAhmed

@CodeLongAndPros Facing this error:-

CodeLongAndPros
PattanAhmed

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

CodeLongAndPros

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

PattanAhmed

@CodeLongAndPros Oh BOOM!
Awesome game dude.

CodeLongAndPros

@PattanAhmed

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

PattanAhmed
CodingGoose

This is FUN :) Great game!

CodeLongAndPros

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

gibbsfreenergy

There should be a leaderboard or a point-system.

CodeLongAndPros

@JosephSanthosh There is, #1 place.

brogen

@CodeLongAndPros
i do not see it!

CodeLongAndPros

@brogen You have to lost the game.

gibbsfreenergy

Did you have to pay for the license? @CodeLongAndPros

gibbsfreenergy

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

CodeLongAndPros

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

gibbsfreenergy
CodeLongAndPros

@JosephSanthosh

please mark this as the answer if it helped

gibbsfreenergy

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

CodeLongAndPros

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

gibbsfreenergy

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

CodeLongAndPros

@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.

gibbsfreenergy

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

brogen

@CodeLongAndPros
I did lose!

InvisibleOne

Cool

DynamicSquid

is that CodeLong doing python?

CodeLongAndPros

@DynamicSquid Aye, that is.

¾ of my code is python
DynamicSquid

@CodeLongAndPros i knew that

sugarfi

mit license best

k9chelsea2

nou

CodeLongAndPros

@sugarfi I like bsd better for some reason.