How not to launch your new multiplayer game...
[UPDATE: After the day 1 patch it's actually possible to get a 3v3 game going without too much trouble now. Buyer Beware warning downgraded from 'Avoid' to 'Check it out'. Hopefully in a few more days they will fix some of the other more egregious issues. This is the nice part about Stardock published games -- they really do keep patching them forever.]
...when it feels like a paid beta. Demigod - a DotA clone - was released yesterday. This game is one of many games that is only fun when played against other people. There are bots, but they basically suck. So the multiplayer functionality of this game is critical: if it doesn't work properly, there are serious problems. Guess what Demigod's multiplayer support is like so far:
Yes, the multiplayer is completely broken. So broken that one of the game developers has said on the support forums that there's less than a 50% chance for games with more than two people from even starting properly, let alone playing smoothly.
So what's the problem? The game went through multiple months of private beta testing, how could it be this bad? Two words: "UDP p2p". Seemingly introduced in an attempt to combat the evils of lag, so far it appears to be an expensive exercise in not letting people play the game at all, laggy or not. Demigod requires a UDP connection to every other player in your game. If one of these connections doesn't work, the game doesn't start. For anyone.
The big problem seems to be how the game handles NAT, or other situations where incoming UDP connections are blocked. How do you handle NAT traversal? Should you try STUN or some other punchthrough technique? Should you try and use UPnP to negotiate this? What happens if the game has two (or more) people who just can't accept incoming connections? Do you proxy their communication through other players? What about personal firewalls? What about firewalls elsewhere on the network?
The whitepaper written about the backend multiplayer tech suggests NAT traversal is implemented, but so far in game it appears to fail more often than it succeeds, when it really should be succeeding well over 99% of the time for a task like this.
Demigod is a promising game, and I'd really like to play it against other humans. So far though, it's been an expensive reminder that you should read reviews of games before you buy them.
Comment (0)Munin Query Cache Graphing
Here's a Munin template for graphing effectiveness of MySQL's inbuilt query cache. I'll submit it to MuninExchange once I get a day's worth of traffic to upload a picture of the output graph. Blog readers get a live sample:

#!/bin/bash IFS=`echo -en "\n\b"` QUERY=$(mysql --skip-column-names --batch -e "SHOW STATUS LIKE \"Qcache_%\"" | egrep "(Qcache_hits|Qcache_inserts|Qcache_lowmem_prunes)" 2>/dev/null) case "$1" in autoconf) [ -n "$QUERY" ] && echo yes && exit echo no && exit 1 ;; config) echo graph_title Mysql query cache hitrate echo graph_vlabel hits echo graph_args --base 1000 echo graph_category mysql echo Qcache_hits.label Cache hits echo Qcache_hits.type DERIVE echo Qcache_hits.min 0 echo Qcache_hits.draw LINE2 echo Qcache_inserts.label Cache misses/inserts echo Qcache_inserts.type DERIVE echo Qcache_inserts.min 0 echo Qcache_inserts.draw LINE2 echo Qcache_lowmem_prunes.label Cache drops echo Qcache_lowmem_prunes.type DERIVE echo Qcache_lowmem_prunes.min 0 echo Qcache_lowmem_prunes.draw LINE2 ;; *) for LINE in $(mysql --skip-column-names --batch -e "SHOW STATUS LIKE 'Qcache_%'" | egrep "(Qcache_hits|Qcache_inserts|Qcache_lowmem_prunes)") ; do echo `echo $LINE | cut -f1`.value `echo $LINE | cut -f2` done ;; esac
More dotfiles
By special request. These are all pulled by my .zshrc if existing copies aren't there:
.htoprc - for htop
.screenrc - for GNU Screen
.config/terminator/config - for Terminator terminal
.vimrc - for Vim
.ssh/config - for ssh/sshd
Comments (2)My .zshrc
I have always known a few people who use zsh over bash, but recently they seem to be increasing in numbers. I decided to jump ship too and haven't looked back. Possibly that's because I've actually spent some time setting up my .zshrc...
Permanent link here. I use this .zshrc regularly on both Linux and FreeBSD machines, some quite old, so it's reasonably compatible. Includes an interesting prompt that changes the colour of the depending on the hostname (thanks, nameless coworker).
Note that this zshrc writes quite a few files and overwrites existing ones in some cases. Caveat emptor.
Comment (1)