WWTBAM Three - JS Controller
WWTBAM Three - JS Controller
js Classic Controller
This program is built in WebGL using the Three.JS framework which means that it should run
virtually the same in any modern major web browser that supports WebGL, except Internet
Explorer (which you should not be using anymore anyway). A modest PC with good processing
capabilities is recommended. Base test shows that the application uses around 140 to 150
megabytes of memory.
If you refresh the web page to start a new instance it is best to perform a hard refresh which
is usually done by pressing and holding CTRL (CMD on Mac) and the F5 key. If the application
starts to lag you may need to check the memory usage in your web browser by pressing the
F12 key and going to the “Memory” tab (terminology may be different in other browsers,
Chrome is used in this example). Once the memory usage gets around 500 megabytes and a
hard refresh does not work, you may start to notice lag. If this happens, it is advised to just
close the browser and open a new instance.
The controller was built around a standard PC keyboard layout. Other keyboard variations
may not work or may require you to alter the “keyCode” values in the “keyboardControl.js”
file to make it work but you must know what you are doing.
Controller Setup
Settings
There are a number of settings that you can control that are defined in the
“customizableVariables.js” file inside the scripts folder. The details of each variable that you
can control should either be self-explanatory or will be noted with a comment detail
explaining what it does. Unless you know what you are doing, you are advised to stay out of
the other files.
Installation
The process of setting up the controller in a web server environment is the same as the
original HTML5 controllers, so you can follow the original documentation on how to setup the
original HTML5 controllers. However… there is going to be a slight difference with the setup
of this and future WWTBAM Three.js controllers. As you will see in the image below, there
will be a host of “SharedResources” that will be common to this and future controllers built in
Three.JS, such as sounds, APIs, graphics, etc. The game plan is that when the newer Three.JS
controllers come into play (super, clocked, shuffle, 2016, UK, etc…), all you will need to do is
drop the newer controllers into this corresponding folder called “Millionaire3D” and go from
there. All future contents should merge with existing folders without issue.
*** The next four keys CANNOT be performed using the numeric keypad located on the
right side of the standard keyboard. You must use the ones located above the main letters
Q W E R. ***
Keys 1 through 4 – These keys lock in answer A through D respectively. When all
answers have been revealed press any one of these keys to lock in a corresponding
answer. If an answer has been removed by the fifty-fifty lifeline, you will not be able
to lock it in.
*** The next set of keys CANNOT be performed using the arrow controls sometimes
located on A, S, D, and W keys OR the arrows located in the numeric keypad on the right
of the keyboard (2, 4, 6, and 8). You must use the arrow keys located below the "Home,
End, Insert, Delete etc." keys on the standard keyboard. ***
Left Arrow Key - This key has a dual purpose. It is used for all functions related to
fastest finger and the money tree. If you use the fastest finger mode, all fastest finger
animations are done first followed by the money tree animations. Else, the money tree
animations take over by default.
o Fastest Finger – All presses animate through the fastest finger sequence from
lights down to the contestant taking a seat in the hot seat.
o Money Tree – All presses animate through the run through of the money tree.
Once the tree is toggled off, each press thereafter toggles it back on or off.
The tree automatically updates as a contestant progresses through the game.
Right Arrow Key - This key is used for all functions from the point where the lights
down sound plays to the correct answer being shown and hidden. Pressing this key
repeatedly navigates the question and answer animations. After the fourth answer is
revealed this key becomes unresponsive until a final answer is given. Then resume
pressing this key until the correct answer is revealed and hidden and any money won is
revealed and hidden. If an incorrect answer was given, once the question leaves the
screen, take over with the “W” key to finish out the walk away sequence.
o Also, as an added shortcut, if the money tree is toggled on after a previous
question is answered correctly, you can press this key with the tree still
showing after the lights down sound has been played to take the money tree of
and go straight into the question. This will eliminate having to manually turn
the money tree back off before beginning a new question.
Up / Down Keys – Not used in this controller edition.