Interactive Video with Audience Options

Hey there!
I’m currently working on a project based on ‘decision-making’ in which I want to create a video narrative and allow the viewer to determine what happens next…
At each break in the video narrative they will be given two options of what they want to happen next. This will be controlled by a mouse-click - and whichever they option they choose will have a different result (so IF they click on YES Video 1 will play and NO Video 2 will play, etc)

Any suggestions on ideas how to do this?..

Cheers!
M

Hi there M,

Will your sketch be similar to a yes/no decision tree like this? In that case lines would represent videos, red diamonds are decision points, and green blocks are the end of the video. Will you have separate videos for each line, or do you have another system in mind?

Aside from your desired system, I think a good place to start is to get the program flow to work. You could easily replace the videos with text for the time being. For instance, display the scene number or the decision chain (yes / no / yes / yes / no) on the screen.

If you happened to tried something like this already, could you show us how far you got with your code and explain where you got stuck?

3 Likes

Hi @Tiemen

Yes, exactly. I want it to have the same idea as the yes/no decision tree. I will have a seperate video for each line yes. I haven’t tried this yet as I was trying to find a way to articulate it but this matches what I want to do ^^ Thank you!

I am also quite new to processing so still trying to navigate my way round it… so far have been trying to find relevant tutorials for ‘interactive video’, ‘mouse press events’, ‘use of buttons’ etc…

Is it possible to make a decision tree like the one above on processing? I’m sorry if this seems a basic question, still very much navigating my way round the programme and seeing what is possible…

Yes, it is :slight_smile:

Whenever you try to put together a complex project, it’s wise to start small. Get familiar with some of the functionalities which you think might be necessary for your final product. Once you got the hang of it, try to combine these separate elements into a single sketch. In your case some examples would be:

  • video: try to play a video inside you sketch
  • buttons: get the yes/no buttons to work
  • switch or if/else: you might need these later to pick a certain video

Hope this helps to get started!

2 Likes

Perfect! I will try these first.
Thanks so much!
:slight_smile:

M

1 Like

Another useful concept for these kinds of projects is “state machine”

https://discourse.processing.org/search?q=state%20machine

So you have states like this:

int s0video = 0;
int s0choice = 1;
int s1video = 2;
int s1choice = 3;
int s2video = 4;
int s2choice = 5;
int s3video = 6; 
//....
int current = s0video;

and then you have rules like “if the state is s2choice and the mouse clicks on the right hand side of the screen, the state is now s5video”:

if(current==s2choice && mousePressed && mouseX>width/2) {
  current==s5video;
}

Draw to the screen displaying the video or buttons based on whatever the current state is.

For previous discussion of sketch state in a simple interactive experience, also see:

1 Like