Dojo Pong

Dojo Pong

How to Play Dojo Pong

Dojo Pong has been designed to run reasonably well in several dramatically different environments, and the nature of its controls will thus vary from one to the other. There are however a few things common to every manifestation. The controls for both number of players and number of balls should be pretty obvious, and the player one position simply allows one to choose how the individual players are arranged around the “table”. The score boxes show both the number of times a player may miss before being eliminated (the big number) and the number of times the player has successfully volleyed a ball. When a player gets eliminated, the number of misses remaining gets replaced with a ranking number. This gives the game a fair amount of flexibility; the winner can be the last one standing or the one with the most volleys.

On a Desktop or Laptop

Within a computer browser Dojo Pong is primarily controlled via the keyboard. Different keyboards vary, however, and so generally multiple key controls are available for each player, usually only some of which will be available for a given keyboard.

Player 1
The cursor control keys are used to move player 1.
Player 2
The numerical keypad may be used for movement if available. When it is lacking, the regular 2, 4, 6, and 8 number keys may be used instead.
Player 3
Page Up and Page Down may be used when available with w, a, z, and s being alternatives.
Player 4
The ,, ., ;, and / may be used with F18 and F19 additionally being functional on some keyboards.

On the Wii

Within the Wii Internet Channel, Dojo Pong is primarily controlled with one to four Wiimotes. The D-pad on each Wiimote controls one player; it does not matter where the Wiimotes are pointed. If the Wii has a keyboard attached it may be used in the same manner as the desktop keyboard described above.

While every effort is made to scale the playing area appropriately, there is a lot of variability with how individual televisions display Wii output. The plus and minus keys on the primary Wiimote may be used to scale the display up and down respectively, and the B key on the primary Wiimote may be used to shift the display in any direction.

If your Wii does not yet have the Internet Channel, it is a free download from the Wii Shop Channel.

On an iOS Device (iPad, iPhone, iPod Touch)

Within Mobile Safari Dojo Pong is controlled pretty naturally by touching a paddle with a single finger and dragging it to its desired destination. It is a bit sensitive to location (it has to be so as not to mistake one player for another) so accuracy counts. Please note that Bluetooth keyboards are presently not supported like ordinary keyboards on the other platforms due to a limitation in the way Mobile Safari presently treats them.

Mobile Safari tends to crash pretty easily if multiple tabs are open, so it is recommended that other tabs be closed before trying to play it. Better still, use the “Add to Home Screen” option and play it that way. It will not only be more stable, but will take advantage of the entire screen. Performance will also be significantly better when the device gets periodically rebooted.

About Dojo Pong

Dojo Pong is an attempt to show how one may use JavaScript and the Dojo Toolkit to create games that will run on the desktop, in modern tablets and mobiles, plus specialty platforms like the Wii and the OLPC XO.

It works through the magic of Web standards. Besides JavaScript it uses HTML5 and CSS3 to get the job done, but is pretty careful about reasonable fallbacks so even some surprisingly old browsers will still be able to run it. The graphics (such as they are) are created via DojoX GFX and will thus render via SVG, Canvas, or even VML and will consequently run almost everywhere and look good on displays both big and small. In new enough environments it supports offline play and on many platforms it is installable.

Its very flexibility can make things tough. For example, if its host platform has trouble keeping up due to processor limitations, it will have trouble catching all cases of a paddle blocking a ball. This results from a combination of the minimum interrupt time supported by JavaScript within the host environment and the programming to the most primitive rendering environment. A better JavaScript engine will give better results.

Please note again that it is meant to be a demonstration of how such games may be constructed; while it may actually be pretty fun (and often quite challenging) in various configurations on various platforms, its main purpose is to be pedagogical. Its source may be browsed or downloaded as a tarball courtesy of Saugus.net.

Player 1 Player 2 Player 3 Player 4
9 9 9 9
0 0 0 0