Skip to content
Sign UpLog In
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
18

Space Runner (Please look, I barely have any upvotes)

I made a runner for the game jam. The controls are in the game, just scroll down.

I made the game with html, css, and javascript.
Please comment to tell me if you like the game/have any suggestions.
Click to open (works best in a new tab).
My code is here.

If everything blurs when you start (happens occasionally on edge), that means the background is still loading (and the loading screen still went away for some reason). Wait a bit, and the background should load. Then everything will look normal again.
Also, it's 4K (if 4000 by 2000 is 4K).

Please give me suggestions on what to add next (I have no idea myself).

NOTES TO JUDGES:

The history might look a bit weird, I did half the work in my repl.it project called "stuff" and then moved it to where it is now, in the project "Space Runner". I copied it over on April 16th I think, I don't know if the history will go back past then because I download the zip from my other project and uploaded it to the new one.

4 years ago

Voters

Antonio1918
Antonio1918
Nugget521YT
Nugget521YT
NotScovay
NotScovay
17HarshaN
17HarshaN
SterlingNeal
SterlingNeal
bchian316
bchian316
ImagineLosing
ImagineLosing
Firestorm8
Firestorm8
Soccer135246
Soccer135246
lightningrock
lightningrock

Comments

TopNew
3

It isn't done, I'll be adding more stuff.

4 years ago
1
beezinha
beezinha

This is so awesome!! Really liked the effort you put into the design, it looks great.

4 years ago
2

@GabrielaPalla

Thanks! What should I add next (You beat the game at 50,000)?
Also, click one of the links and watch my redirect animation.

4 years ago
1
bearbearmo
bearbearmo

I had a look at the code, I'm interested why you used functions for the majority of what could have been done with classes, I may be very wrong but from what I understand classes would be better. Also, you use

var

where let or const would be better
The game itself is very good, although i would say the movement is a little sluggish, I don't know if that's intentional but it stopped me from playing after I died.

4 years ago
1

@bearbearmo
I'll turn up the movement speed a bit.
Also, classes are just "special" functions.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes

Also when you die, press 1 to continue.

4 years ago
1
bearbearmo
bearbearmo

@GameMaster1928

Cannot infer image mime type

classes are nice functions, personally I prefer them, I was wondering if there was a specific reason for not using them but if not that's fine

4 years ago
1

I just added a boss at 15,000!

I also stopped the arrows and space from scrolling.

You can also pause now!

4 years ago
1
Equation
Equation

Great game ! Graphics are nice, and I have some questions to ask you :
How did you make the background move ?
How do you make to put some image for your charachter and to make them move ?
How did you make to have a little ship as tab picture (default is a document paper, do you see what I mean ?)
How did you add some sound effects ?
This is a very good game, but I play on a french keyboard (azerty), so it would be nice to add an option to control the ship with arrows.

4 years ago
1

@Equation
, I just added a link to my code, so you can look at what I did. I also just added arrow controls.

I made the background move on lines 338-345 (look at background.jpg and stars.png to understand how to prepare an image). I looked for a seamless image and tiled it twice horizontally, and subtracted from the x every frame. When the x was less than the negative canvas width (-2000), I set the background's x to 0.

I drew the images using cxt.drawImage(image, x, y);
I made it move by just changing a variable I'm using for the x and y position.
I created the images with 2 lines of code:
var name = new Image();
name.src = "file location";

I changed the tab icon with this line:

I added the sound effects like this:
var name = new Audio("file location");
To play the audio:
name.play();
To make the audio loop:
name.loop = true;

4 years ago
1
1

@Equation
, I've made a lot of improvements in the last 10 days, try my game again!

4 years ago
1
ThomasLairy
ThomasLairy

it's abit slow you should create ergonomic keyboard key

4 years ago
0
Nugget521YT
Nugget521YT

This is a very good game but the sound effects could change a little but overall it is a super good game.

2 years ago
Load more