ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Remaking Adrift 5 in Unity

The place to chat about ideas, writing, this forum, or anything related to Interactive Fiction that isn't specific to ADRIFT.

Please also visit the Interactive Fiction Community Forum for further discussions.

Remaking Adrift 5 in Unity

Postby Stardog » Thu Nov 02, 2017 7:40 pm

I'm working on a full remake of Adrift 5 in Unity. The main reasons are so I can use custom dialogue systems, allow for more detailed interactions with objects, and WebGL export. Also, future potential for multiplayer/co-op play.

It's an interesting project to try to design. :x . I'm trying to do most things the way Adrift would with General/Specific Tasks, etc. I'll put it on GitHub as soon as it becomes 'usable'.

Building a specific task in code would look something like this, but would be simplified more in the future with a custom editor, or just scan the name of the GameObject and generate it from there. "look {at} (oPainting)".
adrift Code: Select all
AddSentenceElement(new ElementVerbID("vLook"));
AddSentenceElement(new ElementTextOptional("at"));
AddSentenceElement(new ElementObjectID("oPainting"));


I've already had to redesign the structure a few times.

Have any of you thought about doing something like this? How would you design it, and what features would you expect to see?
Stardog
 
Posts: 14
Joined: Sat Jun 13, 2015 7:07 am
Points: 10

Re: Remaking Adrift 5 in Unity

Postby P/o Prune » Fri Nov 03, 2017 6:32 am

Hi Stardog.
I believe that Campbell would be the right person to ask about this.
He hasn't been around for quite sometime but I'll forward your post to him and hopefully he'll reply.
Don't give up hope.
Cheers
D-Day V.5 in progress 86Kb (On backburner)
Anno 1700 Fourth beta test in progress.
User avatar
P/o Prune
Site Admin
 
Posts: 4165
Joined: Mon Jun 24, 2002 8:18 am
Location: Denmark
Points: 23

Re: Remaking Adrift 5 in Unity

Postby Lazzah » Fri Nov 03, 2017 11:38 am

Stardog wrote:I'm working on a full remake of Adrift 5 in Unity.

adrift Code: Select all
AddSentenceElement(new ElementVerbID("vLook"));
AddSentenceElement(new ElementTextOptional("at"));
AddSentenceElement(new ElementObjectID("oPainting"));


Sorry to put a dampener on your efforts, but I would personally avoid anything that involved using commands such as the above like the plague! The whole point about ADRIFT is that it is so easy to use. There are those of us - mostly the older generation - who find "expressions" like the above totally baffling. One reason I have avoided using Inform7 is the need to use code to perform the simplest of tasks.
OUT NOW: Run, Bronwynn, Run!
Current W.I.P.: Magnetic Moon
Also available: The Axe of Kolt, The Spectre of Castle Coris, The Fortress of Fear, Die Feuerfaust - The Fist of Fire and The Lost Children
User avatar
Lazzah
Moderator
 
Posts: 2114
Joined: Thu Mar 31, 2011 4:54 am
Location: London, England
Points: 17

Re: Remaking Adrift 5 in Unity

Postby Stardog » Fri Nov 03, 2017 1:51 pm

Lazzah wrote:
Stardog wrote:I'm working on a full remake of Adrift 5 in Unity.

adrift Code: Select all
AddSentenceElement(new ElementVerbID("vLook"));
AddSentenceElement(new ElementTextOptional("at"));
AddSentenceElement(new ElementObjectID("oPainting"));


Sorry to put a dampener on your efforts, but I would personally avoid anything that involved using commands such as the above like the plague! The whole point about ADRIFT is that it is so easy to use. There are those of us - mostly the older generation - who find "expressions" like the above totally baffling. One reason I have avoided using Inform7 is the need to use code to perform the simplest of tasks.

Yes, but Unity has an Editor layer you can use to hide the raw code. It would be no more complex than writing adrift's "[look/l] {at} %object%".

So you would have 3 different ways of doing it. Raw code, expressions, or visual editor.

Image
Image
Stardog
 
Posts: 14
Joined: Sat Jun 13, 2015 7:07 am
Points: 10

Re: Remaking Adrift 5 in Unity

Postby Denk » Fri Nov 03, 2017 8:12 pm

Stardog wrote:Have any of you thought about doing something like this? How would you design it, and what features would you expect to see?

A feature I think is important for a modern IF-tool is the ability to play online, including ability to save your game. I hope that is possible with Unity (perhaps that is what webGL means?).

Looking forward to try a "usable" version, once it becomes available!
-----------------------------------------------------------------------------------------
Out now: The Royal Puzzle, The Way Home & The Dragon Diamond
-----------------------------------------------------------------------------------------
Denk
 
Posts: 122
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 16

Re: Remaking Adrift 5 in Unity

Postby DazaKiwi » Sun Nov 05, 2017 9:12 pm

This sounds interesting. I hope you can get it off the ground. Do keep us in the loop of your progress if you are able to go ahead with it with Campbell's blessing.
User avatar
DazaKiwi
 
Posts: 529
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand
Points: 16

Re: Remaking Adrift 5 in Unity

Postby Lumin » Tue Nov 14, 2017 2:45 pm

Looks interesting, good luck and keep us updated. Maybe something like this would help kickstart the community a little.
Currently working on: Nada. Zip. Zilch. [Check this space later.]
User avatar
Lumin
 
Posts: 1801
Joined: Fri Aug 06, 2004 5:48 pm
Location: Texas
Points: 34

Re: Remaking Adrift 5 in Unity

Postby Stardog » Fri Nov 24, 2017 12:08 am

Denk wrote:
Stardog wrote:Have any of you thought about doing something like this? How would you design it, and what features would you expect to see?

A feature I think is important for a modern IF-tool is the ability to play online, including ability to save your game. I hope that is possible with Unity (perhaps that is what webGL means?).

Looking forward to try a "usable" version, once it becomes available!

Yes, WebGL means the games will be playable in a browser without plugins/addons.

I'm still working on some of the interesting design problems for this. I have done the basic text parsing. It will take the "look {at} [item]" format, split the command up into pieces, and match it to the closest "Task".

The harder problem is supporting complex game ideas. I will have to use Reflection to do some of the more complex stuff Adrift does such as the Action/Restrictions editor that let you choose from a list of things.
Stardog
 
Posts: 14
Joined: Sat Jun 13, 2015 7:07 am
Points: 10

Re: Remaking Adrift 5 in Unity

Postby Stardog » Mon Dec 25, 2017 6:40 pm

I've done some work testing different user interfaces. It's missing some stuff, but the layout seems like it would work ok.

Capture.PNG
Capture.PNG (141.46 KiB) Viewed 2039 times



Project Overview Sidebar

There will be a constant left sidebar. You can click-drag objects from here into different windows/slots. Each category in the left bar would expand to its own editor so you have more space. Also, maybe the Objects category will be removed because having all objects in a list won't be useful when you have 20+. Instead, you can just parent them to Rooms directly.


Types

Types are things like Lookable/Container/Supporter/Wearable/etc. They are click-dragged onto an Object from the sidebar, or added with the + button. You can add as many Types as you want to an Object.

They are a list of properties grouped together. Compared to Adrift, they act like a 'Location Group' with properties that are "Private to group".

For advanced behaviour, you will have to build your own types from scratch. You will be able to add many types of variables/properties such as character/object/int/float/string/bool/enum/fsm, and also list/array versions. It should allow you to build complex objects.


Command Responses

This area replaces 'Specific Tasks' and would be done on the object itself, instead of listed separately.

You click-drag a Command (General Command) onto the object. If you add the "Read (object)" command onto the Note object, it would automatically assume you wanted to read this specific note, so you don't have to insert the object manually.

Then you would need to add your list of Conditions/Actions as in Adrift. A Condition might be "Referenced Object must be of type Readable". This is where you would need to have the correct Type added to the Note, also.
Stardog
 
Posts: 14
Joined: Sat Jun 13, 2015 7:07 am
Points: 10

Re: Remaking Adrift 5 in Unity

Postby Lumin » Tue Dec 26, 2017 1:08 pm

Looks great so far! I really like that bit about dragging commands. Would there be away to set conditions universally, such as making all 'read' commands have the same requirements?
Currently working on: Nada. Zip. Zilch. [Check this space later.]
User avatar
Lumin
 
Posts: 1801
Joined: Fri Aug 06, 2004 5:48 pm
Location: Texas
Points: 34

Re: Remaking Adrift 5 in Unity

Postby Stardog » Tue Dec 26, 2017 11:17 pm

Lumin wrote:Looks great so far! I really like that bit about dragging commands. Would there be away to set conditions universally, such as making all 'read' commands have the same requirements?

Thanks! For universal conditions, you would put them in the "read (object)" command like with Adrift's General Task. My example image above does it wrong, so the conditions you see there would actually be in a "fire (object)" base command. I also forgot to put those commands in the sidebar.

Also, Types should automatically add themselves when you drag a command into Command Responses. So adding a "read (object)" command to a Note, it would automatically add the "Readable" Type, which contains the variables that store what is typed on the note.
Stardog
 
Posts: 14
Joined: Sat Jun 13, 2015 7:07 am
Points: 10

Re: Remaking Adrift 5 in Unity

Postby DazaKiwi » Sat Feb 17, 2018 1:38 am

Hello Stardog, How is your Unity/Adrift project going? any update info you can share with us on your progress? its been a few months.
User avatar
DazaKiwi
 
Posts: 529
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand
Points: 16

Re: Remaking Adrift 5 in Unity

Postby Stardog » Thu Feb 22, 2018 6:42 pm

I haven't worked on it in February, but in January I added the idea of a 'Quest' and a 'Story'.

Quests will give players optional goals, and will be structured like Skyrims where each quest has multiple 'Stages'. When you switch stages, an event will fire which can affect the world in any way you wish, such as spawning/hiding objects. It could be used for storing puzzle variables, so you don't have to have variables in one big list. Multiple quests can be running at the same time.


The Story editor can help organise the different states the world can be in. It is split into stages too. For example:

Chapter 1 - Stage 1 (Enabled on game start. Player is inside house. When player types 'look at family photo', the 'Family Photo' object will check a condition (IF Story IS Chapter 1 Stage 1... Set Stage to 2)
Chapter 1 - Stage 2 (Activated by Family Photo. Makes a new character 'Jenny' appear in the room. Maybe now the game will not let you exit the room.)
Chapter 2 - Stage 1 (Activated by something in Chapter 1. Sets up objects/characters in different rooms.)

Now you can use this info as a condition. For example, if you type 'speak to jenny', it will start a different conversation when you are in different Chapters/Stages. I think only one Chapter/Stage will be active at any time.


I was also reading a bit about the structure of other engines too, and decided to use "Thing" as the base class of all objects.

Also, I wanted to support visual novels and other games, but it seems like it's better to focus on text adventures first, and then do a seperate editor for the others. I was playing Danganronpa and it seems too complex to create with the same editor.
Stardog
 
Posts: 14
Joined: Sat Jun 13, 2015 7:07 am
Points: 10

Re: Remaking Adrift 5 in Unity

Postby Stardog » Fri Apr 20, 2018 8:43 pm

I'm still working on this of and on.

Expressions

One problem I had is visible in the "WRITE TEXT 'You fire the shotgun...'" action in the picture above. This is just a string (some text). If you changed the shotgun into a handgun, it wouldn't update the name automatically.

The only way to solve that is the same way ADRIFT does, by writing an expression such as 'You fire the objectID.Name' which will be converted to text at runtime, but I don't want anyone to write expressions. I want users to click-drag everything using building blocks. So that means I needed a new expression builder type concept.

To make this easier, I have decided to split everything out into its raw data, so it can be referenced from anywhere. Even the value of a variable is now a standalone object in the scene. This will also allow the GUI to display any data it wants, without knowing where it's from, so it's completely decoupled.

1.PNG
1.PNG (11.65 KiB) Viewed 958 times

2.PNG
2.PNG (7.79 KiB) Viewed 958 times


So, the 'WRITE TEXT' action's output will now be built from a list of multiple values that have been click-dragged in, loop through them, and then print out the final string.
Stardog
 
Posts: 14
Joined: Sat Jun 13, 2015 7:07 am
Points: 10


Return to General IF

Who is online

Users browsing this forum: No registered users and 3 guests