Share your repls and programming experiences

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

🎮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

🔄 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 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

hcahoon01 (27)

Can you add power-ups like the ammo but bigger and there could be a power-up that lets you shoot more than one at a time for 1 minute or you could make one make you have a shield for 30 seconds.

Please and Thank You!!

spybrave (342)

The last one I killed:p

Reader8765 (18)

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

JSer (84)

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 (89)

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

Bellfire (1)

Can you make it touch screen

Bellfire (1)

How do you move

Nanowrimoijk (59)

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 (89)

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

IbraheemRodrigues (89)

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


It's fun

Mooopy (65)

when i press X to suicide it doesnt work

IbraheemRodrigues (89)

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

Mooopy (65)

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

IbraheemRodrigues (89)

@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 (3344)

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

		shipsList[].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/
    at process._tickCallback (internal/process/next_tick.js:176:11)
BestBerry (19)

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

IbraheemRodrigues (89)

@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 (196)

Oh man this is so cool! I

timmy_i_chen (1154)

This is so awesome, love the UI!

Indoors420 (0)

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

IbraheemRodrigues (89)

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