Poetry/Haiku

Started by Kalesin, October 31, 2013, 11:02:56 AM

Previous topic - Next topic

Kalesin

I've always found fascinating small details that give "life" to game, for example, in Dwarf Fortress, i spend hours reading the engravings that make the dwarves on the walls.

It's a minor suggestion, but I hope to share with you and know your opinion.

I love the Haikus, which are like little poems, and we could have settlers colonists with academic or linguistic skills, to do this kind of poetry. I think it would give detail and depth to the game.

Then I add a little script that generates Rimworld Haikus procedurally (you have to improve even, I use javascript to try), you only have to copy and paste it into a txt file (notepad) and then change the extension. txt to .html, and try.

<SCRIPT LANGUAGE="Javascript">

adjective1 = new Array( "sad", "young", "happy", "coward", "brave", "little");
verb1 = new Array("runs", "sleeps", "seeks", "eats", "fight", "dream");
adverb2 = new Array("quickly", "fully", "dimly", "hotly", "quite", "loudly");
noun1 = new Array("colonist", "pirate", "slave", "raider", "muffalo", "boomrat" );
preposition2 = new Array( "over", "under", "astride", "towards", "along", "backwards");
article1 = new Array("the", "this", "that", "our", "a", "some");
adjective2 = new Array("cold", "rough", "hot", "hidden", "red", "dark");
noun2 = new Array("desert", "mountain", "cave", "hill", "plain", "ruins");
verb2 = new Array( "speaking", "hunting", "jumping", "running", "working", "watching");
adverb3 = new Array("quietly", "gracefully", "knowingly", "peacefully", "intently", "silently");

// generate a list of random #s
arNums = new Array();
for(i=0;i<10;i++) {
  arNums[i] = parseInt(Math.random() * adjective1.length);
}

haiku = adjective1[arNums[0]] + " ";
haiku += noun1[arNums[1]] + " ";
haiku += adverb2[arNums[2]] + " ";
haiku += verb1[arNums[3]] + " ";

haiku2 = preposition2[arNums[4]] + " ";
haiku2 += article1[arNums[5]] + " ";
haiku2 += adjective2[arNums[6]] + " ";
haiku2 += noun2[arNums[7]] + " ";

haiku3 = verb2[arNums[8]] + " ";
haiku3 += adverb3[arNums[9]] + " ";

document.write(haiku);
document.write("<br>");
document.write (haiku2);
document.write("<br>");
document.write (haiku3);
</script>

<FORM METHOD=POST>
<INPUT TYPE=button VALUE="Make" onclick="history.go(0);">
<FORM> <FORM METHOD=POST>


A Sample:

brave boomrat hotly seeks
astride this rough ruins
jumping peacefully

Tynan

This is an amazing idea. I love it!
Tynan Sylvester - @TynanSylvester - Tynan's Blog

Kalesin

Quote from: Tynan on October 31, 2013, 12:27:46 PM
This is an amazing idea. I love it!

Thanks, I can try to improve the algorithm to do more complex haikus, see if I spend a little more time.

Tynan

Well, don't worry about the algorithm. It's just the general idea that's awesome.
Tynan Sylvester - @TynanSylvester - Tynan's Blog

Kalesin

Quote from: Tynan on October 31, 2013, 04:17:56 PM
Well, don't worry about the algorithm. It's just the general idea that's awesome.

Is for a personal project. My idea was to see if I could create an algorithm that will create different styles of haikus.

Tynan

Tynan Sylvester - @TynanSylvester - Tynan's Blog