Using a c++ interactive fiction library in openFrameworks

Hi there,

I’ve been writing stories in the ink scripting language GitHub - inkle/ink: inkle's open source scripting language for writing interactive narrative.

I’d really like to now integrate these stories into an openFrameworks project, adding a UI and some computer vision features.

I’ve found that there is a c++ port of Ink which I hope I can use in openFrameworks but I’m unsure about how to go about this. Could anyone give me some advice?

This is the c++ port:

How could I integrate this into an openFrameworks project?

Hi, I have no idea about that scripting language, but if it is in C++ it should be possible to use along with OF.
First thing I would do is to make inkcpp to compile and run in the IDE/build system you are using, ie. Xcode, Visual Studio, Make, etc

Once you have that you should be able to add it to a project of yours.

In general, I’ve found that the easiest way to handle this kind of things is to make an addon. Use the addon template as a starting point.

Hey Roy, thanks for this advice - I’m struggling a little to compile the inkcpp side. I’ll try the addon template once things work on that side :slight_smile:

which OS are you working on?

I’m working on Mac and Linux, though the main OS I’d like to get this working on is Linux. This is because I’m planning to use a raspberry pi powered device running an openFrameworks project as the ‘games console’ for the interactive narrative game

I see. If you can compile this thing as a static library it would be the easiest to integrate; you just create an addon following the addon template. In such case you simply would put the compiled library for its appropriate OS in the libs folder and the includes for it. the benefit of this is that you will not need to set up any special thing for the project, just create with Project generator and it will be in charge of correctly adding the lib to the project