Welcome to part three of the "Roger the Pirate" series, detailing the Strand Games design and build process. We'll be designing the game, along with the source code and illustrations.

If you haven't already read:


Design

Our hero, Roger Bland, has gone to the Smuggler's Cove Tavern to get recruited as a pirate. Hopefully.

Roger asks Cahira, the barmaid, to point the pirate regulars to him. She tells him; these guys are all losers and he's wasting his time and money. But when he insists, she shrugs and says, Pirate Pete is here right now, over there sat in the corner drinking his beer.

Pirate Pete


Pirate Pete

Roger approaches Pirate Pete.

Pirate Pete

Pete, initially is not interested to talk to Roger, until Roger buys him a beer. After which Pete starts a conversation and begins to tell Roger about his amazing pirate adventures. Pete tells Roger tall, exaggerated stories of sea monsters, desert islands, cannibals and all sorts of sea-faring, salty tales.

Roger must buy Pete another beer to hear each story. It must be the best ale, and he doesn't do halves.

Story 1

Pete swigs his beer, and looks pensive.

"I was lost in the middle of the ocean, on a small raft. I'd lost my ship in a storm, and woke up to find myself floating on a piece of the destroyed hull. All around me I could see nothing but water for miles. After a few hours I spotted a giant sea monster swimming toward me. I knew that I was going to die, but I wasn't ready to give up just yet. I got lucky dodging the tentacles and the rocks it spat at me. Suddenly an idea came to my head, and I remembered my trusty penknife!

I thrust the penknife into the monster's throat, it made a horrible gurgling sound and sunk beneath the waves. After that, I collapsed, totally exhausted. Miraculously, I woke up on land and was rescued."

Story 2

Pete takes a long draft of beer and looks serious.

"I was shipwrecked on a desert island, surrounded by nothing but sand and palm trees. I got up and looked around, trying to find some sign of life. But there was nobody, no animals, no birds in the sky; absolutely nothing. I was completely alone on this island.

'What should I do?' I asked myself aloud. 'How will I survive here?'

As I walked along in my bare feet, I noticed something strange: there were footprints in the sand leading away from where I landed. At first they looked like normal footprints, but then they changed shape! They were no longer human at all! And they were coming towards me.

And then, suddenly, something moved in the distance! It was coming towards me: a giant monster! The creature's mouth opened wide as it approached, revealing rows upon rows of sharp teeth that glinted in the sun. It had three eyes! And its body was covered in scales like snake's skin! Its claws were long and sharp enough to tear through wood and metal like paper! The monster roared at me as it approached, and for a moment I thought about running away from it, but instead I grabbed my trusty penknife and stood my ground.

The monster lunged at me, but I dodged. I pivoted round and deftly thrust the penknife into the monster's neck. It roared with pain before slowly sinking into the mud. I collapsed exhausted. When I awoke, another boat had landed and I found myself rescued."

Story 3

Pete sups his draft and looks concerned.

"I thought I would never make it off that island.

I had been lost for days, with nothing to eat but my own tears and a tiny bit of water from my canteen. Then, whoosh! A net fell from the sky and caught me.

'Ahoy there!' said a voice from above. The next thing I knew, I was being carried off by a tribe of cannibals to be sacrificed for their god.

'You're going to feed us with your body!' said one of them, smiling broadly at me. 'We will have such fun!'

At first I thought they were joking, but then I realised their smiles were too wide and their teeth too sharp for them to be kidding around. And so it was that I found myself tied up on an altar under the blazing sun, waiting for my executioners to come back with their knives and spears so they could do what they do best: devour human flesh.

They forced me to watch as they cooked a man alive over an open fire. Their shaman standing over it, chanting in some unknown tongue.

But then something incredible happened. My trusty penknife fell out of my pocket and landed on the ground right in front of me! It was like divine intervention. I knew exactly what I had to do! With one swift motion, I cut through the ropes holding me, jumped up and thrust the knife into the shaman's heart, felling him instantly. The other tribesman dared not attack. Seizing my chance, I turned and fled into the jungle, running like crazy. As luck would have it, I ran straight into a group of sailors who had just landed on the other side of the island. I was finally rescued."

Story 4

Pete takes a huge gulp of ale and looks worried.

"We'd been at sea for months, sailing the seven seas in search of treasure. We'd been through storms so fierce that we'd lost sight of land and each other, and we'd fought off pirates more times than I could count - and still we had nothing to show for it.

We had run out of water and supplies, and I was sure we were going to die when suddenly a beautiful mermaid appeared before us. She told us that if we followed her, she would help us find land if, in return, we were to give her the captain's hat.

We followed her through the waves until we reached an incredible island full of lush jungle plants and bright flowers. It was paradise! We set up camp on this island and lived there for weeks, exploring the rich landscape and swimming in the clear blue waters.

One day, as my friends and I swam just off the island, we came across an old shipwreck with a long lost treasure chest inside it. Inside the chest were gold coins, jewels, and other valuable items! We took all these things from the treasure chest and made our way back to our campsite on shore.

That evening we all celebrated, sang pirate songs and drank the last of the grog. We were elated - but then things went south. The crew started fighting over who got what from the chest. One pirate wanted all the gold; another wanted all the jewels; another wanted all the silverware. And me? I just wanted to get back home with my family.

The next day when I woke up from sleeping under the palm trees. All of the treasure had been stolen! Other pirates had taken everything and even abducted my shipmates! Now I was stuck here with nothing but a bunch of stolen trinkets that wasn't even worth anything.

It was a sad story and It took me many months to get off the island and back to civilisation. But I had learned my lesson."

Story 5

Pete necks his ale and looks solemn.

"The crew of Black Hog had been sailing for months, and we were tired.

The ship was an old one, but it was sturdy and quick. It had made us good with its speed and strength, but now it was showing signs of age: the sails were tattered, and the rudder looked like it wouldn't hold up much longer.

But that didn't matter - we were going home. We hadn't seen land in so long that we'd started to forget what it looked like. But now we could see a line on the horizon, and our hearts leapt with joy as we sailed on towards it.

As we came closer to land, we could also see something else: a shipwreck! It looked as if someone had tried to moor here, but failed miserably: there was no mast left standing on any part of the ship, which lay broken in pieces on the shoreline. The only thing left intact was a small wooden chest with some initials carved into it: D.S., 1762.

We were all excited at first, but then our excitement turned to fear as we realised what kind of danger we could be in if we were discovered by enemy pirates.

The crew excitedly gathered around the relic from another time. Some wanted to open it immediately while others thought it best to wait until they were back on board ship where they could keep watch over it more easily.

The captain ordered us to set up camp on the island where we found the wreck, and so we did. After a few hours of rest, we sent out scouts to search for any other ships that might be nearby—and sure enough, one appeared not far off! The captain told us not to worry about it, but I knew something was going on…

When morning came, I went up on deck to see what was happening—and saw my fears confirmed: there were two ships now! One was ours; one was enemy pirates. And they had already started boarding our ship!

Pirates attacked us! They took everything they could get their hands on and left with it before anyone could stop them. They killed everyone except me - I only escaped with my penknife.

I'll never forget that day."

Story 6

Pete sips his beer and looks grim.

"The sun was setting, and I was sailing home after months at sea. It had been a long time since I'd seen my family—and with each passing day, the thought of them made me feel more and more homesick.

Suddenly, a group of pirates appeared on the horizon. With no weapons on board, I knew that if they attacked us, there would be nothing we could do to defend ourselves.

I watched as they drew closer—and then they fired their cannons at our ship! The force of the blast blew me overboard into the ocean below. As I sank beneath the waves, I could hear screams coming from up above: it seemed that everyone else on board had been killed by the pirates' attack.

I felt myself sinking deeper and deeper into the water… until suddenly, something grabbed me by the arm! My saviour was a mermaid—the most beautiful creature I had ever seen in all my life. She carried me away from danger and brought me back to shore safely where she left me with only one thing: my trusty old penknife.

It was a miracle I got away alive. To this day, I still don't know how I survived."

Story 7

Pete guzzles his ale and looks earnest.

"I was sailing home after months at sea, when suddenly the lookout shouted “Pirates!” Everyone on board ran to the deck, and we all braced ourselves for battle.

But the pirates were not what we expected. They did not look like fierce warriors—they were small, thin creatures with long noses and pointed ears. They wore clothes made of leaves and bark, and they carried small wooden clubs.

The pirates came straight for us, leaping onto our ship with agility and speed. One of them grabbed me by my collar and threw me overboard into the water below. I watched as my crew mates were beaten senseless by the strange men who had appeared so suddenly out of nowhere.

I swam back to shore and began walking inland in hopes of finding help. After some time passed by, during which I saw no signs of human life anywhere around me, I came across a small village where people lived in huts made from mud bricks and straw roofs.

Whether they were friends or foes, I didn't wait to find out. I ran!

As luck would have it, I ran into a group of my shipmates who'd been separated from the main battle. We managed to fashion a small raft and sail away. After days at sea, and out of water and food we drifted unconscious to safe land. God knows how!"


Pirate Pete, Conclusion

After several beers (when the stories run out), Pete falls asleep. Cahira comes along, complaining about "drunken bums". She hoists Pete off the chair, drags him over to the door and throws him into the street.

She tells Roger that he's been had; Pirate Pete is a fraud. He's never been a pirate or even known any. He's told the same worn out stories to many a gullible fellow in exchange for free beer.

Roger is back to square one. Will Roger ever find a real pirate?


Roger's House

We'll also embellish Roger's history and background by expanding "Roger's House" and putting the information in the descriptions there.

Rogers Living Room

Split into three parts so as to tell a story, bit by bit:

XHOME1

Well, it's not actually his house, technically it still belongs to his gran. Roger has lived with his granny since his parents passed away. Sadly, his father succumbed after a long battle with Alzheimer's and, shortly after that, his mother was tragically taken by Covid.

Roger wound up becoming his granny's carer. This quickly became an overburden and Roger found it an effort to cope. Consequently he had her packed off to a care home. Well, at least she's getting professional care, he tells himself.

XHOME2

Now Roger has the place to himself. He hasn't changed it much as he doesn't like DIY. Instead, he prefers to call in the experts when things need to be done. Nevertheless, Roger has to watch the pennies, so this is only when absolutely necessary.

There's no one anymore to stop him staying up decadently 'til midnight, watching movie reruns of his idol, John Wayne. Just how many westerns did he make? Even Roger's lost count.

Roger paces around the room, swaggering, doing his famous John Wayne impersonation. "Get off your horse and stick your hands up you bum", he drawls, pointing his gun finger at the TV set. Must remember to say that line correctly, he reminds himself.

XHOME3

In some ways, it's a relief his granny's not around - the Senile old bat. She had to have everything just so. She'd go barmy if he forgot to close the porch door or if he moved a chair a foot over, or something else totally trivial.

Roger wonders who'll look after him in his old age. For a few moments, he chews over this awkward problem. Well, if he becomes a pirate there are two possible outcomes. Either he'll be killed in a nasty way or he will become obscenely rich.

Discounting the former, Roger dwells on what he will do with his immense pirate wealth. For a start, he won't be lifting a finger for anything. He definitely won't be working for that evil git, his boss. He'll be somewhere hot, reclining on his chaise longue while nubile handmaidens feed him grapes and attending his every whim. Like the Romans, they had it sussed. Roger likes that idea!


The Code

Expand Roger's House in map.str;

HOME@ INSIDE
* name
Roger's house
* name
home
* name
Roger's house
* x it
XHOME
*=+ go to TAVERN
GOTAVERN

XHOME
Roger's back at his [house]. XHOMEA
\nLooking around the room Roger sees his usual [junk].

XHOMEA<
* XHOME1
* XHOME2
* XHOME3
*

XHOME1
Well, it's not actually _his_ house, technically it still belongs to his gran.
Roger has lived with his granny since his parents passed away. Sadly, his father succumbed after a long battle with Alzheimer's and, shortly after that, his mother was tragically taken by Covid.

Roger wound up becoming his granny's carer. This quickly became an overburden and Roger found it an effort to cope. Consequently he had her packed off to a care home. Well, at least she's getting professional care, he tells himself.

XHOME2
Now Roger has the place to himself. He hasn't changed it much as he doesn't like \DIY. Instead, he prefers to call in the _experts_ when things need to be done. Nevertheless, Roger has to watch the pennies, so this is only when _absolutely_ necessary.

There's no one anymore to stop him staying up decadently 'til midnight, watching movie reruns of his idol, John Wayne. Just how many westerns did he make? Even Roger's lost count. 

Roger paces around the room, swaggering, doing his famous John Wayne impersonation. "Get off your horse and stick your hands up you bum", he drawls, pointing his gun finger at the \TV set. Must remember to say that line correctly, he reminds himself.

XHOME3
In some ways, it's a relief his granny's not around - the Senile old bat. She had to have everything _just so_. She'd go barmy if he forgot to close the porch door or if he moved a chair a foot over, or something else totally trivial. 

Roger wonders who'll look after him in his old age. For a few moments, he chews over this awkward problem. Well, if he becomes a pirate there are two possible outcomes. Either he'll be killed in a nasty way or he will become obscenely rich. 

Discounting the former, Roger dwells on what he will do with his immense pirate wealth. For a start, he won't be lifting a finger for anything. He definitely won't be working for that evil git, his boss. He'll be somewhere hot, reclining on his chaise longue while nubile handmaidens feed him grapes and attending his every whim. Like the Romans, they had it sussed. Roger likes that idea!

GOHOME
Roger goes home.
> put roger in HOME
XHERE

JUNK@ THING
> put it in HOME
* name
junk
* x it
Roger must tidy up!

Now, to involve our new Pirate Pete character, we must arrange that you can buy him a beer. So in cahira.str we expand her dialogue, adding ORDERPBEER and a question of "Where can I find any of the regulars?" The latter also triggering PETESTART which we will define in our new definition pete.str.

ORDERPBEER<
* I'd like a beer for Pirate Pete
* Another beer for Pirate Pete

CAHTALK1? CAHBG1 CAHASKABOUT
*+?(PETESTART && !PETEHASBEER) ORDERPBEER
PETEBEER
*?!ROGLEMON I'd like a tankard of the strongest ale you have
CAHBEER
*?!ROGLEMON  What ale do you have that's not so strong?
CAHBEER3
*+?!ROGLEMONOUT Can I get a lemonade?
ROGLEMON
*?CAHREGULARS Where can I find any of the regulars?
CAHFINDREG
*+! Done
MAIN

   CAHTALK1

CAHFINDREG
"Well, _Pirate Pete_ is over there!"
Roger looks over, and sure enough, there's a man sitting in the corner sipping his beer.
PETESTART MAIN

PETEBEER
PETEBEER1 PETEBEER2

PETEBEER1<
* "Well, he'll want the good stuff. Let me get some from out the back."
* "Sure, let me get another."

PETEBEER2$
Cahira fetches the beer and takes it over to where Pete is sitting. Pete PB1 and looks PB2.
*?!PETEINIT PETEINIT
* PETETHANK MAIN

PB1
* takes a sip
* swigs the beer
* tastes the beer

PB2
* happy
* pleased
* impressed

Finally we need a whole new definition for Pirate Pete and his stories, which we separate into pete.str.

PETESTART
> put PETE in TAVERN

XTAVERNPETE
*?PETESTART Pirate Pete is sat in the corner PETEDO.

// the character
PETEASKABOUT@
*+ ask PETE about PIRATES
ASKPETEPIRATES
*- ask PETE about CAHIRA
"I'd like to have her on my boat."

PETE@ MAN ?PETEINIT PETEASKABOUT
* name
Pirate Pete
* name
pirate
* x it
XPETE
*=+ talk to him
PETETALK

XPETE
A salty sea dog, if there ever was one. He just sits there PETEDO.

PETEDO
* quietly drinking
* staring back at you
* sipping his beer

PETEHASBEER

PETEINIT
PETEFBLANK
\
Pete looks up at you, "Har'rr! I'm known as Pirate Pete, who are you?" PETEWHO

PETETHANK
Pete raises his tankard, "PTH2!" PETEHASBEER

PTH2
* thanks pal
* cheers
* much obliged

PETEWHO?
* I am Roger

PETEBG1?
*- Where are you from originally?
"I'm from the south Kerovnian archipelago."

PETETALK=
*?PETEINIT
PETEFBLANK
PETETALK1
*
PETENO

PETENO&
* "Go away!"
* "Sod off!"
* "I don't want to talk to you."
* "I don't know you."

PIRATES@ THING
* name
pirates

ASKPETEPIRATES=
*?PETEHASBEER PETESTORY
*
He turns to Roger, "Unfortunately, my draft is dry." MAIN

PETETALK1? PETEBG1 PETEASKABOUT
*+! Done
MAIN

   PETETALK1

PETESTORY
PSTORY0
\
PASTORY MAIN

PASTORY<
* PSTORIES
* PSTORIES
* PSTORIES
* PSLEEP

PSTORIES&
* PSTORY1
* PSTORY2
* PSTORY3
* PSTORY4
* PSTORY5
* PSTORY6
* PSTORY7

  \nPete drains the last of his beer. PETEHASBEER#

PSLEEP
"I was adrift, lost in the ocean. Miles from land..." Suddenly, Pete slumps over and falls asleep!
\
After the strong beers, Pete has fallen asleep. Cahira comes over, complaining about "drunken bums". She hoists Pete off the chair, drags him over to the door and throws him into the street.
\
"You've been been **had**, _Pirate Pete_ is a fraud. He's never been a pirate or even known any. He's told the same worn out stories to many a gullible fellow in exchange for free beer."
> put PETE in HELL

PSTORY0<
* Pete swigs his beer, and looks pensive.
* Pete takes a long draft of beer and looks serious.
* Pete sups his draft and looks concerned.
* Pete takes a huge gulp of ale and looks worried.
* Pete necks his ale and looks solemn.
* Pete sips his beer and looks grim.
* Pete guzzles his ale and looks earnest.

Play it

Want to try the game so far? Download the ZIP for Windows. unpack it and run goweb.bat

Or, play the web version here.

Next Episode

Next time, Roger will encounter a real pirate; the infamous "Captain Morgan".

Captain Morgan makes an appearance in the tavern. She's looking for recruits. Everyone panics and madly rushes out, without even finishing their drinks. The place is empty, only Roger and Cahira remain!

Find out what happens to Roger next time.

Captain Morgan

Next Post Previous Post