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.
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.
It isn't done, I'll be adding more stuff.
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
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.
@bearbearmo I'll turn up the movement speed a bit.
Also, classes are just "special" functions.
Also when you die, press 1 to continue.
I just added a boss at 15,000!
I also stopped the arrows and space from scrolling.
You can also pause now!
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.
@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:<link href="file location" rel="icon">
I added the sound effects like this:
var name = new Audio("file location");
To play the audio:
To make the audio loop:
name.loop = true;