top | item 3784754

MMO Asteroids

307 points| catilac | 14 years ago |seb.ly | reply

81 comments

order
[+] joshes|14 years ago|reply
Could this be an April Fools gag?

I wish I had screencapped it, but at one point I found myself in the middle of the screen, watching four swarm-like quadrants of fellow ships (top-left, top-right, bottom-left and bottom-right) all moving in relative unison. Anytime a swarm started to get close to me, I would inch away for a few seconds before the swarm turned back. I was able to stay in this middle, peaceful area for an extremely long time before random stray fire eventually finished me off.

[+] unimpressive|14 years ago|reply
A quick removal of your network cable proves it a hoax.

I almost want to learn JS and Node to build a real one. Just to spite the OP.

[+] hobin|14 years ago|reply
Yes. Another way to see this is that few (perhaps even none at all) other ships are constantly firing at maximum rate. If this were multiplayer, that'd be what most people would be doing.
[+] matthewgifford|14 years ago|reply
It's easy to get this to happen. Just stay motionless until you have the attention of 3 or 4 ships. Then book it in a straight line. Suddenly, it zooms out and the ships start behaving like schools of fish.
[+] raquo|14 years ago|reply
Pro tip: if you're getting such non-random behavior, just clear your seb.ly cookie and you can play normally again. I'm guessing the more you play, the higher chance of non-random behavior there is, so that players gradually realize it's a hoax.
[+] zedr|14 years ago|reply
Try unplugging the network cable.
[+] Kiro|14 years ago|reply
All the ships on the screen just stopped flying around and started shooting at me in sync.

Ok, it happend again now... Something strange is definitely going on.

[+] ORioN63|14 years ago|reply
There's no way, that's all just other players. TWO times a screenful of players, started to gank me.

Maybe I'm just a sore loser ahaha. Great game, anyway.

[+] lnanek|14 years ago|reply
Yeah, I saw an entire screen of players turn toward me once before as well and turn away immediately later. Hopefully players end up in the same world with just a lot of computer opponents as well...
[+] mikeknoop|14 years ago|reply
Apply the CounterStrike model of short 3 minute rounds and you'd have yourself an actual game here.
[+] h2s|14 years ago|reply
Anyone else only realise this was fake when they eventually opened the Network tab in developer tools to find out how it worked? After that, I double-realised when I noticed that none of the other ships ever idled while everyone else attempted to figure it out simultaneously.
[+] lnanek|14 years ago|reply
Hmm, favorite strategy: zoom ahead full speed with a spammed bullet stream in front of you. After wrapping around enough times your bullet stream (and probably you) are going to nail someone. As you get better you can adjust your course a little to hit more, or hunt down people after that who are critically damaged by the bullet stream. :)

Fun, all in all, and an awesome tech demo. For finished games, there's already http://www.getcontinuum.com/ which is basically the game with rules and rounds and teams and whatnot. Although that is thick client.

[+] stcredzero|14 years ago|reply
Thanks for posting this. I am at work on an Asteroids-movement style MMO mashup with Elite. There will be "weapons lock" but there will be aiming and positioning as well, so dodging will be key.

Players will be able to design their own ships, which will have performance determined by their shape, and placement of components within. (So, the more wedge-shaped your ship is, the more armor value it has for shots from the front, but the slower it can turn because its structure is less robust. Also, the longer your laser-tube is, the better range it has, etc.) This will happen in a procedurally generated universe containing in excess of 2^128 worlds.

I'm doing this as a study in emergence in games. I want to implement an MMO where mindless "keyboard macro" grinding is totally absent. Wherever possible, we will replace a boring grinding mechanic with something akin to optimizing or micromanaging in an RTS or 4X. What's more, the optimizing/managing mechanics will actually be emergent themselves, building on the ability to write scripts for almost everything in game. (These will run on the server, so the user can license their scripts to other players for in-game money.)

[+] JakeSc|14 years ago|reply
As others have pointed out, this game is a bit of a prank. For example, the "CONNECTIONS" value is randomly generated:

  numPlayers+=randomInteger(1,5)
Though there is indeed some WebSocket communication between your browser and the server. Here's what most of these communiqés look like:

  {"type": "leave", "id": 133334510518} 

I wonder why the author even uses WebSockets at all, or what these "leave" packets are meant for.
[+] jasonkester|14 years ago|reply
I actually did this with Joust, something like ten years ago, using java sockets for the communications and dhtml for presentation.

The multiplayer version is long gone, but you can still get try out the original dhtml head-to-head version (provided you have IE3+ or Netscape Navigator handy):

http://www.jasonkester.com/joust/

Might have to spend a weekend cramming it full of Node.js and replacing the 1998 DOM referencing syntax with something a bit more modern...

Edit: Holy yikes, it actually works in the latest Chrome and Firefox. No idea how... http://www.jasonkester.com/joust/

[+] drunkpotato|14 years ago|reply
Hah! Great fun. I've found the strategy for long-term survival is simply to stay in the spawning point, spin, and fire as many rounds as possible. I suspect this is because the damage you take for hitting another ship's shields is set high enough that the probability of taking bullet damage is roughly constant whether moving or staying in place, while the probability of taking damage while moving is much higher than that of taking damage while staying in place.

Anyone with a more careful attitude towards quantitative analysis than I care to verify?

[+] raquo|14 years ago|reply
If these were humans, a standing-still ship would attract more aggression as an easy target, but bots don't seem to care about that, so it should be good option for maximizing kills/deaths. However, it takes a long time to kill anyone without active movement – hunting down near-dead ships is the best way to get best kills/minute. (and by hunting down i mean crashing into them of course, as well as point-blank fire).
[+] schubert|14 years ago|reply
function boom() { for (var a = 0; a < 100; a++) { for (var d = 0; d < ships.length; d++) { var e = ships[d]; if (e != player) { if (e != undefined) { e.hit(); } } } } setTimeout("boom()", 2000); } function restoreHealth() { console.log("restoring health"); player.energy = 200; setTimeout("restoreHealth()", 100); }

setTimeout("restoreHealth()", 100); setTimeout("boom()", 2000);

[+] jabo|14 years ago|reply
A friend and I have been working on an MMO game called Pixza: http://pixza.com/lite

Unlike MMO Asteroids, we don't fake the multi-player element. (Try pulling the network cable :) ) But with that comes the problem of bootstrapping the game to get a critical mass, since the game is boring with a few players. Building an AI engine for the game seems very complicated because it's a strategy game.

[+] ck2|14 years ago|reply
Some good April 1st jokes become real eventually though.
[+] rekul|14 years ago|reply
I'm thinking of building a simple game like this(but not with shooting stuff) using node on the server side since it's the cool thing to do now. But idk how many players a server could sustain or if the browser client might slow down when rendering many players on the screen.

Anybody want to help? Should just take about a week to build something playable i think.

[+] deliciouscoffee|14 years ago|reply
If an mmo version of asteroids sounds interesting then you should try out Continuum (http://www.getcontinuum.com/) It was released commercially in 1997 and subsequently abandoned by its developer. The community took over the client/server and it has evolved into a pretty complex game.
[+] specialist|14 years ago|reply
Sorry for the noob question:

How does one prevent cheating/hacking with a client-side runtime? Is there a crucial dividing line of functionality between server- and client-side functions? Say perhaps fog of war and client's only get the position updates of visible enemies?

If there are best practices / conventional wisdom, pointers (links) would be appreciated. Thanks!

[+] GabeN|14 years ago|reply
For a real old school MMO you should all try Jet Set Willy Online, it involves a small client download rather than being browser based but it faithfully captures the original feel of the game. http://jsw.ovine.net/
[+] cr4zy|14 years ago|reply
Check chrome://net-internals/#events and include actual bytes under "capture". The data being sent through seb.ly is not enough to for the game:

    .#{"type":"leave","id":1333318871470}
It does look like he's updating the players coming in and out though.