Share your repls and programming experiences

← Back to all posts
OneShot | 🚀Online Space Shooter 👩🏽‍🚀 | 📱Mobile Friendly
IbraheemRodrigues (79)

🎮Play it here. Now mobile friendly!

❤️One Life.🔫One Shot. Survive

In this game you must try to survive the longest using only one shot. Online Multiplayer, so invite some friends to play if theres no one else online.

⌨️ Controls
[WASDQE] or Arrow Keys - Move (Q&E to strafe L&R)
[Spacebar] - Shoot
[H] - Show/Hide flight guide (i.e controls)
[X] - Suicide

📱Controls
🔄 Tilt - Move and change direction. The more you tilt the faster you go
👇 Tap - Shoot

Any feedback/suggestions greatly apprecieated

Made in JS using a socket.io nodejs server (see this wonderful tutorial by Dan Shiffman if you want to get started) and p5.js for client side rendering (also checkout Dan's channel for everything p5). Sounds made using Bfxr. Art style a la the amazing Captain Forever.

📖Checkout the devlogs - Day1&2, Day 3&4

The web window below is not the best place to play it, open it in a new tab for the full experience

Commentshotnewtop
spybrave (342)

The last one I killed:p

Reader8765 (17)

You should add AI players so people still trying to play will be able to actually play.

JSer (1160)

Really cool UI and gameplay! However the controls seems to be weird on my ipad

Sofia_Ortega (2)

I really love the concept of the game and the style. This was totally awesome. Maybe you could try putting a small map on the side in order to gauge where you are in the game. Overall, I loved the game. Keep it up

IbraheemRodrigues (79)

@Sofia_Ortega You can currently see your coordinates in the top left, the world size is 5000 so the x and y can be anywhere between -2500 and 2500. However the programming convention is that (-2500, -2500) is the top left corner, so bear this in mind.

I may add a map, however I think the coordinates do the job, and the radar arrows around your ship point you to others. Thanks for the suggestion though!

Nanowrimoijk (36)

is there a way to change you reg id so you could play on the same team as friends or does it just randomly pick that?

IbraheemRodrigues (79)

@Nanowrimoijk The id is just your connection Id. Also there are no teams, it's largely a free for

IbraheemRodrigues (79)

@Nanowrimoijk sadly i am ij the middle of revision for my mock exams tomorrow! Sorry!

Mooopy (61)

when i press X to suicide it doesnt work

IbraheemRodrigues (79)

@Mooopy Can't seem to replicate the issue. Any other information you can give me when this happens?

Mooopy (61)

@IbraheemRodrigues huh, im not getting it now. it was giving me 504 error before

IbraheemRodrigues (79)

@Mooopy I suspect it's the same issue @amasad pointed out, since 504 is a server error. I've added an extra if statement to try and eliviate the error he was reporting, hopefully that fixes it

amasad (1718)

Really cool! We played it in the office but found a bug. When you suicide you kill the entire game haha

/home/runner/index.js:45
		shipsList[socket.id].alive = false;
		                           ^

TypeError: Cannot set property 'alive' of undefined
    at Socket.socket.on (/home/runner/index.js:45:30)
    at Socket.emit (events.js:180:13)
    at /home/runner/node_modules/socket.io/lib/socket.js:528:12
    at process._tickCallback (internal/process/next_tick.js:176:11)
Auhsoj1 (9)

I love the game, but I was alone in it all but once. And that time the other player wasn't even playing.

IbraheemRodrigues (79)

@Auhsoj1 That is the down side to online multiplayer, but I might see if I can organise a time/date where I'll get lots of people to play, that way you can ask get there full experience.

Thanks for the vote!

hayaodeh (171)

Oh man this is so cool! I

timmy_i_chen (1003)

This is so awesome, love the UI!

Indoors420 (0)

Cool game, I think the turning sensitivity should be a bit higher though

IbraheemRodrigues (79)

@Indoors420 I've increased the turning speed and the turning drag, so it should handle a bit better now. Give it a try?