Programming Guide

The easiest way to understand the programming model of UltraDMD is through the example table.

download test table (for v1.0.140215)
download test table (for v1.0.140209)
download test table (for v1.1.150125)

Quick Start

Call LoadUltraDMD in your TableInit. You can include this sub routine nearly as it is here. The only required change would be the project folder. All of your assets go into the project folder. This folder can be anything you want, but I have been placing the assets into a subfolder of the same name as the table with a “.UltraDMD” extension. It seems like a reasonable convention.

Dim UltraDMD

Sub LoadUltraDMD
    Set UltraDMD = CreateObject("UltraDMD.DMDObject")
    If UltraDMD is Nothing Then
        MsgBox "No UltraDMD found.  This table MAY run without it."
        Exit Sub
    End If

    UltraDMD.Init
    If Not UltraDMD.GetMajorVersion = 1 Then
        MsgBox "Incompatible Version of UltraDMD found."
        Exit Sub
    End If

    If UltraDMD.GetMinorVersion < 1 Then
        MsgBox "Incompatible Version of UltraDMD found. Please update to version 1.1 or newer."
        Exit Sub
    End If

    Dim fso
    Set fso = CreateObject("Scripting.FileSystemObject")
    Dim curDir
    curDir = fso.GetAbsolutePathName(".")
    UltraDMD.SetProjectFolder curDir & "\test.UltraDMD"
End Sub

Call OnScoreboardChanged any time the score, number of credits, or ball number changes.

Dim numPlayers
Dim curPlayer
Dim p1Score
Dim p2Score
Dim p3Score
Dim p4Score
Dim numCredits
Dim ballNum

Sub OnScoreboardChanged()
    'If we're in the middle of a scene, don't interrupt it to display the scoreboard.
    If Not UltraDMD.IsRendering Then
        UltraDMD.DisplayScoreboard numPlayers, curPlayer, p1Score, p2Score, p3Score, p4Score, "credits " & CStr(numCredits), "ball " & CStr(ballNum)
    End If
End Sub

Reference

The programming interface provides a reference for the interface, methods and parameters for UltraDMD.

Programming Reference

Feature TO DO List

In the name of transparency, I will be listing the feature requests here.

  • Support for invert X or invert Y
  • Scoreboard optimized for single player mode
  • Scene priority
  • Ability to freeze a scene
  • Bonus scene with countdown
  • More object model centric interface
  • Build an audio queue that can be synchronized with the scene queue

2 thoughts on “Programming Guide

  1. TomW's avatarTomW

    I’m having trouble making the DisplayText call work, I get a type mismatch, but its a pretty straightforward call DisplayText, MyText,10,10 Any trick to this call ? I can’t find an example in any of the test tables. Thanks

    Reply

Leave a comment