{"id":197,"date":"2018-11-28T16:11:03","date_gmt":"2018-11-28T16:11:03","guid":{"rendered":"https:\/\/projects-old.etc.cmu.edu\/miracle-workshop-2\/?page_id=197"},"modified":"2018-12-02T23:24:19","modified_gmt":"2018-12-02T23:24:19","slug":"interface","status":"publish","type":"page","link":"https:\/\/projects-old.etc.cmu.edu\/miracle-workshop-2\/index.php\/support\/in-depth\/interface\/","title":{"rendered":"Touch-screen Interface"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">Tom Foolery is a five function audio animatronic puppet created by the Miracle Workshop team at Carnegie Mellon University\u2019s Entertainment Technology Center. The puppet was installed at Give Kids the World Village in Kissimmee, Florida. The code for the touch screen interface that the staff at the village can use to control Tom Foolery can be found\u00a0<\/span><a href=\"https:\/\/github.com\/rajat-gupta13\/TomFoolery\"><span style=\"font-weight: 400;\">here.<\/span><\/a><\/p>\n<p><b>Before you begin:<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">You will need an IDE that supports JavaFX. We used JetBrains IntelliJ, but anything else would also work like Eclipse.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">You will also need the JDK 8u191 and JRE installed. You can find them\u00a0<\/span><span style=\"font-weight: 400;\"><a href=\"https:\/\/www.oracle.com\/technetwork\/java\/javase\/downloads\/jdk8-downloads-2133151.html\">here<\/a>.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">The interface is designed to have a show queue system at the start where, players can choose what shows they want to play, review their selection and then play through the entire show. <\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">There will always be one Start show and one End show but the staff can decide whether to choose any of the Middle shows including the Seasonal Content.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Once the staff are done selecting shows, they can start playing shows. The first screen on a show is always the title screen with the Start show button that plays the first and sometimes only dialogue of the show.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">After the specified amount of delay, the Play Next Dialogue button appears which triggers the next dialogue. In some shows, there are additional dialogue options. <\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">At the end of each show, there will be a Next button leading to the next show in the queue or an End Show button leading to the Main Menu.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">On each button press of the Play Next Dialogue or the Main Menu, the Animatronic is faded from its current position to its central idle position in the specified amount of time to avoid snapping in the animatronic. This means there is a delay of the specified time before which the next dialogue is played. For more information on Tom&#8217;s snapping problem you con go <a href=\"https:\/\/projects-old.etc.cmu.edu\/miracle-workshop-2\/index.php\/2018\/12\/02\/solving-toms-snapping-problem\/\">here.<\/a><\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">The Default resolution of the Touch Screen Interface is 1920&#215;1080. Whenever you create a new page, make sure to make the changes to .fxml file so that the aspect ratio of the pane is maintained.<\/span><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p><b>Classes:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Open \/src\/sample\/<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Class<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Main.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">This is the most important default class that is used to build and run the entire application. It opens the page sample.fxml that contains the Main Menu.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Controller.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">This is the default class linked to sample.fxml. It controls the Power on Tom being toggled On\/Off. It also leads to the Admin Panel or the Show Selection screens.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Method.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">This is the class that all the show classes creates objects of to access all the methods. This is the most important class in the application. Some of the methods in the class are: <\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">SendInstructionToWeigl(String s): It sends the ASCII command stored in the String \u201cs\u201d as a Datagram packet to the Weigle show controller.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">ResetAllPositions(float fadeTime): It sends ASCII commands to the show controller to fade the functions of Tom to their central idle position in fadeTime seconds.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">ShowSceneFunction(Parent pageone, javafx.event.ActionEvent event): When called displays the .fxml Page that was assigned to pageone.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">ShowSelector(): Called on the Next button presses at the end of a show to check which is the next show in the queue.<\/span><\/li>\n<\/ol>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">AdminLogin.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Class for the login screen to the Admin Panel. Connected to AdminLogin.fxml.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">AdminPanel.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Class for the Admin Panel. Calisthenics and Thank You Sponsors show is currently active. Optionally add the Control Functions screen. Connected to AdminPanel.fxml.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Calisthenics.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Class for the Calisthenics of Tom\u2019s functions. The functions can be operated individually or together. Once started, the calisthenics will keep on playing until the user manually presses the Stop button. Connected to Calisthenics.fxml.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">ThankYouSponsors.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Class for the Thank You Sponsors show. The show has 4 dialogues. Connected to ThankYouSponsors.fxml<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">StartShows.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Class for selecting a Start show to add to show queue. The staff can select either the Welcome Castle show or the Magic Trick show. A selection needs to be made to proceed. Connected to StartShows.fxml<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">MiddleShows.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Class for selecting Middle shows to add to show queue. No selections is required to be made to proceed to the next page. The staff can select one of four Dance Parties, a Storytime show or a selection of Seasonal Content that are displayed on a separate page. More than one item can be selected. Connected to MiddleShows.fxml<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">SeasonalContent.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Class for selecting Seasonal Content to add to show queue. Only one show can be selected. The options are Christmas; Easter; Halloween; Hanukkah; Happy Birthday; Happy Birthday Mayor Clayton; 4th of July; Labor Day; Thanksgiving and Veterans Day. Connected to SeasonalContent.fxml. Pressing the Next button returns to the Middle Shows page.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">EndShows.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Class for selecting an Endshow to add to show queue. The staff can select either the Goodnight Castle show or the See Ya Later show. A selection needs to be made to proceed. Connected to EndShows.fxml<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">ReviewSelection.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Class for Reviewing the Selections made. The shows in the queue will be displayed. There is a minimum of 2 shows that will always be played and a maximum of 5 shows. Connected to ReviewSelections.fxml<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">WelcomeCastle1.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Class for the Welcome Castle show. The show has 7 dialogues. Connected to WelcomeCastle1.fxml<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">MagicTrick1.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Class for the Magic Trick show. The show has 7 dialogues. Connected to MagicTrick1.fxml<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">DanceParty1.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Class for the Dance Party show. The show has 7 dialogues. Connected to DanceParty1.fxml. A few dialogues have additional capability of adding \u201cYes\u201d before the next dialogue if the guests know the answer to a particular joke. There are 4 types of Dance Parties, a Long 5 minute one, a short 2 minute 30 seconds one, a Christmas Dance Party mix and an empty Dance animation where the staff can play their own music selection.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Storytime1.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Class for the Storytime show. The show has 8 dialogues. Connected to Storytime1.fxml. The last dialogue in the show is chosen depending on what end show is selected. A few dialogues have additional capability of adding \u201cYes\u201d before the next dialogue if the guests know the answer to a particular joke. There are extra responses when Tom is asking the guests about their favorite books. There are responses when the book is being read to the guests.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">GoodnightCastle1.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Class for the Goodnight Castle show. The show has 7 dialogues. Connected to GoodnightCastle1.fxml. The last 3 dialogues of the show are played one after the other and are automatically triggered. The last dialogue triggers the interaction with the Father Time animatronic in the castle.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">SeeYaLater1.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Class for the See Ya Later show. The show has 5 dialogues. Connected to SeeYalater1.fxml<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Christmas.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Class for the Seasonal Content Christmas show. The show has 5 dialogues. Connected to Christmas.fxml<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Easter.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Class for the Seasonal Content Easter show. The show has 1 dialogue. Connected to Easter.fxml<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Halloween.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Class for the Seasonal Content Halloween show. The show has 2 dialogues. Connected to Halloween.fxml<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Hanukkah.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Class for the Seasonal Content Hanukkah show. The show has 1 dialogues. Connected to Hanukkah.fxml<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">HappyBirthday.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Class for the Seasonal Content Happy Birthday show. The show has 1 dialogues. Connected to HappyBirthday.fxml<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">HappyBirthdayClayton.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Class for the Seasonal Content Happy Birthday Mayor Clayton show. The show has 1 dialogues. Connected to HappyBirthdayClayton.fxml<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">IndependenceDay.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Class for the Seasonal Content 4th of July show. The show has 1 dialogues. Connected to IndependenceDay.fxml<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">LaborDay.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Class for the Seasonal Content Labor Day show. The show has 1 dialogues. Connected to LaborDay.fxml<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Thanksgiving.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Class for the Seasonal Content Thanksgiving show. The show has 1 dialogues. Connected to Thanksgiving.fxml<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">VeteransDay.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Class for the Seasonal Content Veterans Day show. The show has 1 dialogues. Connected to VeteransDay.fxml<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">ControlFunctions.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">[EXPERIMENTAL] Class to toggle the functions on Tom On\/Off. The functions last tested were still in Beta on the version 3.25 of the Show Controller. Connected to the ControlFunctions.fxml<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">OpeningCeremony.java<\/span><\/td>\n<td><span style=\"font-weight: 400;\">[EXTRA] Class for Special Opening Ceremony show that was played on 11\/09\/2018 at the Give Kids the World Village. Not part of final build.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>Tom Foolery is a five function audio animatronic puppet created by the Miracle Workshop team at Carnegie Mellon University\u2019s Entertainment Technology Center. The puppet was installed at Give Kids the World Village in Kissimmee, Florida. The code for the touch screen interface that the staff at the village can use [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":191,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-197","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/projects-old.etc.cmu.edu\/miracle-workshop-2\/index.php\/wp-json\/wp\/v2\/pages\/197"}],"collection":[{"href":"https:\/\/projects-old.etc.cmu.edu\/miracle-workshop-2\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/projects-old.etc.cmu.edu\/miracle-workshop-2\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/projects-old.etc.cmu.edu\/miracle-workshop-2\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/projects-old.etc.cmu.edu\/miracle-workshop-2\/index.php\/wp-json\/wp\/v2\/comments?post=197"}],"version-history":[{"count":7,"href":"https:\/\/projects-old.etc.cmu.edu\/miracle-workshop-2\/index.php\/wp-json\/wp\/v2\/pages\/197\/revisions"}],"predecessor-version":[{"id":307,"href":"https:\/\/projects-old.etc.cmu.edu\/miracle-workshop-2\/index.php\/wp-json\/wp\/v2\/pages\/197\/revisions\/307"}],"up":[{"embeddable":true,"href":"https:\/\/projects-old.etc.cmu.edu\/miracle-workshop-2\/index.php\/wp-json\/wp\/v2\/pages\/191"}],"wp:attachment":[{"href":"https:\/\/projects-old.etc.cmu.edu\/miracle-workshop-2\/index.php\/wp-json\/wp\/v2\/media?parent=197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}