{"author_name":"Lattyware","cat":"LD #23","comments":[],"epoch":1334081400,"likes":2,"metadata":{"p_key":"59641","p_author":"Lattyware","p_authorkey":"5642","p_urlkey":"95393","p_title":"Generating words at random \u2013 what I learnt from Ludum Dare 22.","p_cat":"LD #23","p_event":"LD23","p_time":"1334081400","p_likes":"2","p_comments":"0","p_status":"UPD5","us_key":"5642","us_name":"Lattyware","us_username":"lattyware","event_start":"1334880000","event_key":"10","event_name":"LD23"},"text":"<p>So, I didn&#8217;t manage to finish Ludum Dare 22 as I had to travel home from Uni halfway through and ran out of time.<\/p>\n <p>My aim was to create a procedurally generated universe and allow the player to travel around finding out if they are alone as sentient life in the given universe. Given the time issues I really didn&#8217;t get much done, but I did focus on a particular problem, I wanted to name planets so players could remember where they had been. How do you create words that are pronounceable without just having planets called &#8216;Fork&#8217; and &#8216;Television&#8217;. Words like these:<\/p>\n <ul>\n <li>fanglas<\/li>\n <li>jubbensetrier<\/li>\n <li>amenet<\/li>\n <li>moquiets<\/li>\n <li>mystilaxation<\/li>\n <li>consutey<\/li>\n <li>untive<\/li>\n <li>curchers<\/li>\n <li>anchottollon<\/li>\n <li>symborse<\/li>\n <li>prasting<\/li>\n <li>weeloats<\/li>\n <li>dupliquding<\/li>\n <li>autobency<\/li>\n <li>proscolicends<\/li>\n <\/ul>\n <p>Well, the answer came in the form of Markov chains, a cool little trick that allows you to do this quite simply. Afterwards this still intrigued me, and I finally had some time to finish up my script,\u00a0 <a href=\"http:\/\/www.lattyware.co.uk\/projects\/wordgenerator\">wordgenerator<\/a>.<\/p>\n <p><span id=\"more-110742\"><\/span><\/p>\n <p>It&#8217;s a Python library and command line application, so it&#8217;s usable by pretty much anyone. If you have trouble thinking up names for things in general, it can be a great help, and as a library it goes hand-in-hand with any procedurally generated content. It&#8217;s GPLv3ed, so feel free to use it in any way that fits the license. The above is actual output from my script. You can change the output via a variety of options (explained in the above link) and by changing the input dictionary of words to generate from, for example, using an Italian one:<\/p>\n <ul>\n <li>impiate<\/li>\n <li>aliersi<\/li>\n <li>inaudartererai<\/li>\n <li>ottardiscrerei<\/li>\n <li>addoluccio<\/li>\n <li>deredicassella<\/li>\n <li>coibinarei<\/li>\n <li>impresto<\/li>\n <li>accreste<\/li>\n <li>storano<\/li>\n <\/ul>\n <p>While nothing revolutionary (Markov chains are pretty well known), the script performs pretty well and saves a bit of work. I think it&#8217;s pretty cool, and surprisingly funny to see the output you get, so if you find yourself needing names in your next Ludum Dare game, feel free to use it.<\/p>","time":"April 10th, 2012 1:10 pm","title":"Generating words at random \u2013 what I learnt from Ludum Dare 22."}