{"id":1030,"date":"2012-12-14T12:32:48","date_gmt":"2012-12-14T12:32:48","guid":{"rendered":"http:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/?p=1030"},"modified":"2012-12-18T01:12:26","modified_gmt":"2012-12-18T01:12:26","slug":"final-project-audio-and-video","status":"publish","type":"post","link":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/2012\/12\/14\/final-project-audio-and-video\/","title":{"rendered":"Final project audio and video"},"content":{"rendered":"<p>I got everything I originally planned on making into my game, and made a bunch of audio, but could not get the into my program. The makey makey worked relatively well and I am still happy with the finished project. I tried several ways to put audio into my videos but ProTools stopped working in the lab. I checked on three different computers. I then borrowed somone&#8217;s window machine and attempted to use Window&#8217;s Movie Maker. It could not read my .wav files. I have a video of the gameplay and the physical input and another of just the gameplay. Even without sound the project was a lot of work, and took about 1000 lines of code, and a lot of tweaking.<\/p>\n<p>Here is the finished game, though it will be less intuitive without the makeymakey. The dice and wires on the makeymakey were color coated to match the stats they increase. as of now arms\/attack = left arrow, tails\/defense = right arrow, head\/magic resistance = down arrow, eyes (makes the enimy more likely to be something you are good againsts) = up, wings\/evade = w, legs\/speed = space bar. These were chosen to go along with what is accessible on the makey makey. If I used WASDF the wires would be too close and would press each other.<br \/>\n<script>\n\/\/stats and stat display strings\nint attack = 7;\nString attackS = \"\" + attack;\nint magRes = 7;\nString magResS = \"\" + magRes;\nint evade = 7;\nString evadeS = \"\" + evade;\nint defense = 7;\nString defenseS = \"\" + defense;\nint speed = 7;\nString speedS = \"\" + speed;\nint monSpeed = 5;\nint monAttack = 5;\nint monDefense = 5;\nint monMagic = 5;\n\/\/the monster's high and 2 medium stats\nint monH = 5;\nint monM1 = 5;\nint monM2 = 5;<\/p>\n<p>\/\/counts of added limbs\nint heads = 0;\nint arms = 0;\nint tails = 0;\nint eyes = 0;\nint wings = 0;\nint legs = 0;\nint total = 0;<\/p>\n<p>\/\/damage counting;\nint monDamage = 0;\nint enimPhysical = 0;\nint enimMagical = 0;\nint monDamage2 = 0;\nint enimPhysical2 = 0;\nint enimMagical2 = 0;\nint extraAchieved = 0;<\/p>\n<p>\/\/game management phase 0 is stat adding phase phase 1 is \n\/\/attack phase other is wait phase\nint phase = 0;\nint bRound = 1;\nint attackPhase = 1;\nString attackPhaseS = \"\" + attackPhase;\nint atWait = 0;<\/p>\n<p>\/\/roll and display string for the roll\nint roll = 0;\nString rollS = \"\" + roll;<\/p>\n<p>\/\/health and display string\nint health = 4000;\nString healthS = \"\" + health;\nint monHealth = 50;\nString monHealthS = \"\" + monHealth;<\/p>\n<p>void setup(){\n  size(1000,800);\n  background(238,207,161);\n  generateEnemy();<\/p>\n<p>}<\/p>\n<p>void draw(){\n  \/\/set up stat display.\n  fill(156,102,31);\n  rect(0,600,999,200);\n  PFont f = createFont(\"Arial\",50,true);\n  textFont(f,20);\n   fill(50,20,0);\n   text(\"Monster Stats:\",10,630);\n   fill(255,0,0);\n   text(\"Attack:\",25, 680);\n   fill(50,20,0);\n   text(attackS,100,680);\n   fill(100,0,255);\n   text(\"Magic Resistance:\",255, 680);\n   fill(50,20,0);\n   text(magResS,430,680);\n   fill(0,0,255);\n   text(\"Evade:\",570, 680);\n   fill(50,20,0);\n   text(evadeS,650,680);\n   fill(255,255,0);\n   text(\"Defense:\",180, 750);\n   fill(50,20,0);\n   text(defenseS,270,750);\n   fill(0,255,0);\n   text(\"Speed:\",480, 750);\n   fill(50,20,0);\n   text(speedS,550,750);<\/p>\n<p>   \/\/set up dice roll display box\n   fill(156,102,31);\n   rect(700,600,299,200);\n   fill(50,20,0);\n   textFont(f,35);\n   text(\"Your last die roll:\",720,650);\n   textFont(f,150);\n   text(rollS, 800, 780);<\/p>\n<p>   \/\/ Handle left portion of top display (monster and health\n   textFont(f,25);\n   text(\"Monster\",90,30);\n   text(\"Health: \", 60,550);\n   text(healthS, 180,550);\n   strokeWeight(3);\n   line(85,46,190,46);\n   strokeWeight(1);<\/p>\n<p>   \/\/The box that displays attack and attack damage that occurs\n  text(\"Damage\",420,170);\n  fill(238,207,161);\n  strokeWeight(3);\n  rect(370,210,200,230);\n  fill(50,20,0);\n  strokeWeight(1);\n   if (phase == 1){\n     attack();\n   }\n   else{\n      if(health <= 0){\n        fill(255,0,0);\n        text(\"You loose, but\\n\",390,240);\n        text(\"take a look\\n at the \\n evolution you \\n have \\n undergone\",390,270);\n      }\n      else if(bRound < 16){\n        fill(50,20,0);\n        text(\"Awaiting battle: \", 390, 230);\n        textFont(f,150);\n        if(bRound < 10)\n          text(bRound,420, 380);\n        else\n          text(bRound,380, 380);\n     }\n     else{\n        fill(50,20,0);\n        text(\"You WIN!!!!\\n\",390,240);\n        text(\"Take a look\\n at your \\n fully evolved\\n monster\",390,270);\n      }\n   }\n   \n   \/\/ Handle right portion of top display (monster and health\n   fill(238,207,161);\n   noStroke();\n   rect(690,80,310,490);\n   stroke(0);\n   fill(0);\n   textFont(f,25);\n   fill(50,20,0);\n   text(\"Enemy\",740,30);\n   text(\"Health: \", 710,550);\n   text(monHealthS, 830,550);\n   fill(0);\n   strokeWeight(3);\n   line(725,46,840,46);\n   strokeWeight(1);\n   drawEnemy();\n   drawMonster();\n}\n\nvoid attack(){\n  text(\"Damage\",420,170);\n  fill(238,207,161);\n  strokeWeight(3);\n  rect(370,210,200,230);\n  fill(50,20,0);\n  strokeWeight(1);\n  text(\"Attack round \" + attackPhaseS,380,230);\n  if(atWait == 0){\n    extraAchieved = 0;\n    PFont f = createFont(\"Arial\",50,true);\n    textFont(f,15);\n    float monDMod = random(2,3);\n    float enPMod = random(.7,1.5);\n    float enMMod = random(.7,1.5);\n    monDamage = int((attack * monDMod) - (monDefense\/5));\n    if(monDamage < 0) monDamage = 1;\n    enimPhysical = int((monAttack *enPMod) - (defense\/4));\n    if(enimPhysical < 0) enimPhysical = 0;\n    enimMagical = int((monMagic*enMMod) - (magRes\/4));\n    if(enimMagical < 0) enimMagical = 0;\n    float evadeChance = 10 + (.8 * evade);\n    if(random(0,100) <= evadeChance){\n      enimPhysical = 0;\n      enimMagical = 0;\n    }\n    fill(0,170,0);\n    text( monDamage + \" general damage ==>\",390,260);\n    monHealth -= monDamage;\n    fill(255,0,0);\n    text(\"<== \" + enimPhysical + \" physical damage\",390,290);\n    text(\"<== \" + enimMagical + \" magical damage\",390,320);\n    health -= enimPhysical;\n    health -=enimMagical;\n    if(speed > (monSpeed + 2)){\n     float determinator = random(0,1);\n     float base =.3;\n     if((speed - monSpeed) > 4)\n     base = .5;\n     if((speed - monSpeed) >6)\n     base = .7;\n     if(determinator < base){\n       fill(0);\n       text(\"Monster's speed granted it\\n a second attack!\",390,340);\n       monDMod = random(2,3);\n       monDamage2 = int((attack * monDMod) - (monDefense\/4.5));\n       if(monDamage2 < 0) monDamage2 = 0;\n       fill(0,170,0);\n       text(monDamage2 + \" general damage ==>\",390,390);\n        monHealth -= monDamage2;\n        extraAchieved = 1;\n     }\n    }\n    if(monSpeed > (speed + 2)){\n     float determinator = random(0,1);\n     float base =.3;\n     if((monSpeed - speed) > 4)\n     base = .5;\n     if((monSpeed - speed) >6)\n     base = .7;\n     if(determinator < base){\n       fill(0);\n       text(\"Enemy's speed granted it\\n a second attack!\",390,340);\n         enPMod = random(.7,1.5);\n         enMMod = random(.7,1.5);\n         enimPhysical2 = int((monAttack *enPMod) - (defense\/3.5));\n         if(enimPhysical2 < 0) enimPhysical2 = 0;\n         enimMagical2 = int((monMagic*enMMod) - (magRes\/3.5));\n         if(enimMagical2 < 0) enimMagical2 = 0;\n         if(random(0,100) <= evadeChance){\n            enimPhysical = 0;\n            enimMagical = 0;\n          }\n         fill(255,0,0);\n         text(\"<== \" + enimPhysical2 + \" physical damage\",390,390);\n         text(\"<== \" + enimMagical2+ \" magical damage\",390,420);\n         health -= enimPhysical2;\n         health -= enimMagical2;\n         extraAchieved = 1;\n      }\n    }\n    if(monHealth < 0) monHealth = 0;\n    if(health < 0) health = 0;\n    monHealthS = \"\" + monHealth;\n    healthS = \"\" + health;\n  }\n  else{\n    PFont f = createFont(\"Arial\",50,true);\n    textFont(f,15);\n    fill(0,170,0);\n    text( monDamage + \" general damage ==>\",390,260);\n    fill(255,0,0);\n    text(\"<== \" + enimPhysical + \" physical damage\",390,290);\n    text(\"<== \" + enimMagical + \" magical damage\",390,320);\n    if(speed > (monSpeed + 2) && extraAchieved == 1){\n     fill(0);\n      text(\"Monster's speed granted it\\n a second attack!\",390,340);\n      fill(0,170,0);\n      text(monDamage2 + \" general damage ==>\",390,390);\n    }\n    if(monSpeed > (speed + 2) && extraAchieved == 1){\n      textFont(f,15);\n      fill(0,170,0);\n       text(\"Enemy's speed granted it\\n a second attack!\",390,340);\n       fill(255,0,0);\n       text(\"<== \" + enimPhysical2 + \" physical damage\",390,390);\n       text(\"<== \" + enimMagical2+ \" magical damage\",390,420);\n     }\n  }\n  \n  atWait++;\n  if(health > 0 && monHealth > 0){\n    if(atWait > 50){\n      attackPhase++;\n      attackPhaseS = \"\" + attackPhase;\n      atWait = 0;\n    }\n  }\n  else{\n    if(atWait > 100){\n      attackPhase = 1;\n      attackPhaseS = \"\" + attackPhase;\n      if(health <= 0)\n        phase = 2;\n      else\n        phase=0;\n      atWait = 0;\n      bRound++;\n      if(!(health <= 0))\n        generateEnemy();\n    }\n  }\n}\n\nvoid generateEnemy(){\n  \/\/0 = speed, 1 = attack, 2 = defense, 3 = magic\n  ArrayList stats = new ArrayList();\n  stats.add(0);\n  stats.add(1);\n  stats.add(2);\n  stats.add(3);\n  boolean lowestFixed = false;\n  int lowStat = 0;\n  if(eyes > 0){\n    int compare = 10 * eyes;\n    if(random(0,100) < compare){\n      lowestFixed = true;\n      int lowest = 0;\n      if(attack < defense &#038;&#038; attack < magRes &#038;&#038; attack < speed) lowest = 1;\n      if(defense < attack &#038;&#038; defense < magRes &#038;&#038; defense < speed) lowest = 2;\n      if(magRes < attack &#038;&#038; magRes < defense &#038;&#038; magRes < speed) lowest = 3;\n      if(lowest == 0){\n         lowStat = 0;\n         stats.remove(0);\n      }\n      if(lowest == 1){\n         lowStat = 2;\n         stats.remove(2);\n      }\n      if(lowest == 2){\n         lowStat = 1;\n         stats.remove(1);\n      }\n      if(lowest == 3){\n         lowStat = 3;\n         stats.remove(3);\n      }\n    }\n  }\n  int rand = int(random(stats.size()));\n  int highStat = (Integer)stats.get(rand);\n  stats.remove(rand);\n  rand = int(random(stats.size()));\n  int medStat1 =(Integer) stats.get(rand);\n  stats.remove(rand);\n  rand = int(random(stats.size()));\n  int medStat2 = (Integer) stats.get(rand);\n  stats.remove(rand);\n  if(!lowestFixed) lowStat = (Integer) stats.get(0);\n  int speedStat = 0;\n  int attStat = 0;\n  int defStat = 0;\n  int magStat = 0;\n  int getHStat = int(random(8,12));\n  if(highStat == 0) speedStat = getHStat;\n  if(highStat == 1) attStat = getHStat;\n  if(highStat == 2) defStat = getHStat;\n  if(highStat == 3) magStat = getHStat;\n  int getM1Stat = int(random(4,9));\n  if(medStat1 == 0) speedStat = getM1Stat;\n  if(medStat1 == 1) attStat = getM1Stat;\n  if(medStat1 == 2) defStat = getM1Stat;\n  if(medStat1 == 3) magStat = getM1Stat;\n  int getM2Stat = int(random(4,9));\n  if(medStat2 == 0) speedStat = getM2Stat;\n  if(medStat2 == 1) attStat = getM2Stat;\n  if(medStat2 == 2) defStat = getM2Stat;\n  if(medStat2 == 3) magStat = getM2Stat;\n  int getLStat = int(random(1,4));\n  if(lowStat == 0) speedStat = getLStat;\n  if(lowStat == 1) attStat = getLStat;\n  if(lowStat == 2) defStat = getLStat;\n  if(lowStat == 3) magStat = getLStat;\n  monSpeed = speedStat + int(bRound*1.3);\n  monAttack = attStat + int(bRound*2);\n  monDefense = defStat + int(bRound*2);\n  monMagic = magStat + int(bRound*2);\n  monH = highStat;\n  if(getM1Stat > getM2Stat){\n    monM1 = medStat1;\n    monM2 = medStat2;\n  }\n  else if(getM2Stat > getM1Stat){\n    monM1 =medStat2;\n    monM2 = medStat1;\n  }\n  else{\n    if(int(random(2)) == 1){\n      monM1 = medStat1;\n      monM2 = medStat2;\n    }\n    else{\n      monM1 =medStat2;\n      monM2 = medStat1;\n    }\n  }\n  monHealth = int((2 * bRound + 30) * monDefense\/5);\n  if(monHealth < (19 + bRound))\n    monHealth = 19 + bRound;\n    monHealthS = \"\" + monHealth;\n}\n\nvoid drawEnemy(){\n  PFont f = createFont(\"Arial\",50,true);\n  textFont(f,20);\n  fill(50,20,0);\n   \/\/0 = speed, 1 = attack, 2 = defense, 3 = magic\n   String monster = \"\";\n   color fillC = color(0,0,0);\n  if(monM2 == 0){\n    monster += \"quick\";\n    stroke(0,255,0);\n  }\n  if(monM2 == 1){\n    monster += \"aggressive\";\n    stroke(255,0,0);\n  }\n  if(monM2 == 2){\n    monster += \"hardy\";\n    stroke(255,255,0);\n  }\n  if(monM2 == 3){\n    monster += \"magical\";\n    stroke(150,0,255);\n  }\n  if(monM1 == 0){\n    monster += \" running\";\n    fillC = color(0,255,0);\n  }\n  if(monM1 == 1){\n    monster += \" striking\";\n    fillC = color(255,0,0);\n  }\n  if(monM1 == 2){\n    monster += \" blocking\";\n    fillC = color(255,255,0);\n  }\n  if(monM1 == 3){\n    monster += \" casting\";\n    fillC = color(150,0,255);\n  }\n  \/\/we cannot set the fill until later so this will need to be checked again\n  \/\/for the actual drawing\n  if(monH == 0){\n    monster += \" speed-demon\";\n  }\n  if(monH == 1){\n    monster += \" warrior\";\n  }\n  if(monH == 2){\n    monster += \" defender\";\n  }\n  if(monH == 3){\n    monster += \" wizard\";\n  }\n  text(monster, 700,100);\n  strokeWeight(4);\n  fill(fillC);\n  if(monH == 0){\n    drawSpeedDemon();\n  }\n  if(monH == 1){\n    drawWarrior();\n  }\n  if(monH == 2){\n    drawDefender();\n  }\n  if(monH == 3){\n    drawWizard();\n  }\n  stroke(0);\n  strokeWeight(1);\n}\n\nvoid keyPressed(){\n   if(key==CODED &#038;&#038; keyCode == LEFT &#038;&#038; total < 15 &#038;&#038; phase == 0)\n   {\n     if(arms < 5){\n       arms++;\n       roll = int(random(1,7));\n       attack+= roll;\n       rollS=\"\"+roll;\n       attackS = \"\" + attack;\n       phase = 1;\n     }\n    }\n   if(key==' ' &#038;&#038; total < 15 &#038;&#038; phase == 0)\n   {\n     if(legs< 5){\n       legs++;\n        roll = int(random(1,7));\n         speed+= roll;\n         rollS=\"\"+roll;\n        speedS = \"\" + speed;\n        phase = 1;\n     }\n   }\n   \n   if(key==CODED &#038;&#038; keyCode == RIGHT &#038;&#038; total < 15 &#038;&#038; phase == 0)\n   {\n     if(tails<5){\n       tails++;\n       roll = int(random(1,7));\n       defense+= roll;\n       rollS=\"\"+roll;\n       defenseS = \"\" + defense;\n       phase = 1;\n     }\n   }\n   if(key==CODED &#038;&#038; keyCode == DOWN &#038;&#038; total < 15 &#038;&#038; phase == 0)\n   {\n     if(heads<5){\n       heads++;\n       roll = int(random(1,7));\n       magRes+= roll;\n       rollS=\"\"+roll;\n       magResS = \"\" + magRes;\n       phase = 1;\n     }\n   }\n   if(key==CODED &#038;&#038; keyCode == UP &#038;&#038; total < 15 &#038;&#038; phase == 0){\n     if(eyes <5)\n       eyes++;\n       phase = 1;\n   }\n   if(key=='w' &#038;&#038; total < 15 &#038;&#038; phase == 0){\n     if(wings <5){\n       wings++;\n       roll = int(random(1,7));\n       evade+= roll;\n       rollS=\"\"+roll;\n       evadeS = \"\" + evade;\n       phase = 1;\n     }\n   }\n}\n\nvoid drawSpeedDemon(){\n  beginShape();\n  vertex(780,270);\n  vertex(800,220);\n  vertex(820,270);\n  endShape(CLOSE);\n  beginShape();\n  vertex(805,270);\n  vertex(830,230);\n  vertex(845,270);\n  endShape(CLOSE);\n  beginShape();\n  vertex(820,255);\n  vertex(870,260);\n  vertex(840,300);\n  endShape(CLOSE);\n  beginShape();\n  vertex(850,320);\n  vertex(870,340);\n  vertex(810,345);\n  endShape(CLOSE);\n  beginShape();\n  vertex(830,340);\n  vertex(850,365);\n  vertex(810,350);\n  endShape(CLOSE);\n  line(840,300,880,320);\n  line(880,320,910,290);\n  line(910,290,920,300);\n  line(920,300,940,270);\n  ellipse(948,262,20,20);\n  ellipse(810,300,100,100);\n  fill(0);\n  ellipse(780,290,16,16);\n  ellipse(820,290,16,16);\n  line(790,320,800,315);\n  line(800,315,810,320);\n}\n\n\nvoid drawWarrior(){\n  beginShape();\n  vertex(770,270);\n  vertex(760,230);\n  vertex(820,260);\n  endShape(CLOSE);\n  beginShape();\n  vertex(840,270);\n  vertex(890,260);\n  vertex(860,300);\n  endShape(CLOSE);\n  beginShape();\n  vertex(850,270);\n  vertex(870,270);\n  vertex(840,320);\n  endShape(CLOSE);\n  beginShape();\n  vertex(775,270);\n  vertex(773,245);\n  vertex(800,260);\n  endShape(CLOSE);\n  beginShape();\n  vertex(770,330);\n  vertex(790,370);\n  vertex(810,330);\n  endShape(CLOSE);\n  beginShape();\n  vertex(810,330);\n  vertex(830,370);\n  vertex(850,330);\n  endShape(CLOSE);\n  beginShape();\n  vertex(850,320);\n  vertex(940,270);\n  vertex(960,290);\n  vertex(950,290);\n  vertex(940,280);\n  vertex(860,320);\n  endShape(CLOSE);\n  ellipse(810,300,100,100);\n  beginShape();\n  vertex(740,280);\n  vertex(780,280);\n  vertex(770,300);\n  vertex(760,290);\n  vertex(750,300);\n  endShape(CLOSE);\n  beginShape();\n  vertex(840,300);\n  vertex(880,300);\n  vertex(870,320);\n  vertex(860,310);\n  vertex(850,320);\n  endShape(CLOSE);\n  line(785,295,790,300);\n  line(790,300,795,295);\n  line(795,295,800,300);\n  line(800,300,805,295);\n  line(805,295,810,300);\n  line(810,300,815,295);\n  line(815,295,820,300);\n  line(820,300,825,295);\n  fill(0);\n  beginShape();\n  vertex(790,275);\n  vertex(795,265);\n  vertex(800,275);\n  endShape(CLOSE);\n  beginShape();\n  vertex(830,285);\n  vertex(835,275);\n  vertex(840,285);\n  endShape(CLOSE);\n}\n\nvoid drawDefender(){\n  beginShape();\n  vertex(740,235);\n  vertex(765,175);\n  vertex(790,235);\n  endShape(CLOSE);\n  ellipse(765,265,100,100);\n  beginShape();\n  vertex(800,315);\n  vertex(830,285);\n  vertex(830,315);\n  endShape(CLOSE);\n  ellipse(810,325,50,50);\n  beginShape();\n  vertex(840,325);\n  vertex(870,290);\n  vertex(880,325);\n  endShape(CLOSE);\n  ellipse(860,330,50,50);\n  beginShape();\n  vertex(900,330);\n  vertex(935,320);\n  vertex(930,350);\n  endShape(CLOSE);\n  ellipse(905,350,50,50);\n  beginShape();\n  vertex(915,389);\n  vertex(930,410);\n  vertex(885,413);\n  endShape(CLOSE);\n  ellipse(895,395,40,40);\n  beginShape();\n  vertex(872,410);\n  vertex(845,415);\n  vertex(872,425);\n  endShape(CLOSE);\n  ellipse(872,415,20,20);\n  fill(0);\n  ellipse(738,245,20,20);\n  ellipse(788,245,20,20);\n  line(750,275,770,275);\n  line(770,275,774,270);\n}\n\nvoid drawWizard(){\n  beginShape();\n  vertex(810,280);\n  vertex(730,260);\n  vertex(700,280);\n  vertex(700,300);\n  vertex(730,320);\n  vertex(810,310);\n  endShape(CLOSE);\n  line(700,280,810,295);\n  line(700,300,810,295);\n  beginShape();\n  vertex(810,280);\n  vertex(890,260);\n  vertex(920,280);\n  vertex(920,300);\n  vertex(890,320);\n  vertex(810,310);\n  endShape(CLOSE);\n  line(920,280,810,295);\n  line(920,300,810,295);\n  ellipse(750,300,20,10);\n  ellipse(870,300,20,10);\n  ellipse(811,205,20,20);\n  beginShape();\n  vertex(770,290);\n  vertex(810,210);\n  vertex(850,290);\n  endShape(CLOSE);\n  ellipse(810,300,100,100);\n  ellipse(780,350,20,10);\n  ellipse(840,350,20,10);\n  fill(0);\n  ellipse(795,280,20,20);\n  ellipse(825,280,20,20);\n  line(800,300,810,300);\n  line(810,300,815,295);\n}\n\nvoid drawMonster(){\n  PFont f = createFont(\"Arial\",50,true);\n  fill(238,207,161);\n  noStroke();\n  rect(0,48,360,515);\n  fill(50,20,0);\n   textFont(f,25);\n   text(\"Monster\",90,30);\n   text(\"Health: \", 60,550);\n   text(healthS, 180,550);\n   strokeWeight(3);\n   line(85,46,190,46);\n   strokeWeight(1);\n  stroke(0);\n  strokeWeight(2);\n  fill(255,150,0);\n  \/\/wings\n  drawWings(0);\n  \/\/tails\n  drawRTails(0);\n  if(tails >= 1)\n    drawLTails(1);\n   \/\/heads\n  drawHeads(0);\n  \/\/arms\n  drawRArms(0);\n  if(arms >= 1)\n    drawLArms(1);\n  drawLegs(0);\n  \/\/leges\n  drawLegs(0);\n  \/\/belly\n  ellipse(150,270,120,170);\n  line(90,270,100,260);\n  line(100,260,110,275);\n  line(110,275,115,263);\n  line(115,263,120,280);<\/p>\n<p>  line(92,250,102,240);\n  line(102,240,112,255);\n  line(112,255,117,243);\n  line(117,243,124,260);<\/p>\n<p>  line(92,290,102,280);\n  line(102,280,112,295);\n  line(112,295,117,283);\n  line(117,283,122,300);<\/p>\n<p>  line(210,270,200,260);\n  line(200,260,190,275);\n  line(190,275,185,263);\n  line(185,263,180,280);\n}<\/p>\n<p>void drawRArms(int arm){\n  int d = arm * 20;\n  beginShape();\n  vertex(120,230 + d);\n  vertex(80,200 + d);\n  vertex(40,200 + d);\n  vertex(40,220 + d);\n  vertex(80,220 + d);\n  vertex(120,250 + d);\n  endShape(CLOSE);\n  ellipse(40,210 + d,30,30);\n  if(arm == 0 && arms >= 2)\n    drawRArms(2);\n  if(arm == 2 && arms >= 4)\n    drawRArms(4);\n}<\/p>\n<p>void drawLArms(int arm){\n  int d = (arm - 1) * 20;\n  beginShape();\n  vertex(180,230 + d);\n  vertex(220,200 + d);\n  vertex(260,200 + d);\n  vertex(260,220 + d);\n  vertex(220,220 + d);\n  vertex(180,250 + d);\n  endShape(CLOSE);\n  ellipse(260,210 + d,30,30);\n  if(arm == 1 && arms >= 3)\n    drawLArms(3);\n  if(arm == 3 && arms >= 5)\n    drawLArms(5);\n  }<\/p>\n<p> void drawLegs(int leg){\n   int d = leg * 30;\n   if(leg == 1 || leg == 3 || leg == 5){\n     fill(0);\n   }\n   beginShape();\n   vertex(120,330 + d);\n   vertex(90,340 + d);\n   vertex(120,360 + d);\n   vertex(140,360 + d);\n   vertex(110,340 + d);\n   vertex(140,330 + d);\n   endShape(CLOSE);<\/p>\n<p>   beginShape();\n   vertex(180,330 + d);\n   vertex(210,340 + d);\n   vertex(180,360 + d);\n   vertex(160,360 + d);\n   vertex(190,340 + d);\n   vertex(160,330 + d);\n   endShape(CLOSE);\n   fill(255,150,0);\n   if(leg < legs){\n     leg++;\n     drawLegs(leg);\n   }\n }\n \n void drawRTails(int tail){\n  int d = tail * 20;\n  int d2 = 0;\n  if(tail == 2)\n    d2 = 6;\n  if(tail == 4)\n    d2 = 30;\n  beginShape();\n  vertex(92 + d2,252 + d);\n  vertex(60 + d2,170 + d);\n  vertex(50 + d2,200 + d);\n  vertex(40 + d2,150 +d);\n  vertex(5 + d2,230 + d);\n  vertex(7 + d2, 235 + d);\n  vertex(40 + d2,170  + d);\n  vertex(50 + d2,220 + d);\n  vertex(60 + d2,190 + d);\n  vertex(92 + d2,272 + d);\n  endShape(CLOSE);\n  if(tail == 0 &#038;&#038; tails >= 2)\n    drawRTails(2);\n  if(tail == 2 && tails >= 4)\n    drawRTails(4);\n}<\/p>\n<p>void drawLTails(int tail){\n  int d = (tail - 1) * 20;\n  int d2 = 0;\n  if(tail == 3)\n    d2 = 6;\n  if(tail == 5)\n    d2 = 30;\n  beginShape();\n  vertex(208 - d2,252 + d);\n  vertex(240 - d2,170 + d);\n  vertex(250 - d2,200 + d);\n  vertex(260 - d2,150 +d);\n  vertex(295 - d2,230 + d);\n  vertex(293 - d2, 235 + d);\n  vertex(263 - d2,170  + d);\n  vertex(253 - d2,220 + d);\n  vertex(243 - d2,190 + d);\n  vertex(208 - d2,272 + d);\n  endShape(CLOSE);\n  if(tail == 1 && tails >= 3)\n    drawLTails(3);\n  if(tail == 3 && tails >= 5)\n    drawLTails(5);\n  }<\/p>\n<p>  void drawHeads(int head){\n   int d = 0;\n   int d2 = 0;\n   if(head == 1){\n     d = -40;\n     d2 = 15;\n   }\n   if(head == 2){\n     d+= 40;\n     d2 = 15;\n   }\n   if(head == 3){\n     d -=40;\n     d2-=35;\n   }\n   if(head == 4){\n     d +=40;\n     d2-=35;\n   }\n   if(head == 5){\n     d2-=50;\n   }\n   beginShape();\n   vertex(140+ d,185 + d2);\n   vertex(130 + d,165 + d2);\n   vertex(130 + d,135 + d2);\n   vertex(170 + d,135 + d2);\n   vertex(170 + d,165 + d2);\n   vertex(160 + d,185 + d2);\n   endShape(CLOSE);\n   fill(255);\n   ellipse(140+ d,145 + d2,10,10);\n   ellipse(160+ d,145 + d2,10,10);\n   if(eyes >= 1){\n     ellipse(150 + d, 145 + d2,10,10);\n      for (int i = 2;i < 6 &#038;&#038; i <= eyes; i++){\n        if(i<5)\n          ellipse(140 + (10 * (i - 2)) + d, 155+ d2,10,10);\n        else\n          ellipse(150+d,165 + d2,10,10);\n      }\n   }\n   fill(0);\n   ellipse(140+ d,147 + d2,5,5);\n   ellipse(160+ d,147 + d2,5,5);\n   if(eyes >= 1){\n     ellipse(150 + d, 147 + d2,5,5);\n     for(int i = 2; i <= eyes &#038;&#038; i < 6; i++){\n        if(i<5)\n          ellipse(140 + (10 * (i - 2)) + d, 157+ d2,5,5);\n        else\n          ellipse(150+d,167 + d2,5,5);\n      }\n   }\n   line(145+d,175+d2,160+d,172+d2);\n   line(160+d,172+d2,162+d,170+d2);\n   fill(255,150,0);\n   if(head < heads){\n     head++;\n     drawHeads(head);\n   }\n }\n   \nvoid drawWings(int wing){\n  strokeWeight(7);\n  stroke(0);\n  if(wing == 0){\n    line(145,190,145,50);\n    line(145,50,115,80);\n    line(145,80,115,110);\n    line(145, 110,115,140);\n    strokeWeight(3);\n    stroke(255,150,0);\n    line(145,190,145,50);\n    line(145,50,115,80);\n    line(145,80,115,110);\n    line(145, 110,115,140);\n  }\n  if(wing == 1){\n    line(155,190,155,50);\n    line(155,50,185,80);\n    line(155,80,185,110);\n    line(155, 110,185,140);\n  }\n  if(wing ==2 || wing == 4){\n    int d = 0;\n    int d2 = 0;\n    if(wing ==4){\n      d = -10;\n      d2 = 50;\n    }\n    line(150+d,190+d2, 50+d,90+d2);\n    line(50+d,90+d2,30+d,120+d2);\n    line(65+d,105+d2, 45+d,135+d2);\n    line(80+d,120+d2, 60+d,150+d2);\n    if(wing==4){\n      strokeWeight(2);\n      stroke(255,150,0);\n      line(150+d,190+d2, 50+d,90+d2);\n      line(50+d,90+d2,30+d,120+d2);\n      line(65+d,105+d2, 45+d,135+d2);\n      line(80+d,120+d2, 60+d,150+d2);\n    }\n  }\n  if(wing==3 || wing == 5){\n    int d = 0;\n    int d2 = 0;\n    if(wing ==5){\n      d = 10;\n      d2 = 50;\n    }\n    line(150+d,190+d2, 250+d,90+d2);\n    line(250+d,90+d2,270+d,120+d2);\n    line(235+d,105+d2, 255+d,135+d2);\n    line(220+d,120+d2, 240+d,150+d2);\n    if(wing == 3){\n      strokeWeight(2);\n      stroke(255,150,0);\n      line(150+d,190+d2, 250+d,90+d2);\n      line(250+d,90+d2,270+d,120+d2);\n      line(235+d,105+d2, 255+d,135+d2);\n      line(220+d,120+d2, 240+d,150+d2);\n    }\n  }\n  strokeWeight(1);\n  stroke(0);\n  wing++;\n  if(wing <= wings){\n    drawWings(wing);\n  }\n}\n<\/script><\/p>\n<p>Here is some audio I made that I intended to use<br \/>\n<audio controls><source src=\" \nPermalink: http:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/?attachment_id=992 View Attachment Page\n\" type=\"audio\/ogg\"><\/audio> <\/p>\n<p><iframe loading=\"lazy\" width=\"584\" height=\"438\" src=\"http:\/\/www.youtube.com\/embed\/M6-e29jIePg?fs=1&#038;feature=oembed\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I got everything I originally planned on making into my game, and made a bunch of audio, but could not get the into my program. The makey makey worked relatively well and I am still happy with the finished project. &hellip; <a href=\"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/2012\/12\/14\/final-project-audio-and-video\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/posts\/1030"}],"collection":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/comments?post=1030"}],"version-history":[{"count":4,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/posts\/1030\/revisions"}],"predecessor-version":[{"id":1055,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/posts\/1030\/revisions\/1055"}],"wp:attachment":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/media?parent=1030"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/categories?post=1030"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/tags?post=1030"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}