Show HN: Twitch Plays Doom
This is the inevitable post after jeff_harris released restful-doom https://news.ycombinator.com/item?id=14919534
twitch-plays-doom is a Python Twitch IRC->restful-doom proxy to control doomguy with a staggering 8 second delay.
The project was Saturday night's 'I wonder if I can make this work' session. Since it's been live there has been a team of four successfully make it to half way through E01M01.
I've since added godmode to the chat (you can guess the command).
This was fun, hope others get some enjoyment out of it.
Twitch Stream/Chat https://www.twitch.tv/dddanmar/
twitch-plays-doom https://github.com/dddanmar/twitch-plays-doom/
restful-doom https://github.com/jeff-1amstudios/restful-doom/
chocolate-doom https://github.com/chocolate-doom/chocolate-doom/
42 comments
[ 3.0 ms ] story [ 99.9 ms ] threadEdit: I'm getting downvotes for this? It's in the posted source code: https://github.com/dddanmar/twitch-plays-doom/blob/master/tw...
It's a battle of trying to keep the marine alive versus killing him. Every-time someone types iddqd, god mode is toggled.
God mode makes the character invincible, without god mode on the marine dies in a few seconds.
Factions are normal and I would expect them to coalesce, polarize and get more extreme over time.
Then they post an angry rant on some mailing list about how forcing tabs to spaces forces people with various reading disabilities into a tabstop setting that makes it hard to read.
And before too long it's devolved into the same old Tabs vs Spaces debate.
attempt this site>>>>>>>>>>>www.99homejobs.com
Doom is simply too interactive. You need to be able to control it in realtime.
I recommend three things:
- Slow the delay right down, and possibly make it adjustable via chat commands. A 500ms-1s delay is honestly going to be the best possible thing here. Yes, some players will lag too much and won't be able to play at those latencies - which is why you make it adjustable.
- Show, inside the video stream, the command that is currently executing, and the username executing from. This will create a unique tuple that will allow players to figure out the sync for themselves.
- A consensus system that tallies up the next key to press, TpP-style, might be a good idea. Right now everyone's fighting to cooperate because it's concatenating everyone's actions together.
Twitch uses RTMPE for the most part, it's always going to be a little delayed. It's a decent box, compression is on, connected to fibre internet.
If anyone has any ideas of reducing latency I'd love to hear it!
[0] https://mixer.com
The delay experienced is all in the stream broadcast back to the Twitch servers and on to the viewers.
When I'm watching the chat and also watching the local view of Doom the commands are executed almost instantly. It then takes ~8s to show on my Twitch view. When I started it was around 15s but some tweaking in OBS has brought that down a bit.
Or you could execute the command for a second, then pause the game execution. Make it closer to turn-based Doom.
But as mentioned, it would have to be capped to some number to prevent abuse.
I am unfortunately completely ignorant of how you actually send data to Twitch, but can you use H264? It has an "ultra-low latency" mode.
Edit: Hmm, you're on OBS. Maybe you could stream using some uncompressed low-latency option from OBS to ffserver, then reencode on ffserver to low-latency H264. Alternatively, you could use ffmpeg with its X11 capture option, pointed at eg Xvfb.
And Discord just rolled out a beta for screen-sharing, also something to keep an eye on maybe.
Worked well for showing off the platform, since there was really a low latency. Since it uses it's own interactive input, and not relying on IRC for interaction, so it's UX is considerably more user friendly... if you want to sign up for a Microsoft Xbox live account to use it
:O I can't fire fast enough!
f - f - f - f
My part took all of four hours to write, setup, deploy and post.
At this point I'm going to pull the stream down, been going 5 days now with a few crashes in Doom that are getting a little frustrating to debug.
Thanks again! This was great fun!!