Jam-o-Drum

From ETC Public Wiki
Revision as of 14:31, 13 October 2019 by Yikaih (talk | contribs) (Design Guidelines & Tips)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Jam-o-Drum is a beloved platform developed by ETC students. Jam-o-Drum is based on a four-mice system. Spinning is map to rolling up and down, and hitting is map to left click.

Jam-o-Drum was running on Panda3D for a long time, but it did not fit in Unity3D since the current version of Unity3D does not support multiple mice. Thanks to Bryan Maher's work in building a server reading mouse raw input from Windows and sending data to Unity3D via network, we have our Jam-o-Drum back.

Getting Started

Device Setup

In order to Jam-o-Drum world, you need to launch the Jam-o-Drum server and do calibration.

  1. Turn on Jam-o-Drum projector.
  2. Launch JamoDrumServer.exe.
  3. As its instruction, hit Pad 1 to 4 in order to calibrate.
  4. Once the the calibration is done, keep the server window (Do NOT quit the server).
  5. Run your Jam-o-Drum world.

IMPORTANT: Always turn off the projector when you leave!

Basic Setup

The pre-built Unity package (link below) includes everything required to start running your world. To install, simply import the package, and all of the required assets will appear in your project.

The following items are included within the package:

Plugins

  • JamoDrumClient.dll - This is Jam-o-Drum client that gets data from the server.

Scripts

  • JamoDrum.cs - This is the script that gets data from Jam-o-Drum client to Unity3D.

Textures

  • table_template.psd - This is the template mask for Jam-o-Drum. You can develop your basic interface based on this file.

Scene Setup

Before building your world, you need to set your project:

  1. Use 1280x960 or 1024x768 resolution with 4:3 ratio. This is the resolution for Jam-o-Drum projector. You should set Canvas Scale Mode to Scale with Screen Size and the Reference Resolution of 1024x768 and Match with Height in your Canvas Scaler in Unity to fit with other possible resolutions.
  2. Use full screen mode, unless you have a very good reason not to.
  3. Hide cursor. It is EXTREMELY important for Jam-o-Drum. (This is done in the JamoDrum.cs script)

Then you can attach JamoDrum.cs script to one of you game objects and start development.

Programming Information

JamoDrum.cs

  • spinDelta - a int[] represents the difference of spinners between current frame and last frame.
  • hit - a int[] represents whether the pad has been hit during the time between last frame and current frame.
  • void AddSpinEvent(SpinEventHandler func) - Method "func" will be called when some spinners get spun. "func" should be of form "func(int controllerID, int delta)". (Refer to "void HandleJodSpin(int controllerID, int delta)")
  • void AddHitEvent(HitEventHandler func) - Method "func" will be called when some pads get hit. "func" should be of form "func(int controllerID)". (Refer to "void HandleJodHit(int controllerID)")

Simulators

It is important to create a simulator for testing the Jam-o-Drum so that you don't have spend so much time in the platform room. You can use four mice but isn't the most efficient way to test. The Unity package provides the [JamoKeySimulator] script so that you can use your keyboard to test your world. Note that it will only respond to to the event handlers you registered, the spinDelta and hit will not change then.

Archive

In the resources section there is a modified version of Jam-o-Drum.cs which allows to create a unity-based simulator, it includes an example simulator that uses the keyboard to simulate the drums.

Thread Errors

If you receive and error about something that "can only be called from the main thread.", this is caused by multithreaded nature of the Jam-o-Drum client. In the resources section there is a new version of JamoDrum.cs which takes care of this threading issue in the background and is 100% backwards compatible with existing projects.

Networking Issues

Sometimes you may fail to start to JamoDrum Client or you fail to receive JamoDrum input from the client script. There is a script [JamoDrumServerSimulator] that can help you diagnose if this is a network problem. It will simulate messages from the Jam-o-Drum server to help you test your client connection.

Art (2D & 3D) Information

  • There is a template mask file table_template.psd for Jam-o-Drum provided in the Unity package below. You can develop your basic interface based on this file.
  • Jam-o-Drum games are usually designed with a top-bottom view and an orthographic camera. Think of how your art assets will be like in that perspective and avoid the characters or models being too hard to recognize for players.

Sound Information

The speaker for Jam-o-Drum (in BVW room) is a little bit old and works better for low frequency cases. Do not increase the volume too much cause the whole building will hear your world :(

Design Guidelines & Tips

  • It can be a challenge in Jam-o-Drum worlds to let the players understand where they are and what their goal is in a very short time. Playtesting could help you figure it out.
  • Be careful of character models because in the top-down view they will be more difficult to get recognized.

Resources & Example Projects

Unity Package

The Jam-o-Drum template mask and key simulator are included in this package.

Jam-o-Drum Server

Archive

Previous ETC Projects

BVW

Currently there is no BVW-specific information to know about Jam-o-Drum.

Contact

If you have any question or if you are interested in further development, please contact [Bryan Maher].