Limegarden.net Personal site of Wouter Lindenhof

29Jun/102

Lady luck is using a loaded dice…

The one thing that I didn't backup was Outlook. My email is handled by GMail and since Outlook also syncs with my mobile phone, I already had a backup of my mail and my contacts.

So being the adventurous type I decided against wasting my time and do a proper backup. Well, today, when I wanted to call someone, I found out that all my contacts had been wiped from my mobile phone and as a result my backup was gone.
I suspect that it has been my own fault, but based on the bad luck I'm having lately I'm suspecting Lady Luck to uses loaded dice to decide my chances...

Tagged as: , , 2 Comments
25Jun/100

Wierd evening

Today went well, as far days go, that was until it hit 11 o'clock (I had been watching the football match between the Netherlands and Cameroon, which we won ;) ). I went up to my room to see if my laptop had completed some maintenance work and was surprised to find "The computer has been recovered"-message which is signal that something has gone horribly wrong. Clicking 'Ok' caused it to reboot and after swiping my finger (gotta love the fingerprint protection system) the computer logged in and Bang! Blue Screen followed by a reboot after which the computer tried to recover again.
I decided to let the computer have another try before I would try and find out what was wrong, but needless to say, this rant is not about how happy I am that it has been fixed but that I didn't complete it.

To make a long story short I decided that it was quicker to just reinstall everything so as I was busy back up, my mom asked me to pick up my brother who had gone party. It was already the next day (it's now almost two in the morning) and to my suprise I found out that my bike (who he borrowed) was suddenly a folding bike and I'm prety sure that was not possible when he left. Apperantly he had to evade something which caused him to ride in to a low wall. The result: Bike broken and my favorite brother had a few scratches.

So now I'm reinstalling my system for the first time I bought it (almost four years ago, which is a record) and I'm without a bike. If the sky would drop on my head right now I wouldn't even be suprised. :-D

Tagged as: No Comments
24Jun/100

Splash screens

I always have my doubts about splash screens. As far as I know the majority of the splash screens have no function. A minority does have a function (they do background loading).

The main purpose of splash screen is, in my opinion, advertising. For a few second the user sees the name of the application and the company behind it. I admit that you can use it to load things in the background, but showing a splash screen also takes time. In that case you are better off loading the application and showing a progress bar. At that point the user sees it as the application is loading content. If you are using a splash screen for that (and I'm going to assume it makes no difference in performance or time that it requires) than the users perceives it as an annoyance.
This is a weird thing. Because showing a splash screen that does nothing but is only showed for a 2 seconds after which the application starts loading is seemed to be less intrusive than a splash screen that takes longer but actually causes the application to load faster (it doesn't require two useless seconds).

So how do you create a splash screen?
First of all start with a small image (take the dimensions of the office 2007 splash screens), add some abstract art (not something complex). Then create a form without borders in C# that closes after a few seconds and then modify the program.cs so that it looks like this.


using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace Client
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new SplashScreen()); // load the splash screen
            Application.Run(new MainWindow()); // load the application
        }
    }
}

I know it's a cheap trick, but it looks nice if you do it well. And most customers care a lot about appearance.

22Jun/100

Only one more day

Tomorrow I will be defending my graduation work and if all goes well (it must be a strange turn of events if doesn't go well) I will know if I have completed my graduation.

Only one more day :)

9Jun/102

Reverse updates

It has been a while since I last posted something, but that is because I have been busy with my graduation (in case you were wondering).

Anyway, today, while I was walking the dog, I suddenly realized how to fix a bottleneck for a certain game idea. The game idea was that the hero can interact and affect lives of other characters in the game directly, the bottleneck however was that each character affects another character, which affects another character and so on. A simple example would be if you decide to buy a weapon or not. If you do buy a weapon the merchant will be able to stay in business, buy some bread. When he buys bread, the baker will be able to buy the next shipment of grain from the miller and the miller we be able to pay the farmer and everybody will be happy. Now if you don't the miller might not be able to some bread (he needs to eat also) which means that he goes out of business. Since he is the only miller in the entire region, there will be no more bread for quite some time and everybody dies from the hunger.

The problem with that game idea is that if you even simulate a small village (say 25 people) you will have a lot of relationships to go through. Even if it goes in one direction it will still be 1 hero times 1 person times 25 people times 24 people times 23 people et cetera. The total amount of relationships within the village would be 1.6E+25 (16 with 24 zeros behind it). Even if we say that any action will have not have any affect after 7 relationships that would still be 2.4 billion relationships that are affected. If we limit the amount of relationships to 7 for each person (so 7x7x7x7x7x7x7) it will be 823543 of relationships that need to be updated when the hero does something. And maybe one of those persons affected will need to perform an action that affects the community which means the entire process starts over again.

Of course the game is real time and the other people in the village don't require you to perform any action so if you have 3 or 4 villages you will have almost a constant rate of large social updates. Until this morning it was my firm belief that the above game idea should be hard if not impossible to execute unless you have some monster system.

I always thought in forward direction, what happened now dictates the future, until I thought about reversing the flow, the past is dictated by the future.

Lets take the previous example of buying a weapon or not. Although this is a fact now by the player, the game does not have access at that information at the current time. Let's say you meet the miller and find out he is alive. No matter what happened in the past, the future dictates past events that no matter what the miller survived and kept his job. And the only way that he has kept his job if the baker bought his grain and the only way that the baker could buy his grain was if some paid for his bread. If you made a major investment by buying a weapon (say a gold weapon) then he might credit you for it. If you weren't the cause something else must have happened for the influx of money that allowed the community to stay alive.

Now lets take the same example but the miller is dead. The past generated from that point on could dictate that the hero not buying could have caused it. Or if he did buy the past could credit something else (disease, war, bad crops et cetera).
So what is so different about the reverse update compared to the forward update that it allows us to compact information in such a manner that the above game idea is possible?

Simply put: Forward updates are simulations, calculating exact future behavior, while reverse updates are emulations, imitation of past behavior. A forward update always has one cause (generally the hero) but has many effects (the merchant, the baker, the miller and the farmer). A reverse update has one effect (the baker) and will look for one cause for its current state which is a linear path.

I'm not certain if the solution always works as the past needs to be consistent (you can't undo the past) and certain actions always have a forward update, but for now the game idea seems possible again.