Quote:I'm not sure why'd you'd need 500 lines of code for it, though.Well, it's more than 200 lines of CSS. And it takes a lot of code to even initialize a good-looking div within Javascript (around 10 lines per div, not counting the CSS formatting). JQuery does help a little, but it's still nothing like working in, let's say, UIKit in Objective-C, where all you need to do to initialize a label is to pass a few arguments to the constructor.
Perhaps the quirkiest problem with JavaScript is that it basically interprets the escape sequences within strings (like '\n' and '\t') as ordinary spaces, and that you need to insert a new element every time you want to make a newline or a tab.
Quote:For example, will your "real" phonemes come from a database?I have already made an algorithm, and it produces fairly convincing results in the text-mode version. It's actually relatively simple: just generate random sound laws, such as "Turn every 't' in the beginning of a word to a 'z'." or "Turn every 'b' between two vowels into a 'v'." or "Turn every 't' after a nasal at the end of a word to a 'd'." or "Delete every 't' at the end of a word." or "If there are three consonants in a row, insert an 'e' after the first one." and then apply them to all the randomly generated roots (strings). Not all sound laws are equally likely ('b' is much more likely to turn into a 'v' than into an 's'), but that's easily solvable by a 2-dimensional array of the phonemes each phoneme is likely to turn into.
The results are slightly less convincing for longer words, because the algorithm assumes that sound laws are always identical for stressed and unstressed syllables (which they aren't), but I've done that on purpose. It ensures that Part #2 of the game is solvable: just generate some consonant-heavy three-syllable root for the example word in each language, and the player can deduce many of the sound changes that occurred in that language from that word alone.
In short, it's all just basic string manipulation.
Quote:My idea is to use this in a div background, and just use css to round the corner for you.But the problem is: there is no obvious way to make a div shaped like a quarter of an ellipse using CSS. Yes, you can set border-bottom-left-radius in pixels. The width of the div would have to be defined in percentages (as is everything else on my page), so we already have a problem. And even if I were to use some JQuery style injection, there is another problem: you can only specify one radius (for a circle), and not two (for an ellipse). Is it a problem to crop those images into a quarter of a circle in Photoshop and save them as a transparent PNG?