Skip to content
Sign upLog in
← Back to Community

Space Shooter

Profile icon
CursorsDev

Move your unrealistic ship and shoot unrealistic lasers at unrealistic enemy ships that are also the same unrealistic shape as yours!

  • WASD to move
  • Space to shoot

Triangle collision was too hard to implement so I took the obvious fix: use rectangular bounding boxes and make them smaller.

Voters
Profile icon
ZakirMansuri
Profile icon
coderdude666
Profile icon
06rha1504
Profile icon
E-Sheep
Profile icon
TheOceanFace
Profile icon
littlepenguin
Profile icon
commander5424
Profile icon
SeamusDonahue
Profile icon
LordPancake
Profile icon
Rumble330
Comments
hotnewtop
Profile icon
TheOceanFace

wow cool

Profile icon
CursorsDev

well i guess i will make it harder. i guess im just bad at my own game rip :)

Profile icon
SeamusDonahue

the movement is really smooth! Add more enemy types/more difficulty though, as of now I can't really play this for more than a minute. I really think this is cool though

Profile icon
gibbsfreenergy

This is such an awesome game! I could play for hours.

Profile icon
tankerguy1917

this looks great and works perfectly as far as i know

Profile icon
RolandJLevy

@CursorsDev
well done - this is a great game! The movements are nice and fluid.

Maybe you could use some more detailed graphics for the spaceships, in SVG format? You can download free SVGs here: https://freesvg.org/cartoon-spaceship

Profile icon
lightningrock

image

Profile icon
tankerguy1917

@lightningrock
ddddddddaaaaaaaaannnnnnnggggggg, thats what i call dedication.

Profile icon
lightningrock

played for 2h straight. (●'◡'●)

@tankerguy1917

Profile icon
Gabby8C0des8

my brother came in and asked why a big white triangle was shooting the poor doritos :))

Profile icon
realTronsi

Found a bug where if you leave it on and switch to another tab, enemies will keep spawning. requestAnimationFrame() stops working when you switch tabs to conserve battery, so your main loops, which I'm assuming use requestAnimationFrame, will pause after you switch tabs, but I'm guessing your enemy spawning loop uses setInterval().

This is a minor bug, but I'd suggest putting the enemy spawning mechanism in the requestAnimationFrame as well. Otherwise depending on computer speed and other factors, enemy spawning will not be consistent

Profile icon
FloCal35

Honestly I think it needs to be a LITTLE harder

Profile icon
CursorsDev

@FloCal35
alr doubling unrealistic enemy ship speed and health

Profile icon
FloCal35

@CursorsDev
Perfect

Profile icon
FloCal35

Unrealistic lol

Profile icon
realTronsi

The collision is pretty glitchy, an easier way is to first detect line intersections and then determine if the shapes are inside each other. (I have a demo of that here: https://phy2d-demo.realtronsi.repl.co/)

Profile icon
CursorsDev

@realTronsi
that's sick :)

Profile icon
CursorsDev

hello people

Profile icon
potatojs

hello cursors


@CursorsDev

Profile icon
NicholasWhite6

@CursorsDev

is there a way you can make the enemy shoot back as well