7 ms·
Show HN: Sparklin Wars, multiplayer Web shooter I built over 2 nights
- elisee 14y agoI 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-date-sparklin-wars/ 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/ https://bitbucket.org/sparklinlabs/sparklinwars/
- Aldream 14y agoNice 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?
- elisee 14y agoJust opened it up at: https://bitbucket.org/sparklinlabs/sparklinwars/ https://bitbucket.org/sparklinlabs/sparklinwars/ - Feel free to check it out and learn from it :)
- fmdud 14y agoGreat little game, especially consider such a small amount of time was taken to write it. Also great that you'v'e released the source code. I can think of loads of very fun little multiplayer games you could write with this; for office lunchtimes, etc. Great job! P.S. I killed you earlier :)
- mik3y 14y agoNice 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.
- thenonsequitur 13y agoAnother game in a similar vein that came up on HN a couple months ago is http://bombermine.com/ http://bombermine.com/ -- that's the game that changed my perspective about the possibilities for javascript MMOs. Bombermine's source code is not open though, so it's nice the source code for this one is open, to dig in and see the mechanics behind it!
- rschmitty 14y agowell done! what kind of server is it running on?
- elisee 14y agoIt's a VM I rent (and use for various projects) on a fairly beefy server. I don't have the specs at hand sorry.
- akimc 14y agoGood job for this little game, really funny and addictive continue the good work ! -sequel A.
- elisee 14y agoThanks :)
- sunnybunny 14y agoI love simple games like this, reminds me of the good ol' days. =)
- elisee 14y agoWell... 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 14y ago> 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 14y agoI 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?
- elisee 14y agoI'm afraid the game is pretty much designed to be played with a mouse as it requires precise shooting. I'd love to add gamepad support later on though, should work well with dual sticks (https://developer.mozilla.org/en-US/docs/API/Gamepad/Using_Gamepad_API https://developer.mozilla.org/en-US/docs/API/Gamepad/Using_G...)
- hydralist 14y agorip trackpad users
- creativename 14y agoI 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 14y agoGlad you enjoyed it, thanks for the kind words! :)
- andrewljohnson 14y agoVery 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 14y ago:) 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 http://twitter.com/elisee
- sekm 14y agoNice work, amazing that you could crank this out in a couple of nights. Inspirational!
- elisee 14y agoThanks :). 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/ http://craftstud.io/, and last year I wrote a Google Wave-like thing with Socket.io.
- tharshan09 14y agoThanks for releasing the source code. Could you give some background info on what the important files do? Such as the ones in the lib folder. Some methods can be guessed from code, but it would be nice to hear an overview from you.
- colemorrison 14y agoVery cool!
- BHSPitMonkey 14y agoAwesome! Now just add first-person view, and a 3D map, and different weapon loadouts, and classes, and... I may be getting carried away.
- elisee 14y agoHaha 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 :)
- BHSPitMonkey 14y ago> Twitter/FB authentication to keep scores across games This is a tech demo of open web standards. Persona! :P
- siliconc0w 14y agoYou can tell the ex-counterstrike players who bait their teammates.
- olivier1664 14y agoQuite 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 14y agoThe 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 :)
- Udo 14y agoThat 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 14y agoGlad you had fun with it! :) - Speaking of Web-based multiplayer RPG, did you try Mozilla's BrowserQuest? http://browserquest.mozilla.org/ http://browserquest.mozilla.org/
- pastylegs 14y agoIt took me 3 kills to realise I was team killing! Nice game
- mkilling 14y agoMost 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 14y agoFair 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.
- mkilling 14y agoOh I see. I was pretty confused why some people wouldn't hurt me with their friendly fire and others would. It's hard to tell whether the guys shooting at me were really trying to heal me though.
- chii 14y agointeresting game - tho its very laggy for me, unplayable =(
- anthonyb 13y agosame here. I'm sure playing from Australia doesn't help, either.
- PavlovsCat 14y agoI 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
- ssabev 14y agoThis doesn't seem to work well on my MBP. I can't rotate with my trackpad...