Friday, November 4, 2011

Good news, Microsoft contributes code to Samba!

Original mail is archived at https://lists.samba.org/archive/samba-technical/2011-October/079780.html.

Samba, the open source implementation of SMB/CIFS protocol, is the de-facto infrastructure piece in any mixed Linux-Windows environment. Samba is a clean room implementation in which most (if not all) technical details were obtained by observing the communication between different Windows machine, and not by having protocol specification at hand nor any proprietary code. In fact, the protocol wasn't available until 2007 due to Microsoft vs European Commission antitrust case.

That is to say a patch submission from coders at Microsoft would have been amazing to the point of unthinkable (Chris Hertel of Samba team).

However, that changed as of October 10th, 2011 when Microsoft Open Source Technology Center contributed a proof of concept for extended protection (channel and service binding) for Firefox and Samba (Stephen Zarkos of MS OSTC). That is certainly a big deal (Jeremy Allison of Samba). Hooray!

This news was reported in ZDnet on November 2nd.

Thursday, November 3, 2011

Some tips to win an OpenTTD game

Okay, this is a fruit of four days playing OpenTTD. I'm going to document a few important tricks that would hopefully help you win your game against AI players.

Firstly, be clear of the goals! You win this game usually by satisfying about ten conditions at once. See Company Rating in Game Mechanics. Even if you are much much more richer than your competitors, you may still lose the game because your company only focuses on limited cargo types, or that you only run a few airports. That means your company isn't diversified enough.

Now that the goal is clear. The way to win this game is by fulfilling these goals and being careless about the cash. So, let's open up more stations, even intra-town stations. Let's carry more cargo types, even with just one little bus. Let's run more buses to fill the vehicle count requirement. Those are basically three most often overlooked winning conditions.

Okay, so here're the juicier tips:
  1. The most important point is: the longer the route, the more money you earn! Always favor longer routes than shorter ones. However, this must be balanced with opportunity cost, that is when your fleet is away, your competitors might be sucking dry the cargos.
  2. Airplanes earn the most, then trains and (oil) ships, and buses the least. So if you have about 200 thousand dollars, get yourself an airport as soon as possible. Favor the biggest airports (Intercontinental one) upfront because it will be very difficult to upgrade later on.
  3. Some cargo types are best transported with some vehicle types. For example, oil are best served by ships, valuables by buses, and passengers by airplanes. For example, a Dinger 200 airplane could fly 400 passengers off to another city in a jiffy. That one air plane could easily earn you half a million dollars in a year.
  4. It is best to favor the most abundant resource producers. If you want to get passengers, find big cities. If you want to get into woods carving, find the biggest forests. If you want to supply oil to refineries, find the richest oil rigs.
  5. Feeder service that transfers cargo from one station to another is very useful. Remember, that is a cargo transfer, not cargo drop off. Feeder service also helps keep the mines/farms/etc. producing resources. For example, let's suppose you have a train station nearby a coal mine and this train serves a remote power station. You can open one lorry (truck) station next to the mine, and another that is joint (either distant-joint or adjacent) with the train station. Then you run one bus to carry cargo from an unjoint lorry station to the joint lorry station. Pick up the coal at the former, and transfer it at the later. This is an extremely short feeder service.
    +------+ +------+  road  +--------+
    | Mine | | Lor1 |--------| Lor1 + |
    +------+ +------+        | Train  |
                             +--------+
  6. In a well-run system, waiting time is minimized. Do favor more reliable, and faster vehicles. Also, make sure to split your vehicles to different separate stations or different stations of one joint-station.
    For example, if the buses are entering the station from one horizontal direction, you can split them into two branches by placing two vertical stations at different road segments at the junction, joining them into one joint station.
            ^
            |
            S1
            |

    -->-->--+--> (bus direction)
            |
            S2
            |
            v

    The idea is to place the stations on different road segments so that the total distances (of the whole route) when passing through either one of these stations are roughly the same so that buses don't favor S1 over S2, or vice verse. And remember, after passing through a station that is a part of a joint station, buses will avoid another in that same joint station. In the same vein of minimizing waiting time, maximum speed is, of course, at high priority. Nevertheless, break downs can drag down even the fastest airplane. Those supersonic planes that carry limited passengers, at break down, fly at a mere 300km/h. Another note to remember is try to minimize sharp turns. Make them as wide as possible.
  7. If the previous points fail you, try this last resort tactic. This is a defensive move that you can use to secure access to important resources and block competitors from accessing them. You can purchase all the tiles within the vicinity of the mines. Then only you can build stations that supply those resources. And because roads are shared with all, you should use railways instead. Moreover, you can also purchase tiles surrounding the competitors' stations so that they cannot build roads connecting to them. This is dirty play at work!
I am glad that I finally was able to beat the AI. That has freed me from the grab of this addictive game. Time to uninstall OpenTTD and get back to more productive stuffs.

Wednesday, November 2, 2011

Three days into OpenTTD

Well, I didn't see this one coming. I have spent three days playing OpenTTD and forgotten about the world outside!

I started with OpenTTD because it reminded me of younger years with one of my favorites, Transport Tycoon Deluxe. And I just couldn't let it go. The images got burnt in my minds. The brain kept thinking about best strategies to build roads, run trains, earn money, even in short late night dreams.

Yet, I have so far not able to beat the Return on Investment ratios of AI players. Damn. My bus earns about 10 grants each year while AI bus earns about 30Ks. Why?