Random name generator

I decided to write this post about my random name generator because I had a hard time finding code or algorithms for anything like this and I believe that others will find it usefull.

I've spent a lot of time perfecting my random name generator. The first thing that comes to mind when you're trying to make a name generator is alternating consonants and vowels. I tried that but I wasn't satisfied at all. Most of the results you end up are impossible to pronounce.

And so, I wondered, how to make the results pronouncable? I wanted to find out which letter could follow which. I wrote a small program to analyze a bunch of random texts and tell me which letters were found following which. I used the results in a new generator and it was a big improvement over the first one. I removed some letter combinations that don't work in my opinion but still the generated names weren't what I wanted to get.

So my next observation was that some letter combinations are possible in the beggining of words, some in the middle and some in the end. I wrote another simple tool to analyze a big bunch of text and this time produce three tables for the relations between letters, which you can find below. I ended up changing the tables quite a bit as I was testing, removing combinations that usually don't work.

They way I currently generate the name is as follows: the first letter is random, the second is from the ones that can follow the first. If neither of them vas a vowel, I add one while making sure it can follow the previous letter. The next letter is from the table for the middle of the word. If it wasn't a vowel I add one the same way as before. The second to last letter is from the middle table as well while the last one if from the third table. Also I throw out any name that ahs three vowels in a row (this wan't in the last demo I posted but will be in the next). I hope it makes sense, check out the tables below and also the link to my implementation in C#. I hope this was useful! Here you can download my implementation. Also if anyone happen to wonder how to set up their blogspot blog to display code I recommend reading here. Looking forward to your comments!

Posted by FiLkAtA | at 4:06 PM | 0 comments

Planets prototype

Progress hasn't been as fast as I would like, but nevertheless I am ready with my next demo - download it here.
Planet types
The main new feature is the addition of planets to the star systems which so far don't do anything really, but I am slowly getting there. There are 8 different planet types so far - Lava, Desert, Terran, Jungle, Ocean, Gass giant, Arctic, Barren and there are also moons. I am planning on adding 2 or 3 additional planet types.

Also, the mighty sun has been kind enough to make some music for the game, please tell me if you like it and does it fit the game. I am personally very happy with how it turned out, I think it fits both the space theme of the game and the graphical style I've gone with.

Comments on the previous demo suggested that I should add dragging of the view around with the mouse, so that is possible now. Of course it is still possible to do it with the arrow keys as well. Clicking on star systems and planets zooms in on them, also scrolling in on them while they are highlighted does the same.

Have a look and tell me what you think!

Posted by FiLkAtA | at 1:42 PM | 0 comments