Show HN: MMOsteroids: JS, Go, and Webrtc
emergencevector.com
emergencevector.com
EDIT: I guess I'm not going to get anywhere near my max theoretical population of 560.
EDIT: Had to reboot the instance server. The WebRTC processes are holding up, though.
I've made lots of small browser games but haven't tried in the last few years. Websockets have never scaled well for the obvious reason that over bad connections data gets blocked up!
I don't understand what to do on your game, and the UI needs work. You're obviously very good at the physics/networking side of things, but maybe get some help on the UI :D I played for 10 seconds then had to close it
TCP/websockets are good for slower paced games like point and clicks but they don't normally work well for fasted paced games with physics.
WebRTC data channels don't have to re-send lost packets (unlike WebSockets), so if you do WebRTC between client and server it will unlock a new genre of games for the web!
https://secure.emergencevector.com/tutorial/
If you can't figure out how to make it into Hyperspace, you are officially a weakly interacting massive particle! :D
Everything is client-server, client wins, except for one thing. (Left as an exercise.) WebRTC is only there as a substitute for UDP.
var wrtc = require('electron-webrtc')({ headless: true });
var SimplePeer = require('simple-peer');
var requestify = require('requestify');
var dgram = require('dgram');
The Go server uses UDP to talk to one of the 4 node server processes, which are running instances of Chromium under xvfb under tmux. There's a lot of code load overhead for the 4 processes, in terms of a lot of Chromium loaded but not running, but EC2 servers are RAM heavy, so not an issue.I haven't looked into exploiting the new true headless mode in Chrome yet, which should simplify things a lot. I'm also thinking of doing a full port to Go for WebRTC. That's a lot of stuff, however.
I knew that this was possible in theory, but my experience with messing around with the available serverside WebRTC libraries gave off a similar first impression to the one you mention in your blog, namely immature libraries.
Looking forward to your blog post on your experiences with Datachannel.
I had the polarity reversed. It's actually client-server, server wins.
I'll give it a shot when I get home from work!
I played Star Control 2 many times over as a kid and can't help but think that my many (many!) hours in front of that game have trained a part of my neural nets to excel at recognizing the sounds and readying for battle. 20 seconds into this game those paths were triggered, hence my Q.
Interesting how much more accessible graphics design is over audio design.
Back in my day, at summer computer camp we'd wander around the college campus looking for a teletype that actually printed on paper to break into the system to play a game. We'd be so hard up for games, we'd type in source code listings from paper magazines. That's how we learned how to program!
It was just too hard for you! Them's the breaks!
I also tried to save some other players by killing the ships that were following them, but they never survived…
I've thought of some low-friction registration methods, but making them @sshat proof takes more effort than just having a registration and slapping a captcha on it.
It's mostly a tech demo now. There is one mechanic that is worth a few minutes interest. Can you make it into Hyperspace? If you're really good, you can do it without firing a shot. If you're not that good, then you can thrust away so you're not going towards the center, then snipe the 3 attacking ships. After that, it will be easier to figure out how to get through the stargate without the attackers.
I think the community took over it at some point and it's still kicking around somewhere.
Oh yeah! Subspace! Its successor is on Steam. The original implementation suffered greatly because it had a client-trusting architecture, and it was subject to endless cheating.
http://store.steampowered.com/app/352700/Subspace_Continuum/
I'm explicitly not trying to be Subspace. I actually can't support (to my high standards) the kind of real-time Subspace was trying for. (I can't guarantee your angular orientation is what you think it is down to 1/60th of a second.) My eventual goal is to try to implement a Space MMO, sort of like a 2D arcade space Eve Online.