Creative Code

The Assignment

Create a project that is interactive (either in real-time, or previously generated by an interactive process) that exists in either a physical environment or on the web. If the project is web-based it cannot be a "traditional" website that conveys static information, it must be dynamic and generated by some means of "creative coding".

Research

Concept and Proposal

Interactive Plant Growing Game

This interactive game allows the user to plant, water, feed, and heat their very own plant, growing it from seed to full bloom in a six-step process. While the user interacts with the web-based game on their computer, the steps and growth of the plant will come to life as they are projected on real objects. Each step of the growth will tell the next part in a story.For the web-based game, I will use p5 and jQuery. The user will be guided by an adorable pug telling them the next step, and will use the fertilizer, water, etc. accordingly. As the user completes each step, I will use projection mapping to display the actions in real time. Six real-life pots will be set up in a semi-circle around the user, giving a feeling of movement as the story is told. The plant will grow with every step. Each action will be projected as well, so if the user is watering the plant, "water" will rain down on the corresponding pot. While one pot / step is lit and projected, the others will be dark.

November 5 - writeup completed

November 10 - illustrations / UI / research completed

November 12 - program game

November 17 - game complete, begin projection mapping

November 24 - synced w/ game projection mapping

December 1 - gallery setup

Design

Code

$(document).ready(function() {
$('#growingPlant').hide();
$('#toolBar').hide();
$('#stepAnimations img').hide();
$('#help').css('margin-right', '38%');
$('.projectionVideo video, .projectionVideo div').hide();


$('.start').click(function () {
$('#helpBubble h1').text('Step 1');
$('#helpBubble p').text('First, add your soil to the pot and plant the seed to start its growth!');
$('#helpBubble img').attr('src', 'images/plantTool.svg');
$(this).removeClass('start');
$('#growingPlant').fadeIn(1000).delay(1000);
$('#toolBar').show();
$('#stepAnimations img').hide();
$('#help').animate({ marginRight: "0" }, 1000, function() {});
});


$('ul#tools li img').draggable({
revert: true
});


$('ul#tools li#plant').mousedown(function() {
$('#helpBubble p').text('Drop the soil into the pot!');


$('#dropIn').droppable({
drop: function() {
$('.projectionVideo video, .projectionVideo div').hide();
$('#stepOneProjection video, #stepOnePot').show();
$('#growingPlant h2').text('MAY 15TH, 2010');
$('#growingPlant p').text('Sean and Amy met at Relay for Life in their Junior year of high school. She was team captain, and he was on the team with his band mates. Amy lost her snuggie, and Sean helped her find it. They held hands and fell in love.'); $('#stepAnimations img#stepOne').show();
$('#helpBubble h1').text('Step 2')
$('#helpBubble p').text('Great job! Next, give your new seed a bit of water.')
$('#helpBubble img').attr('src', 'images/waterTool.svg');
$('ul#tools li#plant img').attr('src', 'images/plantToolGrey.svg');
$('ul#tools li#plant img').css('margin-left', '1%');
},
});
});

$('ul#tools li#water').mousedown(function() {
var water = $(this);

$('#helpBubble p').text('Pour the water over the soil!');

$('#dropIn').droppable({
drop: function() {
$('.projectionVideo video, .projectionVideo div').hide();
$('#stepTwoProjection video, #stepTwoPot').show();
$('#growingPlant h2').text('MAY 7TH, 2011');
$('#growingPlant p').text('Just before their one-year anniversary, they attended their senior prom together. That night marked the end of their high school careers. Who would have thought that five years later they would be celebrating their wedding at the same venue!');
$('#stepAnimations img#stepTwo1').show();
$('#stepAnimations img#stepTwo2').show();
$(water).removeAttr('id');
$(water).attr('id', 'secondClick');
$('#helpBubble h1').text('Step 3');
$('#helpBubble p').text('Nice! It looks like your plant could use a bit of fertilizer...');
$('#helpBubble img').attr('src', 'images/foodTool.svg');


$('ul#tools li#secondClick').mousedown(function() {
$('#helpBubble p').text('Give your plant some more water!');

$('#dropIn').droppable({
drop: function() {
$('.projectionVideo video, .projectionVideo div').hide();
$('#stepFourProjection video, #stepFourPot').show();
$('#growingPlant h2').text('MAY 15TH, 2015');
$('#growingPlant p').text('At Longwood Gardens, a place where they spent a lot of happy memories, Sean finally popped the question. Under a beautiful secluded archway he got down on one knee, and Amy cried like a baby as she said "Yes!"');
$('#stepAnimations img#stepFour').show();
$(water).removeAttr('id');
$(water).attr('id', 'thirdClick');
$('#helpBubble h1').text('Step 5');
$('#helpBubble p').text('Excellent - but it looks like your plant is getting a bit cold. Give it some sun!');
$('#helpBubble img').attr('src', 'images/heatTool.svg');

$('ul#tools li#thirdClick').mousedown(function() {
$('#helpBubble p').text('Bring some water over one last time!');

$('#dropIn').droppable({
drop: function() {
$('.projectionVideo video, .projectionVideo div').hide();
$('#stepSixProjection video, #stepSixPot').show();
$('#growingPlant h2').text('MAY 15TH, 2016');
$('#growingPlant p').text('Though this is the end of their story as they know it, it is just the beginning of a whole new world of adventures that they cannot wait to share with one another. They are excited for a day surrounded with love, support, and laughter.');

$('#helpBubble h1').text('You did it!');
$('#helpBubble p').text("Thank you for growing your little plant and learning more about Sean and Amy's relationship.");
$('#stepAnimations img#stepSix1').show();
$('#stepAnimations img#stepSix2').show();
$('#helpBubble img').hide();
$('ul#tools li#thirdClick img').attr('src', 'images/waterToolGrey.svg');
$('ul#tools li#thirdClick img').css('margin-left', '1%');
}
});
});
}
});
});
}
});
});

$('ul#tools li#food').mousedown(function() {
$('#helpBubble p').text('Sprinkle some plant food over your sprout!');

$('#dropIn').droppable({
drop: function() {
$('.projectionVideo video, .projectionVideo div').hide();
$('#stepThreeProjection video, #stepThreePot').show();
$('#growingPlant h2').text('AUGUST 23RD, 2011');
$('#growingPlant p').text('It was time for a big decision, and Sean and Amy chose to go to separate colleges. Though they were very much in love, they knew they had to grow individually, and that it would work out if it was meant to be. (Spoiler: it worked out).');
$('#helpBubble h1').text('Step 4');
$('#helpBubble p').text('Look at it grow! Give it some more water before it dries out!');
$('#stepAnimations img#stepThree').show();
$('#helpBubble img').attr('src', 'images/waterTool.svg');
$('ul#tools li#food img').attr('src', 'images/foodToolGrey.svg');
$('ul#tools li#food img').css('margin-left', '1%');
}
});
});

$('ul#tools li#heat').mousedown(function() {
$('#helpBubble p').text('Warm your little guy up!');

$('#dropIn').droppable({
drop: function() {
$('.projectionVideo video, .projectionVideo div').hide();
$('#stepFiveProjection video, #stepFivePot').show();
$('#growingPlant h2').text('MAY 23RD, 2015');
$('#growingPlant p').text('With graduation dates quickly approaching, a ring on her finger, and the excitement of starting a new life together, Sean and Amy took the big step to move into their first apartment.');
$('#stepAnimations img#stepFive').show();
$('#helpBubble h1').text('Step 6');
$('#helpBubble p').text('Now just a bit more water and this plant will be thriving!');
$('#helpBubble img').attr('src', 'images/waterTool.svg');
$('ul#tools li#heat img').attr('src', 'images/heatToolGrey.svg');
$('ul#tools li#heat img').css('margin-left', '1%');
}
});
});
});

Video