On converting ADRIFT 4 games to ADRIFT 5

This forum is the place to learn about and discuss ADRIFT 5. Feel free to mention any bugs you find here, but please also add these to the Bugs & Enhancements list.

Please also refer to the ADRIFT 5 Wiki for more information.
Post Reply
User avatar
Denk
Posts: 587
Joined: Mon Feb 22, 2016 6:21 pm
Points: 251
Location: Hjørring, Denmark

On converting ADRIFT 4 games to ADRIFT 5

Post by Denk »

I just realized that a library must be selected before you can open an ADRIFT 4 taf-file in ADRIFT 5 Developer. In other words, the compatibility of your game depends on which library is selected when you open the ADRIFT 4 taf-file.

The conversion is already known to be bugged, but I found that when I applied saabie's Standard Library for conversion of the ADRIFT 4 game Curses, I couldn't even pick things up. This was not a problem when I applied the Release35-library. So the quality of the conversion depends very much on which Standard Library you use for the conversion.

I just wanted to mention this, in case there comes a new ADRIFT version at some point (at least some people are using the beta-version already). Thus it is recommeded to keep the Standard Library from the current version for the purpose of converting ADRIFT 4 games to ADRIFT 5. At least I remember playing David's Trick or Treat in ADRIFT 5 without serious problems, so sometimes the conversion goes well.

It also made me wonder if earlier versions of the Standard Library have even better compatibility with ADRIFT 4 games than Release 35 from 2016. Thus I searched the internet for earlier versions of ADRIFT 5. The oldest version I could find was Release 29. I tried to apply the Release29-library during the conversion of Curses but it seemed to have the same problem as Release35 (could not read a scroll).

If anyone have standard libraries older than Release29 or know where to find them, please let me know. Perhaps one of the older libraries is better for converting ADRIFT 4 games to ADRIFT 5. Perhaps not, but it would be good to know.
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
User avatar
Campbell
Site Admin
Posts: 4727
Joined: Sun Jun 23, 2002 12:05 pm
Points: 0
Location: Edinburgh, Scotland
Contact:

Re: On converting ADRIFT 4 games to ADRIFT 5

Post by Campbell »

Perhaps we should create a specific ADRIFT 4 upgrade library..?
ADRIFT Developer developer.
User avatar
Denk
Posts: 587
Joined: Mon Feb 22, 2016 6:21 pm
Points: 251
Location: Hjørring, Denmark

Re: On converting ADRIFT 4 games to ADRIFT 5

Post by Denk »

That would be great. I don't think we should pick a library for V4-conversion before the most obvious bugs in the V4-conversation have been solved. I would definitely want to contribute by comparing v4-games in v4-runner and v5-runner.

Unfortunately, it is probably only you who understands how the conversion works. So you would need to get involved. I understand how the standard library works in V5 but not how V4-games are converted.

To get started with one of the most obvious problems in the conversion from v4 to v5, "Cursed" is a good example since problems occur early on.

Below are transcripts of "Cursed" when they are run in V4 and V5. This problem occurs very early in the game so you can easily reproduce it if you want. The problem is that you can't READ SCROLL when playing with ADRIFT 5 Runner:
Cursed by Nick Rogers played with ADRIFT 4 Runner:
get axe
You take the axe.

chop wood
You grip the axe firmly and try to bring it down as hard as you can on the wood. But the axe head is unexpectedly heavy, and it flies out of your hands.

get axe
You take the axe.

chop wood
You haven't done this very often - your father made sure there was always enough firewood whenever he left for war. It's harder than you think.
You grip the axe as hard as you can and swing it over your head. You keep hold of the axe this time, but miss the wood completely. The head of the axe buries itself into the ground, and it takes a moment to pull it free.

chop wood
You swing the axe again, this time trying not to force it, but letting the swing of the axe carry it to the wood. It lands on the wood, and a small chip flies into the air.

chop wood
Once more you swing the axe, and manage to make it strike the same point on the wood as the last chop. The cut is getting deeper.

chop wood
Again you swing the axe over your head and bring it down on the wood. There is a resounding crack as a section of wood breaks free in a very satisfying manner.

Even as the sound of your axe-fall echoes around the valley, you hear another sound growing louder. In moments you see the source - a group of about half a dozen men, most armed and mounted on horses, rides out of the trees and stops not far away. Two of the men dismount. One you recognise as Lord Reken, the man who took your father away to war. The other man you haven't seen before. He is dressed in priestly robes.
You bow in greeting to these men.
"Torrin," Lord Reken says. There's something wrong in his eyes, his voice. "I have some bad news."
"What's wrong?" you ask. "Where's my father?"
"Your father was very brave," Lord Reken answers. "He saved the king in a battle, but died from the wounds he received."
The other man steps toward you.
"You must also be brave," the priest said. "And trust in God. He will have mercy on all who trust in him."
You pause for a moment. "What’s going to happen to me?" you ask.
Lord Reken's smile is kind, fatherly. "You'll be coming with me. The king has agreed to bring you into his care as ward."
You look at your cottage, and then back at Lord Reken.
A tear drops off your chin and lands on your tunic.

...Two years ago...

My studies are becoming more arduous. The honour of one day becoming a knight dangles like a carrot in front of me, just beyond my grasp. My skill in areas like swordplay, jousting and archery are more than competent. But in others, like my religious duties, are less well developed. Yet I feel driven to excel.

Your personal chambers
The room is not large, but adequate for your needs. There is a small window in the western wall, and a door in the eastern one. A low bed sits against the northern wall, with an unmarked wooden chest at the foot of it.
You are seated at your desk, a scroll open before you. A single candle rests in a metal holder close by, giving light to your work, but casting leaping shadows around the rest of the room.
Sitting on the desk near the scroll is a small cup.

read scroll
You read a paragraph, but the words float before your eyes, defying meaning. It’s very late, and you’ve been studying for several hours. Your head is pounding.

x cup
The cup is a rather plain and simple, carved from wood and without ornamentation. Inside the cup is some liquird.

drink liquid
You pick up the cup and quickly swallow the contents. You feel your headache lifting almost instantly.

read scroll
You force your eyes to concentrate on the words printed on the page. A meaning starts to become clear. Something about having a servant’s heart.

read scroll
Again you read the words on the page, and slowly you begin to understand. A true knight is a servant of the kingdom, willing to give his life to serve his king and, by extension, the people.

There is a knock on the door. The door opens and a servant walks in.
And V5:
Cursed by Nick Rogers played with ADRIFT 5 Runner:
> get axe
Ok, you pick up the axe.

> chop wood
You grip the axe firmly and try to bring it down as hard as you can on the wood. But the axe head is unexpectedly heavy, and it flies out of your hands.

> get axe
Ok, you pick up the axe.

> chop wood
You haven't done this very often - your father made sure there was always enough firewood whenever he left for war. It's harder than you think. You grip the axe as hard as you can and swing it over your head. You keep hold of the axe this time, but miss the wood completely. The head of the axe buries itself into the ground, and it takes a moment to pull it free.

> chop wood
You swing the axe again, this time trying not to force it, but letting the swing of the axe carry it to the wood. It lands on the wood, and a small chip flies into the air.

> chop wood
Once more you swing the axe, and manage to make it strike the same point on the wood as the last chop. The cut is getting deeper.

> chop wood
Even as the sound of your axe-fall echoes around the valley, you hear another sound growing louder. In moments you see the source - a group of about half a dozen men, most armed and mounted on horses, rides out of the trees and stops not far away. Two of the men dismount. One you recognise as Lord Reken, the man who took your father away to war. The other man you haven't seen before. He is dressed in priestly robes. You bow in greeting to these men. "Torrin," Lord Reken says. There's something wrong in his eyes, his voice. "I have some bad news." "What's wrong?" you ask. "Where's my father?" "Your father was very brave," Lord Reken answers. "He saved the king in a battle, but died from the wounds he received." The other man steps toward you. "You must also be brave," the priest said. "And trust in God. He will have mercy on all who trust in him." You pause for a moment. "What’s going to happen to me?" you ask. Lord Reken's smile is kind, fatherly. "You'll be coming with me. The king has agreed to bring you into his care as ward." You look at your cottage, and then back at Lord Reken. A tear drops off your chin and lands on your tunic.[ Press any key ] ...Two years ago... My studies are becoming more arduous. The honour of one day becoming a knight dangles like a carrot in front of me, just beyond my grasp. My skill in areas like swordplay, jousting and archery are more than competent. But in others, like my religious duties, are less well developed. Yet I feel driven to excel.
Your personal chambers
The room is not large, but adequate for your needs. There is a small window in the western wall, and a door in the eastern one. A low bed sits against the northern wall, with an unmarked wooden chest at the foot of it. You are seated at your desk, a scroll open before you. A single candle rests in a metal holder close by, giving light to your work, but casting leaping shadows around the rest of the room. Sitting on the desk near the scroll is a small cup. Again you swing the axe over your head and bring it down on the wood. There is a resounding crack as a section of wood breaks free in a very satisfying manner.

> read scroll
There is nothing worth reading on the scroll.

> x cup
The cup is a rather plain and simple, carved from wood and without ornamentation. Inside the cup is some liquird.

> drink liquid
You pick up the cup and quickly swallow the contents. You feel your headache lifting almost instantly.

> read scroll
There is nothing worth reading on the scroll.

@ even if i drink the liquid in the cup, I cannot READ SCROLL.
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
User avatar
Campbell
Site Admin
Posts: 4727
Joined: Sun Jun 23, 2002 12:05 pm
Points: 0
Location: Edinburgh, Scotland
Contact:

Re: On converting ADRIFT 4 games to ADRIFT 5

Post by Campbell »

Hmm. That looks to be down to the way Nick created the read scroll task.

The command has been defined as

Code: Select all

[read {from}/study] {the} [scroll/book/parchment]
ADRIFT 5 is stricter with the syntax than ADRIFT 4. Multiple spaces were ignored in the latter, whereas the parser now interprets exactly what has been defined. To try to work around this, I attempt to auto-correct any lazy syntax when loading a v4 game in v5. The above gets converted to:

Code: Select all

[read {from}/study] {the }[scroll/book/parchment]
(notice the position of the curly bracket after "the")

Unfortunately, as you can see, if you don't type "from" then there's a space after read and a space before the, and thus it would have to match on "read##scroll" rather than "read#scroll" (replacing space with #). The command "read from scroll" works, as this swallows the first space.

I could try to improve the auto-correct, as this needs to be defined as

Code: Select all

[read{ from}/study] {the }[scroll/book/parchment]
ADRIFT Developer developer.
User avatar
Denk
Posts: 587
Joined: Mon Feb 22, 2016 6:21 pm
Points: 251
Location: Hjørring, Denmark

Re: On converting ADRIFT 4 games to ADRIFT 5

Post by Denk »

I can imagine that it can be very difficult to predict the right amount of spaces when converting an arbitrary command.

Perhaps you should go with something bulletproof, e.g.:

Code: Select all

[read{ }{from}/study]{ }{the}{ }[scroll/book/parchment]
I.e. all spaces have been surrounded by: { }

The only drawback is that the player will not be forced to make spaces, e.g. READSCROLL would also work. But I don't think that would reduce the quality of the game, compared to the current problems where the game requires two spaces, which no player could guess.

Perhaps you could use this approach only in difficult cases where the number of spaces isn't straight forward.

E.g. a command like: "[say] [hello]" does not need correction.
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
User avatar
Campbell
Site Admin
Posts: 4727
Joined: Sun Jun 23, 2002 12:05 pm
Points: 0
Location: Edinburgh, Scotland
Contact:

Re: On converting ADRIFT 4 games to ADRIFT 5

Post by Campbell »

Good suggestion. :Thanks:
ADRIFT Developer developer.
ralphmerridew
Posts: 2599
Joined: Fri Dec 13, 2002 11:56 pm
Points: 10
Location: Missouri
Contact:

Re: On converting ADRIFT 4 games to ADRIFT 5

Post by ralphmerridew »

Very subjective here, but I've found that, when doing fully automated conversions, high level target languages don't work well. (If the conversion output is to be the first step, and will be manually processed after that, a high-level target can work.)
Bloodhounds can make you laugh and cuss in the same breath. They are endearing, faithful, and can sling drool ten feet in any direction. -- Virginia Lanier
Post Reply