top | item 5562717

Show HN: Sparklin Wars, multiplayer Web shooter I built over 2 nights

72 points| elisee | 13 years ago |wars.sparklinlabs.com | reply

42 comments

order
[+] elisee|13 years ago|reply
I built this little Web game with Node.js, Three.js, Socket.io and various other libs. I wrote an overview of the tech used here: http://sparklinlabs.com/2013/04/craftstudio-beta-release-dat...

If you have any particular questions about how anything was built, I'd be happy to detail it.

EDIT: By request, I just made the repository public. It's not open source but feel free to check it out if you want to see how it was made - https://bitbucket.org/sparklinlabs/sparklinwars/

[+] mik3y|13 years ago|reply
Nice job, thanks for opening the repo.

Simple though the gameplay is, and knowing very little little about {Node,Three}.js, I have to admit the game changed my mind a little about what is possible in "only" javascript.

[+] Aldream|13 years ago|reply
Nice project, kudos! Always interesting to see all those new Web tech knotted together for greater purposes.

Do you have a public repo to browse your Coffee-scripts?

[+] rschmitty|13 years ago|reply
well done! what kind of server is it running on?
[+] mkilling|13 years ago|reply
Most people just ran around team killing, and I suggest this is because they didn't realize it's a team game at all.

Some suggestions:

* At the beginning of the screen show a message that tells the player 'You are on team RED'

* Add a message for players who are team-killing - like a huge 'TEAMKILL' popping up on their screen.

* Also add a penalty to prevent people from team-killing (like a 10 sec respawn delay)

[+] elisee|13 years ago|reply
Fair points. I already started mitigating this by disabling friendly fire for players with -1 score (that is, as soon as a player has team killed once and made no valid kills, they won't be able to teamkill again until they make one legit first).

Instead of hurting players (-20 health) with friendly fire, I thought it would be fun for teamkillers with -1 score to actually give their teammates +1 health by shooting them. I think some players have started using it as a way to have a "healer class", which is kind of a fun emergent behavior.

[+] chii|13 years ago|reply
interesting game - tho its very laggy for me, unplayable =(
[+] olivier1664|13 years ago|reply
Quite funny, but (being in asia) it lags. It is visible when pressing a key and have somthing like 500ms delay before my avatar move. Maybe should you cheat me a little and make me believe my avatar has moved (even if he will continue to be in the butllet trajectorie and take damage).

I love the simple easy-zelda-top-view: it is easy to understand what's going on. It has also a very good cooperative feeling: when you meet a teammate, follow him, you will be stronger together. It's easy to understand :)

May I suggest to add a 2nd shoot (as in Realm of the Mad God). A shoot on right click (or space) that start a a basic shoot, but finish on an explosion. This super shoot would be limited by a long cooldown or a mana bar (or any kind of limitation).

[+] elisee|13 years ago|reply
The server is located in France and it's all TCP (because WebSockets) so the lag might get pretty bad. Like you say, client-side prediction would help a lot with hiding that. Right now I'm just doing some interpolation on the position (no extrapolation at all) so any latency > 200ms becomes quite noticeable.

A secondary weapon would be nice indeed :)

[+] PavlovsCat|13 years ago|reply
I love the lack of communication, and that people have to interact and learn through "body language". That captures one of my favourite aspects of multiplayer gaming for me, cooperation between total strangers without any detailed planning beforehand, so I wish there was more game elements to apply this to and more rewards for cooperation than just killing and not being killed (capturing a flag that spawns in the middle maybe?). But I enjoyed it very much already, I like the lack of guide & tutorial, the learning by doing, even the friendly fire, and hope you keep that minimalism :D
[+] Udo|13 years ago|reply
That was a fun start of the day, thanks so much for making this!

I always wanted to make something similar on an RPG basis but never got around to do it...

[+] elisee|13 years ago|reply
Well... the server is getting hammered and the player list is like... more than full. Going to add some player limit to avoid ruining the game for everybody.

EDIT: OK, server restarted, game is now limited to 20 active players, should help with lag a bit.

EDIT: Lowered the limit to 16, improved some inefficiencies in the network code. Looks like it's running fairly well now.

[+] davidw|13 years ago|reply
> EDIT: Lowered the limit to 16, improved some inefficiencies in the network code. Looks like it's running fairly well now.

Might be a fun excuse to play around with an Erlang port:-)

[+] pbiggar|13 years ago|reply
I spent a lot of years using wasd and the mouse, but I no longer have a mouse. Anything you can do for us trackpad users?
[+] andrewljohnson|13 years ago|reply
Very cool, my biggest issue with the game play was just catching on corners. I think it could be very successful with a lot of iteration, richer graphics, and storyline. The basic fun factor is there, which isn't true of many commercial games.
[+] elisee|13 years ago|reply
:)

I hope to do something more serious with it in the coming months. If anyone cares to be updated, you can follow me on Twitter at http://twitter.com/elisee

[+] siliconc0w|13 years ago|reply
You can tell the ex-counterstrike players who bait their teammates.
[+] pastylegs|13 years ago|reply
It took me 3 kills to realise I was team killing! Nice game
[+] creativename|13 years ago|reply
I really had wayyyy too much fun playing this, for how "simple" it is. I'm very impressed with what was possible in just two nights. Thanks a lot for sharing!
[+] elisee|13 years ago|reply
Glad you enjoyed it, thanks for the kind words! :)
[+] BHSPitMonkey|13 years ago|reply
Awesome! Now just add first-person view, and a 3D map, and different weapon loadouts, and classes, and... I may be getting carried away.
[+] elisee|13 years ago|reply
Haha yeah, there's a lot I could do: Capture the Flag mode, player skins, Twitter/FB authentication to keep scores across games, various weapons, more powerups, ... I'll see how it goes :)
[+] sekm|13 years ago|reply
Nice work, amazing that you could crank this out in a couple of nights. Inspirational!
[+] elisee|13 years ago|reply
Thanks :). I spent a huge amount of time working with those techs lately so I'm pretty familiar with them. It's not like I could have done that from scratch.

Over the last few weeks I wrote a Web player with Three.js / Lua.js to be released with the Beta of my cooperative game-making platform (next week) - http://craftstud.io/, and last year I wrote a Google Wave-like thing with Socket.io.

[+] ssabev|13 years ago|reply
This doesn't seem to work well on my MBP. I can't rotate with my trackpad...
[+] sunnybunny|13 years ago|reply
I love simple games like this, reminds me of the good ol' days. =)
[+] akimc|13 years ago|reply
Good job for this little game, really funny and addictive continue the good work !

-sequel

A.