The code would be really simple if you ask me. The hardest part, for me, would be the art work and making it all look nice.
Never played King Of Dragon Pass (not, that I recall, even heard of it... which probably says something about me).
But. Back in the day (decades ago) I put an entire Fighting Fantasy book onto a microcomputer (without its pictures). Coding for that was fairly simple, and most of the hard work was the data entry.
Each story text already had a number assigned to it, and (unless a win/lose condition page) had one or more numbers that you could then follow onwards to (explicitly or otherwise). So I stored each 'page' number, the text it gives and the choices (if any),
plus details about any special conditions[1], and I suppose I could have stored details of how to draw pictures. The basic code (in fact, it was BASIC code!) just repeatedly assessed the 'current page', output what it needed to, dealt with any calculations that were necessary[2]. Changing it to reflect a second FF book's "plotline" would have been fairly easy (just tedious) in getting the information input and
perhaps an enhancement of the basic engine to add something that the second book needed that I hadn't needed for the first[3].
Which is basically the approach that I suspect a lot of branching-plot games-engines follow, like SCUMM/ScummVM.
These days, I'd probably even just re-do it in HTML, with a little bit of scripting (either server-side or client-side, according to taste) where necessary, but this was a pre-web era I was talking about. (Also prior to my being on the Internet, and didn't have too many people with whom I could share the save-tapes of my creations, so it was for my fun and enjoyment alone (mostly, in the creating, rather than the playing), and no real chance that I'd be sued for copyright over the content I'd 'stolen', from the book that I owned but was still not allowed to "duplicate electronically or physically", or whatever the phrase was. The question arises whether I could have developed my
own adventure using the FF-inspired engine and publish
that. I think I could have done, but as I never did it's a moot issue.)
Anyway, if any of that makes sense, maybe (@ductape) try doing that. I leave branching-plotline-progression organisation up to you, as well as what features you need to implement. Importing (or drawing from scratch, having some form of descriptor information) images and displaying them is something you can do or not. It barely gets more complicated to have a sprite-based worldview of one kind or another, at all times. All the rest (as well as most of what I've already mentioned) is just data.
[1] Only to "buy the cloak" if one had enough credits in the appropriate part of the stat-tracking data-holder. Only able to "shoot the robot from afar" if one possessed the suitable weapon". Initiate combat if there's something to initiate combat with. Sometimes there were pages that said something like "if you have previously read a spellbook, go to the page that is the number in its title, plus 50", so as to trivially hide the solution (especially if there had been
two spellbooks, one for an advantage, one for a disadvantage), but that sort of thing got implemented automatically as well.
[2] e.g. combat, in a further sub-loop that let you follow the battle and choose to 'use' any special equipment that you might have...
[3] Magic points, for example, if the first one was all about giant robots instead, but I'd leave the possibility of "Vehicle stats", or even eventually make it open-ended so that the data-input could also define arbitrary stats that needed remembering, too...
[/quote]
I actually didnt write that which are quoting there.
Also, KoDP is not a branching storyline game, but thanks for taking the time