History of Words

Now for a change from procedural generation, a bit of linguistics!

I’ve aways had a few low-key linguistics projects going on, generally related to language learning or the history of language; this particular project stems from an attempt to make a script to convert one language to another using only language change rules (e.g. French “cavalier” -> Spanish “caballero“; so how about making “fake spanish” by taking French replacing “v” with “b” and “-ier” with “-ero“); but that project ended up being too complicated and the outputs it produced weren’t much fun. For example, the intro of Don Quixote:

CUENTA Cide Hamete Benengeli, en la segunda parte desta historia y tercera salida de don Quijote, que el cura y el barbero se estuvieron casi un mes sin verle, por no renovarle y traerle a la memoria las cosas pasadas; pero no por esto dejaron de visitar a su sobrina y a su ama, encargándolas tuviesen cuenta con regalarle, dándole a comer cosas confortativas y apropiadas para el corazón y el cerebro, de donde procedía, según buen discurso, toda su mala ventura. …

In “Frenchified” Spanish, this became:

CONTE Cide Famete Benengeli, en le ségonde parte deste hèsteure xiste terzére salide de don Quixote, qe el cure xiste el barbére se estuveron chasi un mes sin verle, peur ne rénovarle xiste trairle e le memeure las cosas pasadas; pére ne peur este delleron de visiter e su sobrine xiste e su ame, enchargandolas tuvessen conte con régalarle, dandole e comér cosas confortativas xiste appropiadas pare el ceurason xiste el cérébre, de done procédie, ségun bon discurse, tode su male venture. …

… which, apart from sounding a bit more like old French, is not very interesting (I could have made something better out of it, but it would have required rethinking my approach on a few aspects, and I had spent enough time on it so switched to another project).

But this summer I dug up this old project and used the same data to build a couple nice visualizations published as the History of Words; a visual exploration of the linguistic data I used on the previous project.

It has two main visualizations:

1) Trees of Indo-European Cognates:

Screen Shot 2017-09-24 at 23.11.56

2) A History of English, in the form of a Sankey diagram:

Screen Shot 2017-09-24 at 23.05.12

(click on it for the full, interactive, version)

It was a fun project, and I have ideas on ways to improve it, but I have other itches to scratch so I’d rather publish it as it is and come back in a few week months to add improvements (for example: highlight words with an unusual history; illustrate sound laws …).

Advertisements
History of Words

Metacastle: a procedural castle

Last year I participated in a procedural castle contest on reddit’s r/proceduralgeneration community. I ended up with castles like this:

O4QIwJT

or this:

P7I2alO.png

The tiles are all from Kenney’s Roguelike RPG Pack – this was the first time I used Kenney’s assets and I recommend them (I had to edit some a bit to do exactly what I wanted – especially to add crenelation going in all the directions I wanted).

I  added a bit more architecture details in the writeup on reddit.

These kind of small projects with a hard deadline are easier to work on than unbounded ones like infiniworld, and are also better places to experiment with algorithms and architecture.

The algorithm could be understood as consisting of three functions:

  •  one taking a random seed and generating an abstract layout description (“a big central keep, with a courtyard decorated with flowers, and a wall with seven towers around it”)
  • one taking a random seed and generating a “theme” description (e.g. brick walls with pointy windows) – here the goal is to have a somewhat consistent style
  • one taking those two abstract descriptions, and generating the set of tiles to actually render – this one is (hardly) not random, and the goal is just to “fill in the details” so the castle looks. This part also requires the most work.

In retrospect, the castles do all kinda look the same – if I had had more time to spend on the layout generation I could have made more varied castles for cheap. But then the project might have dragged on forever, so I’m not unhappy with the current result.

Live version here, github repo here.

Metacastle: a procedural castle

Introducing InfiniWorld

In which I talk of old projects, and introduce a new one – InfiniWorld, an infinitely scrollable procedural world.

Once upon a time I was very interested in the idea of procedural worlds – writing a program that generates mountains, coasts, cities, ecosystems, kingdoms, histories, plot hooks, etc.

So I played around quite a bit with Python, and built things I liked.

But I never actually released any of this, mostly because a lot of my graphics came from commercial products like RPG Maker, which I didn’t really have the rights to redistribute, but also because though Python has many qualities, “simple to distribute” isn’t one of them. Running one of these prototypes requires installing a bunch of libraries and trusting my code, or have me painstakingly generate an executable that would only work on a single platform. So they ended up collecting virtual dust on my disk drive while I got busy with life.

So I set those aside, got busy with life, and worked on other fun stuff – and in the process, I got much more comfortable with JavaScript. So eventually I used it to make new procedural worlds.

My goal wasn’t to make a game, but just to play with fun algorithms and make an interesting and endless world, focusing on meaningful descriptions and relationships rather than graphics.

And now you can test an early, very rough version: InfiniWorld.

Screen Shot 2016-01-10 at 23.05.42

It’s far from being nearly as interesting as I want it to be, but it should give an idea of what I’m aiming for. Some features:

  • You can click on cities to get a description. Those include some content from the excellent Abulafia website; My plan is to replace those with more meaningful descriptions.
  • You can drag the map around nearly infinitely (you will run into problems over 1016 tiles in one direction), the content at a given place stays the same (until I publish a new version)
  • The biomes distribution is inspired by the Whittaker Diagram.
  • You can find the sources on GitHub (this time I didn’t rely on a bunch of art I didn’t own).

There’s the old saying that “if you’re not embarrassed by your first version, then you didn’t release early enough”. I’m glad to say I pass that test!

That’s it for now! I’ll talk about crunchy details, as well as other projects, in later posts.

Introducing InfiniWorld