The present tense with "dum" clauses

In one reading lesson in my textbook, “dum” is used twice. It had been a long time since I had encountered the word, but the lesson itself reminded me of its usage.

The problem was the usage of the verb outside the clause, the one which defines the action taken at the same time as the “dum” clause. The first sentence speaks of a king:

“Tandem dum castra ut consuetudo erat perlustrat, lucem in tabernaculo vidit.”

I thought, ‘All right; while he “is walking” through the camp he “saw” a light.’ It makes enough sense that dum should be used with the present, from a linguistic standpoint. But then the second sentence showed up. It describes the actions of a soldier:

“Dum multa verba de periculis belli [etc.] scribit, subito regem videt.”

It’s the same verb, the same basic principle, so why the different tense? Does subito perhaps necessitate the present tense? Maybe because it’s a sudden action of noticing, whereas the action of seeing the light during an amble is almost frequentative or progressive? Why, here, does it say “While he is writing, suddenly he sees the king,” and then the next verb is “dixit,” right back to the perfect?

Ultimately my question is: What is the difference between these two usages, and why are they different?

Is it possible that it’s nothing more than a narrative custom, a habit of Latin to say things in the present tense when they took place in the past? I have to admit I haven’t seen much evidence for that, but storytelling in English often incorporates the present.

Sorry if I confuse the issue with my own speculations. Much obliged for any and all insight on the matter.

Dum (“while”) regularly takes the present indicative in past time, so it doesn’t matter whether the verb in the principal clause is past or present. (Vide A&G §556.) Perhaps this is designed to illustrate that. (Thanks, Vitance. I didn’t know that before, despite having read it. No doubt, I’ll forget it again.) Also, yes, the present tense with subitò does heighten the immediacy in the story-telling of a past event, as seems the case here.

Dum conjunctio verbo presentis temporis modo indicativo servire solet tempore praeterito. Itaque nihil refert an presentis anne praeteriti temporis sit clausulae principalis verbum. Forsit consultè hoc id ostendit. (Gratias tibi, Vitance. Id anteà ignoravi, quamquam id jam legeram. Non dubito quin eius iterùm obliviscar.) Ut dicis, usus praesentis temporis cum subitò adverbio in fabulâ rei praeteritae narrandâ sensum ut adsis contribuit, ut aptum hîc mihi videtur.

It’s possible. I checked my copy of A&G’s New Latin Grammar for any clues, and I see mostly the Perfect Tense used in the principal clause:

hoc dum narrat, forte audivi (§ 556)

Then a NOTE directs me to the section on the Historical Present:

affertur nuntius Syracusas; curritur ad praetorium; (etc.)

NOTE — This usage, common in all languages, comes from imagining past events as going on before our eyes.
(§ 469)

So the grammar seems pretty clear. I’m still a little shaky on why it switches back and forth—probably for the same reason I wrote this reply the way I did:

I checked

…a NOTE directs me…

I suppose it’s just one of those things one needs to acquire a feel for, like we do in our native language. Now that I think about it, the vidit occurred earlier in the story than videt.

Perhaps that the king saw a light had almost a pluperfect sense, whereas the fact that the soldier “sees” the king is supposed to direct our attention to this particular part. “Here,” the narrative is saying, “this is the story; the other stuff happened before, but this is what I really want you to picture.” It then says Tum rex dixit, using the perfect because it would feel awkward to use tum with the Present.

Honestly, it could just as easily have been the result of bad proofreading. But at least it’s gotten me thinking about the historical present.