Slapdash is a language-based random syllabic word generator and editor for Unity written in C#. Four fake languages are included (in slapdash.xml): Hapanese (based on Japanese), Kvorsk (Based on Norwegian place names), Old Pinglish (Based on archaic english rules) and Lespañol (Based on spanish). Slapdash can also be used to generate random names.
To use Slapdash in your project, just import the asset into your project and insert
using LemonSpawn;
in your project. Initialise Slapsash by
SlapDash slapDash = new SlapDash("slapdash.xml");
or
SlapDash slapDash = new SlapDash();
for no specific language setup. To create a random word in a random language, write:
System.Random rnd = new System.Random(my_seed);
string word = slapDash.getWord(rnd);
In order to generate a random word from a specific language template, write:
string word = slapDash.getWord("hapanese", rnd);
The word will always be identical as long as the seed is the same. Here are some random words in Hapanese:
chun waga godanntsu man son mekkyobunku ryon tsuden bun rennachan bonnazun bebyonnho togeze muno bun gufu kyamonmyun paryonannto fupicchon kiryoni chohankyaka gan wanmi memonnnumyu kunnryatsu hoson sen doden chatsungun bonnchokyo bin gon ryankejoji gonnun jonnan yaze kunngani danetane jumu yonngen byoppinoryo kishunryu kenni pan nin yozunmyu ohan shannza runnkan miwa nuzazon zeshaccho anande bannendochi minnugu ranon jusu hese madonmu ryunonneke rinhoda yahakya tsunnsanu samideggon zarejon hinu donnchawa byanna shan socchiken ryugi sutsunmi zonnkapi pokkatsun dokyon hinna tsun puryunun mannyubyo doto razonnen chana nennya ronne shannko suben kyoto mini rinnkan kin shun bane namojode puza honnen pin tsunnuhi koronnpo chagosho shupanu
In Kvorsk:
nøeng klikna ykketri bærud lågif plonnrud pjævrøtorp ukryggmark fjoum papeum ærrø tretheim knavrullie fjostad tikro nyfheim troga kvåggævatn blørrøl tjabbreås trikyøy kjofrup ygggard blottrå tisji drepeøy klek fryskja danebø kling glaeng kjoggyum knahås iggre hønnes knefe fråm bipre jifru gabbløn klønrud møeng åkne trobb sogg skjekjo bøhjabby vipra akkråklå knilleng utje briffraker dræssjys rahnes møås tvusjæ bruttun ovrum jotum vorinn skjaeng trøj knappåstad træppes knoheim fjejås åhjæhov ragglæl blåhjueng eppum kneppruhoff kvaing fjottji troblæ kiøy pjan prapup skjemmark vådd dragging frobeaker skjisskry plyhlie øjar lyeng ojorrud upprå ohøjeng girring tjåsse siøy hjavøy skjøbræ råbø druhøy sjyskre nøttjy kræf piji tabbhoff
In Old Pinglish:
vidupport hattri jiwecum beludwo baphoaxe desphe caggnuash tesiey fopprubrad crefle ghateaxe lysippso clebbrad gnuing wevodro griaxe vasoddoash gifriash gogghe whuggna vattaxe psovoash jipphu ghaffoing sottri tuggwa glojotoft poggreaxe subbepro plofre fisaham praffra whoaber vebbri toddri dwomash spirebbrad flaloey ittroash mummemiby plufiwick plilang hottarey oruey jibboblu mogytre vebri uddwe plowyke vaghi biggloley kiggwoaxe plicla gyggwaxe brobex sorippla fhivabbex brilyey nimiaxe tosussiash cehommyminster twiaber cavoness thiaxe spheport dwicaster muble sqibri plesaing ghaffield culyaxe defhuey goreroash vuttwo degoffoaxe swodro phiple cofhuey meggwucaster preaxe cecaviholm muppleing cruey dwing macle sagilebbrad bygne phiey geddru fheppuing pracaster fuppefru spuash sodwe vapphobex flesstead progwi fuclipol spaxe gney
In Lespañol:
puer ses plueo telmeco diuedelo fizeglue cruesla cegecle feita blo teda bama meviridre vrueísmo ceo geguer lluna tedrue alceglue vujuña dia plueñdo sepigeito esbuensa zanve diue jepra pemega ditruepa zarusco almefa fiblo lijeva niptuefa milzuella conuella julvuecola zalva ñitiso quer gruehulla fleito pios trueco ime geceha esquetita huso jihulve ecrue puspa zesa biscue viñduear baita lensela jetrueha cluela vuar huas nilueco pilvo tunda esmeda cle tenrueda vevre medijujo bra jesguear rutruejo covo coar veazo qunruema mijinge esta inueos tifre pitra sislecola raso vungo mija trueos fluedicola tileta tepra brenve niazo filita mitecre siconra duglueos bluebuo zaglue bepo tuspue zeva true
How Slapdash works
Every language consists of a set of syllables and rules. The syllables falls into five categories:
- C: Single consonant
- V: Single vowel
- CV: Consonant + vowel
- VC: Vowel+consonant
- CC: Consonant cluster
The internal rules makes sure that syllables are chosen so that certain consonant cluster- and vowel combinations are impossible. For instance, a random word that starts with a CV must to be followed by a consonant-starting syllable (CV, C or CC), while VC-syllables must to be followed by vowel-starting syllable (V, VC). Every syllable has three possible flags: A prefix (used as first syllable), infix (any middle syllable) or postfix (final syllable only). In addition, the language allows for creation (and ignoring) of double consonants, either in the middle or end of the word).
Creating a language
There are two ways to define a new language in Slapdash:
- Use the built in xml-editor (the ExampleScene scene) to manipulate the slapdash.xml-file
- Programatically create a language
Slapdash “Hello World” language showcase: Gargle
Gargle is a simple & harsh consonant-restricted alien language originating from planet Ahem. Start by defining a new language:
Language gargle = slapDash.AddLanguage("Gargle", 3, 5, 1, false);
This defines a new language with name “Gargle”, allowing words between 3 to 5 syllables, 1 double consonant per word but no words ending in double consonants. Gargle only contains deep vowels, so let’s define them:
gargle.InitializeSyllables(new string[] { "a","e","o","i" }, Syllable.Types.V);
All initialized syllables will default be flagged as pre-, in- and postfix. In Gargle, only two consonants exist freely: “m” and “n”
gargle.InitializeSyllables(new string[] { "m","n" }, Syllable.Types.C);
Apart from this, Gargle has restricted and strange consonant clusters. These are only allowed as pre- and infixes.
gargle.InitializeSyllables(new string[] { "bl","br", "kl","kr","sl","sr", "tl","tr", "hl","hr" }, Syllable.Types.CC, Syllable.Prefix | Syllable.Infix);
Also, Gargle has some rather strange word endings (when they are not vowels, n or m)
gargle.InitializeSyllables(new string[] { "axor","exor", "otox","itox","ebuff","ibuff"}, Syllable.Types.VC, Syllable.Postfix);
gargle.InitializeSyllables(new string[] { "meh","muh", "nah","nop" }, Syllable.Types.CV, Syllable.Postfix);
Finally, gargle does not allow for double m or n nor vowels:
gargle.exceptDoubles = "mnaeio";
Here are 100 randomly generated Gargle words:
System.Random rnd = new System.Random();
string s = "";
for (int i = 0; i < 100; i++)
s += slapDash.getWord("Gargle", rnd) + " ";
Debug.Log(s);
hrinenah hraklim hlameh trakloebuff hlakkli nem krimnah tratri sritri hlibble slonen sliexor hrettleitox hlisri mehhla hlemeh ebraexor srenonop emimnah slasrexor srimin trimnah brimeh min abri kloitox meotox sratra krasla krisra klohhriotox hlikkro mebble nanitox slaniexor nan nebuff bren kromuh anasla menameh nimaebuff omnah tribuff tlebbro oma imaebuff nonah blitlo brineitox hramuh srakkle imamuh brimeh hron nana ikklotle hrameh blanexor nanim slinmeh onakro kranaxor nihhra hline hlon nim hlaxor obbra inah amenop onomi ini kram ihliebuff trana ema klobbro kratri hlohlaotox osslina nobri blikre trin hromaotox abre sroblexor krinop osri brissro brem blomeh onoibuff sratrom klimi klemuh obble ama trisli kromem
Of course you can always just use the editor to create the language and test real-time: