
Show HN: 3D multiplayer space shooter made with Three.js - nickyvanurk
https://urk-3d-multi-space-game.herokuapp.com
======
rezoner
If you don't have better ideas for improving your packet size at least push
your JSON through msgpack. Using strings as keys (properties) is ultra bad for
your bandwidth too. In general JSON is only suitable for turn based games.

~~~
nickyvanurk
Thanks for pointing this out. This will be my next improvement.

~~~
rezoner
ps: Don't use the official implementation - it is slow. Go with one of the
lite projects like that one [https://github.com/kawanet/msgpack-
lite](https://github.com/kawanet/msgpack-lite)

~~~
nickyvanurk
Much appreciated!

------
p_roz
This is really cool.

One suggestion. Allow the mouse to control the spaceship movement in both x
and y directions. It’s intuitive to try to point the mouse to the place you
want your ship to go, however the mouse only controls the Y axis.

~~~
mLuby
Right. Or use W and S for pitch up/down and ignore the mouse. Shift or Z or
something for forward movement.

------
seszett
Seems interesting, but apparently the layout is hardcoded to use WASD, which
doesn't go well with AZERTY keyboards.

------
bullen
I would suggest tank controls to reduce server CPU (with event based protocol)
and make the game a bit more playable, try my controls:
[http://aeonalpha.com](http://aeonalpha.com)

------
arendtio
Pretty cool and actually, something I always wanted. Reminds me of the good
old Netwars days:

[https://www.youtube.com/watch?v=eMp1RrCy4w4](https://www.youtube.com/watch?v=eMp1RrCy4w4)

There are just a few things Netwars had that I am missing here:

1\. Sound (is it just me?) 2\. The controls are kinda weird. If I remember
correctly Netwars used Ctrl and Shift to throttle. Mouse (or Joystick) for
turning (upper part of the side of the screen to roll), Space to fire the gun
and Return to fire missiles. 3\. A radar for orientation.

But for a prototype awesome already :-D

------
reilly3000
The netcode seems to be working great for me. Controls are not what I expect
based on the space-shooters I've played, but I eventually got the hang of
them. Ship to ship collisions would be nice.

------
cbartlett
Needs a radar/minimap or something, I pretty quickly found myself lost in
space with no idea where other players were, or how to get back to the
starting point to find new players.

------
alex_duf
what are the controls?

I haven't found any explanation and I've only managed to spin the ship on
itself.

~~~
nickyvanurk
W - forward, S - slow down, A - roll left, D - roll right, Q - yaw left, E -
yaw right, MouseY - up and down, SPACE - shoot, ENTER - chat

~~~
shripadk
Left click mouse down to shoot would be more intuitive! It was fun playing the
game though!

------
skocznymroczny
I know that spaceship model :) the game feels choppy to me. What kind of
interpolation/prediction is it using right now?

~~~
nickyvanurk
Client-Side Prediction, Server Reconciliation, Entity Interpolation, Lag
Compensation. See this post for more information:
[https://www.gabrielgambetta.com/client-server-game-
architect...](https://www.gabrielgambetta.com/client-server-game-
architecture.html)

------
cr0sh
I think this is cool just from the "sharing code" perspective; yes, it needs
some more work, but that's the way games are. I can't give any suggestions
there, since I haven't touched game code in decades (well out of date for
today's MP stuff). But I like what I see so far from this demo!

------
DennisP
Are there any controls besides arrow keys and spacebar? I start out tumbling
and can't seem to stop.

~~~
restlessmedia
Grab that mouse, took me a while :)

------
lhball
Nice work! I would suggest adding a controls screen that fades out. Took me a
while to realize I had to combine aiming with the mouse and WASD keys for
movement to get everything going.

------
tomglynch
Is this struggling under the load?

~~~
nickyvanurk
I just deployed it to my free heroku account to see if I could get it up and
running, the lag is immense haha :D

------
atum47
oh man, I made a 2D one back in the day with node.jd and socket.io, to test a
physics engine I was writing, but never really finished it to release it.
looking at your project now, I wish I did finished mine. really cool job. keep
it up

------
emilfihlman
The game is unplayable.

------
mg794613
So the game just crashed? Could only move forward after that.

------
Diggsey
What is the server written in?

~~~
nickyvanurk
Node, Express, Socket.IO, Three.js, see
[https://github.com/nickyvanurk/3d-multiplayer-browser-
shoote...](https://github.com/nickyvanurk/3d-multiplayer-browser-shooter) for
more info! A star would be welcome :))

~~~
gendev
Might I suggest checking out Fastify. Very similar to the way Express is, but
on an average of 10% to 20% faster.

~~~
isakkeyten
It's using websockets so I don't think the speed of the router is of any
importance :)

------
webdva
Fun game. Good work.

