Archive for April, 2008 ad

Monday, April 28th, 2008

My one week ad has run its course.

  1. New user registrations was slightly more, maybe 20%
  2. During that one week period, I got one sale that paid for the ad, and one business communication of indeterminate value
  3. Got 306 visits due to the ad in total, 2/3rds of which were on the first day of the ad.

Overall I’m pretty happy with how it turned out. To VERY roughly estimate, I think the ad paid for itself and probably generated its own cost in increased sales as well.

I also contacted Gamasutra but the sales person I emailed about advertising did not reply to me.

Codemasters licenses RakNet

Wednesday, April 23rd, 2008

I’m pretty happy as last week Codemasters purchased a site license to RakNet 3.x. I feel it’s a vindication of my hard work and effort over these 6 years because it means even against a big competitor, no real advertising, a programmer-centric website, and few connections, I still won in the end based on technical and quality merits. With most of my past sales I had some kind of edge – I knew someone at the company, or the company was too small to afford anything more expensive. But this time it was a straight-up victory with all the major hurdles in place. Codemasters is a great company that I like too, and the tech director there is a very nice guy.

I think these kinds of sales are more rare than they should be because a lot of people don’t realize how far advanced RakNet is at this point. Of course there are always parts that can be better, or one of my competitors does better to some degree. But on overall technical merits I think it’s right up there with my most expensive competitor, even better in some ways. I think with the increased funds my new prices are earning I can afford some marketing and finally get some serious market share.

I’m pursuing various official and unofficial channels in getting official console support too. Talk about beating your head against a wall… Fortunately, while I can’t say that I support console X, I can say that my customers do, and that my customers use RakNet. Maybe 10% as good, but better than nothing. If I can get that out of the way I’d probably double my sales. My best bet so far is to partner up with an established console developer and have them sell RakNet, thus bypassing the need to get licensed to begin with.

How to pick the median of a large list

Monday, April 21st, 2008

I keep reading about how Google always asks the interview question on how to pick the median of a large list in a distributed network. Here’s my answer, which I think is pretty optimal:

1. Randomly divide the list equally among all computers.
2. Pick one element (the key) of the list at random.
3. For each computer, for each element in that computer’s sublist, compare that element against the key. If it is less, move the element to the lesser list. If it is more, move it to the greater list.
4. Add up the sizes of the greater and less than lists among all computers.
5. If the sizes are equal, the key is the median. Done.
6. Else set the list to the greater than list. Go to 2

Ad on

Monday, April 21st, 2008

I paid for a ‘featured spotlight’ ad on So far I haven’t gotten any apparent boost in traffic. Two people that I know of in the industry have ad-blockers so didn’t even see the ad. I wouldn’t say that adblockers are stealing, but it’s true that pretty much nobody wants to see ads. Taken to its logical conclusion pure advertisement paid content would not be a viable business model. Those sites would have to massively downgrade content, require subscription fees, rely on free user submissions, put ads in a more obtrusive context, and/or a combination of these measures. None of these are good solutions, and I don’t know what a good solution would otherwise be.

Considering that in the best case scenario I stand to make $50,000 from a site-license to a publisher, $500 is a pittance. But that’s only worthwhile if the link that gets me that sale is the ad itself, as opposed to other measures such as a new post.

New website design 2/2

Friday, April 18th, 2008

New website design 1 / 2

Wednesday, April 16th, 2008

Click image to see full-size version.

Trapped in an elevator and our entitlement society

Tuesday, April 15th, 2008

Interesting story about a guy trapped in an elevator for 41 hours. Security guards took that long to notice him, and then tell him what buttons to press to get the elevator moving again so he could get out. After that he goes on vacation for 8 weeks, wouldn’t return to work because it would jeopardize his 25 million dollar lawsuit, and loses his job. In the end it took 4 years for the lawsuit, he got “barely six figures”, lost his apartment, and is unemployed.

Don’t get me wrong, being trapped in an elevator for 41 hours is a terrible experience, and the security guards were beyond negligent since there was a camera on him the whole time. The guy could have lost his life from dehydration. But in our entitlement society it seems like the first thing anyone thinks of anytime something bad happens is “Who can I sue?”

I can understand going on vacation for 4 weeks. I can understand getting some money to cover lost wages, medical expenses, and a fine against the security guards for stupidity. But to intentionally not to go back to work just because you don’t want to give the appearance that you are mentally fit… now you’re just a greedy bastard looking to win the legal lottery at someone else’s expense. It’s like the case with Max Payne (the computer game) where the developers had to pay millions in legal fees to defend against some wrestler. Well maybe not, but every time I think of a ridiculous case I’m reminded of that.

Back when I was a teenager I used to go to the public library after school. They had those swivel doors that you would pull open and they would slowly close behind you. One time this old lady opens the door, takes one step forward, and just stands there for about 3 seconds until the door hits the back of her heel. She immediately starts shrieking at the librarians demanding they call the police and an ambulance. All the while she was standing there unharmed, and the door’s impact probably wouldn’t have cracked an egg. Call the national guard! I still wonder if she was just an idiot with a bad temper or yet another abuser of the system.

So at the end of that article I guess we’re supposed to feel sorry for the guy. But I don’t. He didn’t deserve to get trapped in an elevator. That wasn’t his fault. However, the greedy lawsuit and his corresponding actions were. And in that, he got just what he deserved.

NAT punch through with symmetric routers

Saturday, April 12th, 2008

Spent like 8 hours straight today working with a customer on getting NAT punch through working with symmetric routers. The technique I was using with RakNet was essentially STUN, with an early datagram with TTL set to 2. This avoids the problem of one message arriving early, despite attempts to send simultaneously, and ending up IP banned on one router.

Very few sites on the internet go farther than STUN. I found this article at newport-networks on other techniques, however none of them were practical. Boiling down the 6 pages to two sentences, the first technique was to route the messages. The second was to have a filter past the router that modified the destination addresses.

I later found a much better paper at It’s long but gives a good explanation of the problem. To boil it down to one sentence, it says it is impossible to connect peers both behind symmetric NATs in a reliable way, but you can guess the remote port based on typical router implementations.

I use the external port … external port + 4 and the internal port … internal port + 4. It worked for me connecting to the guy I was working with, but not the other way around. However, I suspect he was doing something wrong since it was 3 AM his time and his output didn’t make sense.

Here’s the code

I’m feel exhausted after doing this all day although all I’ve done is sit here in front of the computer.

*** EDIT ***

Came up with the idea to also have the recipient send datagrams to the sender’s possible open ports. If one of those datagrams arrives, the sender will use the external port therein. This ought to halve the failure rate by handling the case where the receiver could have connected to the sender but not vice-versa. Because I can send these datagrams all at once (rather than connecting one attempt at a time), it should help the system complete faster too.

I’m pretty happy about this because I have known for a while my NAT punchthrough wasn’t tested to the degree it should have been. I think it’s pretty robust now. The only thing I’m not doing is uPnP, and maybe I’ll add that further down.

Adding clan support to my lobby system

Thursday, April 10th, 2008

I’m adding a generalized clan system to the lobby in RakNet. Because it’s generalized, anybody can use it for any game.

It’s commercially viable in quality:

Create, list, update, rename, and destroy clans.
Clan names have to be unique, and can’t be in the disallowed words table.
Users can be in more than one clan at a time.
Each clan has a bulletin board
You can invite members to the clan, and members can ask to be invited. You can also have open clans where anyone can join.
DB maintains integrity via constraints and cascading deletes.

This is actually the second time I’ve done something like it. The first time was with Galactic Melee, but it was too specific to the game.

As with the ranking, email, and cd key systems, the systems are reasonably independent so you can use one without having to use all the features.

Probably 3 days total for the implementation. You wouldn’t think that just creating a clan, which is just a list of players, would take a long time. But it’s much harder because you have to enforce conditions in the database and process the requests asynchronously. Once the database is working you have to do it all over again, now serializing the request to the server, having the server enforce code-level restrictions (such as only 1 user per clan), validating input, having the server serialize the reply back, and serializing and calling the proper callbacks on the client. Plus the database schema has to be reasonably efficient. Plus the system is generalized, and it’s always harder to write general than specific.

It’ll be in the next version.

Galactic Melee coming back

Monday, April 7th, 2008

I let Galactic Melee die for a while. I lost heart to put any time into it and I didn’t want to pay the server fees anymore. However, last week I met with someone who expressed interest in possibly buying it, and who may have the resources to do so. I’m putting it back online on my second computer, and now that I have a static IP I can actually host it myself. This has been bothering me for a long time. In fact some nights I wake up in the middle of the night filled with anxiety over all the time and money I lost. So I’m happy it’s going to be up again.

The main problem is I don’t know how the provisioning system works with Aria, and there was some weird thing being done to connect to the database. OBDC or something like that. So I’m going to have to figure that out over again. I wish I had used PostgreSQL originally for the database stuff. The server will probably be back up tomorrow in any event. The webpage is up as soon as the DNS change propagates through the internet.

There’s really two ways to go with the game. One is to hang onto it as I have been doing in case a buyer or investor comes around. There’s a very small chance I could make back my money that way. However, as I’ve heard finding an investor is a full-time job, and not something I’m interested in actively doing. The other is to open-source it and import it as a game demo into RakNet. I’ve wanted a good game demo in RakNet for a long time and nothing could possibly beat this. Doing that doesn’t make me money directly, but it does increase interest in RakNet. It’s also satisfying because it means I invested in a year and almost $100K into RakNet rather than investing a year into nothing.