Browse Month

July 2019

Algorithmic Modelling – Touhou Project 11 (Subterranean Animism)

The Touhou Project is a series of “bullet hell” shoot-em-up games. In these games, the player controls a character within a 2D plane and needs to dodge large quantities of bullets. These games tend to be fairly difficult, testing players’ reflexes and in some cases logic as well (for example, many patterns are aimed at or relative to the player’s position; misdirecting such patterns can be useful).

I wouldn’t say my reflexes are very good. Nonetheless, good progress can be made using careful resource management; players are given tools in the form of lives (extra chances after getting hit) and bombs (single-use abilities that clear the screen and deal damage to enemies). The eleventh installment of the series is called Subterranean Animism (SA), and I’m choosing to look at it for this post because it is widely regarded as the hardest game in the series to clear on normal difficulty. For most of these games (on normal), I can just sit down, play the game, dodge bullets and win. There were two exceptions – the fifteenth entry Legacy of Lunatic Kingdom (but even then that only took about five attempts), and SA. SA required a nontrivial amount of planning – I had to learn some of the specific patterns, and also chose a shot type I wouldn’t normally pick.

I generally play Touhou games on normal with an aim to complete the game on a single credit; this is called a “1 Credit Clear” or 1CC. I’m generally somewhere in between difficulties; I’m fairly comfortable with Normal in most cases, but Hard is hard (the game also has an even harder Lunatic mode). I’ve successfully completed 1CCs of most of the games in the series on Normal, and a few of the easier ones (7, 8, 10) on Hard. SA was the toughest game in the series for me to 1CC; it is also the last one I did, at least from installments 6 through 16.

Resource Management

Touhou games usually start the player with two spare lives; this is true in SA as well. However, the bomb mechanic is different from other games, which give the character a fixed number of bombs per life. In SA, players sacrifice some of their shot power when using a bomb. A character’s shot power usually ranges from 0.00 to 4.00; this is increased by collecting powerups when fighting stages or bosses. Firing off a bomb costs 1.00 shot power (and cannot be done if one is below 1.00). This can be frustrating, as some patterns become more than proportionally harder if the player’s shot power is low. When a character is hit, she (the games feature an all-female cast) will drop powerup items such that shot power will be reset to at least 2.25 (higher if shot power was at least 3.00). There is an exception – if it is the character’s last life, a full powerup item will drop that sets shot power to maximum.

The game also has mechanics for earning additional lives. In SA, boss enemies have a staged health-bar with multiple patterns; if the player defeats a pattern within the time limit and is not hit, a life fragment will drop; five life fragments result in an extra life. Bombs are allowed.

A Touhou game is divided into six stages; typically stages 1 through 3 are mostly a non-event for me. That said, for SA, the boss of Stage 3 has a few fairly nasty attacks. Most of my aforementioned “blind” or casual 1CCs involve racking up large stocks of lives and bombs on these stages, and then utilising these aggressively in the later stages. We can see this on SA, as well as on what is often regarded as one of the easier entries in the series, Imperishable Night (IN); the first death on SA is at the end of stage 4 while that on IN is at the end of stage 5. That said, I’m actually already failing to dodge patterns as early as stage 3 or 4. It’s important to be willing to use bombs to deal with difficult patterns, as they are much easier to recover (by subsequently picking up powerup items) in SA. This becomes even more important in other games like IN, where bombs that are unused when a player is hit just go away.

Character Selection

Touhou games usually give the player a choice of multiple player characters, and sometimes for each character different weaponry. Typically, different characters have different movement speed and possibly some other advantages or disadvantages, like having a smaller hit-box or extra bombs. In terms of weaponry, players may select from different normal shots and bombs, which usually have balanced trade-offs. For example, one may pick a homing shot which does less damage but can hit enemies anywhere on the screen, or a shot that only shoots straight ahead but does more damage.

Earlier, I mentioned being able to sit down and just play the game; in most cases this involves the main character of the series, called Reimu, who usually (and in SA) has relatively slower movement and a small hit box. I also normally use her homing shots for a first playthrough, even though I usually prefer straight shots after I get more comfortable with the game. These don’t quite exist in SA.

Apart from slightly different shooting and movement mechanics, many Touhou games also feature a medium to late stage boss (often on Stage 4) which adapts her patterns to the player’s character selection. This is on full display in SA as well; the Stage 4 (out of 6) boss has a relatively easy warm-up battle that is static, before reading the player character’s mind and creating patterns from that (which differ depending on the character and shot type).

Most of the time, the different variants of patterns the boss uses are quite balanced. However, this isn’t the case in SA and thus influenced my selection. Although I find ReimuA (with straight shots) is best equipped to handle the Stage 5 and 6 bosses, the Stage 4 fight one has if one makes this choice is extremely difficult, I’d say possibly even harder than the later bosses. Pictured above is Double Black Death Butterfly; it isn’t apparent from the picture, but some of the butterfly bullets are rotating inwards (and so one needs to dodge bullets possibly coming from behind as well). I thus picked ReimuB (which has a weakly homing shot, a relatively easy Stage 4 fight and a special ability to gather powerups from anywhere on the screen) for my 1CC.

Learning the Patterns

Of course, even with careful resource management it’s unlikely that one can perform a 1CC if one’s dodging skills are too far below the bar. While some of the patterns are random and/or based mainly on reflexes, others have a certain trick to them that makes the pattern a lot easier once figured out. With experience, one can figure out common elements and ways to deal with them (for example, a stream of bullets fired at the character’s position; move slowly, but to change directions make a sudden quick movement to open up a gap in the stream) – this drives most of the “sight-read” clears.

In a sense, good resource management is less critical (consider that one can completely ignore the resource system if one can reliably dodge every single pattern in the game) if one can dodge the patterns. That said, it’s actually possible to clear one these games even if one is quite poor at dodging them, if one makes good use of the resources one has.

Learning German 1: Ich lerne jetzt Deutsch

When I was in middle school and high school, I struggled a lot with learning both English and Chinese. In the end, I performed reasonably well in the relevant summative assessments (I obtained a 6 in English A1 SL and 7 in Mandarin B SL for my IB certificate), but it was always a struggle. I don’t think I struggled particularly with understanding or writing as far as English was concerned; I had more difficulty with decoding literary devices and interpreting poems and related themes. I found learning Chinese challenging, perhaps because I didn’t speak or listen to it much at home, and also because all other lessons were conducted in English.

I’m not sure if this has had a negative effect on my preference for language learning, though to some extent I certainly associate this with stress and difficulty. Nonetheless, about two months ago I decided to start learning German a bit more seriously.

I downloaded the Lingvist app after a colleague recommended it to me. The app performs pretty aggressive vocabulary drills – it’s been useful for plugging basic gaps and discovering new words. According to the app, I’ve learned about 1100 words; the app allows you to learn at most an additional 20 per day, though that’s usually enough to keep my hands full. I’ve been using up this quota most days.

However, the app doesn’t cover the principles underlying grammar, and of course the ability to train listening, speaking or writing is somewhat limited. I thus took an opportunity at work to start more formal lessons, which should help me get better at these skills. The teacher, Katja, has been great – I do understand a fair bit more now, and (hopefully!) sound better and clearer when I speak. I’ve found the lessons to go at a pretty decent pace; they can be demanding, but I like that.

Why German specifically? Firstly, it is a practical choice. German is relatively widely spoken especially considering the countries I might consider moving to, or at least plan on visiting for holidays in the future (which would include Germany and Switzerland).

Secondly, I’ve certainly picked up a few words from my time in Zurich, mainly “Ich spreche kein Deutsch” and how to navigate shops (imagine someone knowing that Rechnung means invoice or Insgesamt means total, but not knowing words like Vater – father – or Tschüss – goodbye), so I’m not exactly starting from zero in terms of vocabulary, even if my knowledge of the grammar and fundamentals may be lacking.

Finally, I find the way words are constructed or varied quite pleasing. I recently came across the word Nachfolger in Lingvist, which means “successor”; the parts mean “after” and “follower”. I’ve come across quite a number of words where the meaning makes sense considering the components, which is nice – Zeitpunkt (point in time) or Verantwortung (responsibility, but Antwort means answer – in a sense of being answerable for something) come to mind.

I anticipate that the grammar may be quite difficult to pick up – declension is considerably more prevalent in German than in English, where tricky cases are mainly in the pronouns, or Chinese. Gender for nouns that don’t obviously seem to have a biological or possibly identity gender is often arbitrary – for example, tables are male, flasks are female, and babies are neuter! In English, he and she are rarely used outside of these ‘clear’ cases (there are a few exceptions, e.g. ships or countries are sometimes feminine, though it generally still feels more natural to me to use ‘it’).

Grammatical cases seem to be another sticky point; articles and adjectives may be written differently depending on whether a noun is the subject or object.  Das ist ein alter Drucker means ‘that is an old printer’, but I’d write Ich habe einen alten Drucker for ‘I have an old printer’ (printers are masculine). However, if I was talking about a lamp (feminine), I would have to write Das ist eine alte Lampe.

Furthermore, sentence structure is different. English and Chinese generally follow subject-verb-object ordering in a sentence. However, German features V2 order, where the verb usually must come second, but other than that things are more relaxed. For example, Every Saturday I read a book is fine as a sentence in English; 每个星期六我读一本书 would work in Chinese. However, the straight translation Jeden Samstag ich lese ein Buch is not OK in German; the verb has to be in position two, so it would have to be Jeden Samstag lese ich ein Buch (or Ich lese ein Buch jeden Samstag, or Ein Buch lese ich jeden Samstag depending on what is intended to be emphasised).

My formal knowledge of grammatical structures within English is also fairly lacking, even though I think I am able to differentiate between grammatical and ungrammatical sentences in English. I had to refresh myself on what an infinitive was during the German course. German also has quite a few more constructs (e.g. accusative and dative cases) which will take some getting used to. Nonetheless, I’ve enjoyed learning so far, and plan on continuing to learn it, hopefully to at least a B1 level.