Tutorial Future Pinball: C. Simple DMD Highscore Illustrated

Gimli

Pinball Master
Joined
Feb 6, 2020
Messages
1,341
Reaction score
882
Points
120
Favorite Pinball Machine
Monster Bash
I hope you are not getting Tutorialled to death, but I thought I'd offer just one more and then crawl back under my rock.

Simple HighScore DMD's for all comers.

Heres a youtube video demonstrating this tutorial:


This procedure should work in existing table DMD's or in newly created DMD's in conjuntion with my previous tutorials (Simple DMD's, Simple FutureDMD's, Simple Animated FutureDMD's). To accomplish this you will need to check for the name of the DMD where you wish the DMD Highscore to be displayed. For use with the Animated FutureDMD's an apostrophe needs to be removed from 5 places to ShutbackgroundsOff() while highscore is being displayed. This will be described at the end of the tutorial.

This should be straight forward as we're merely copy 'n pasting Francisco666's routine from Apollo13. I changed a few names to English and that's it.
I used this procedure for the recent ZED 1.1 Gilligan's Island release and it seems to work well. So good luck and remember to credit Francisco666 if you use this in a submitted table. These are highly confidential trade secrets, so be quiet about it
:)


Procedure :
1.Table Prep Import 2 Fonts and Create 2 Timers
2. Disable Hud HighScore
3. Enable DMD HighScore (Copy 'N Paste)
4.Set Left and Right Flippers for changing between letters (Copy 'N Paste)
5.Set Plunger for Selecting Letter (Copy 'N Paste)
6.Scripting to make it all work (Copy 'N Paste)

1. Table Prep
A. Import 2 Fonts from Apollo13 (or from other tables if you want different look)

AFontmanager.jpg


Last edited by Gimli on Wed Apr 26, 2017 3:01 pm, edited 9 times in total.
 
Last edited:
Select fonts
jm_9.dmdf
dmd06x07p.dmdf (most tables already have this by default)

For these DMDF's see attachment



Last edited by Gimli on Sat Nov 29, 2014 12:20 pm, edited 2 times in total.Bfontselect.jpg
 

Attachments

  • DmdFonts2.zip
    14.6 KB · Views: 107
Last edited:
Click ok


CFontmanagerok.jpg
 
Last edited:
B. Create 2 Timers
Go to Translite under Table Editor and create these 2 timers:

TIMEDmoveletters
afterhseob

Dcreatetimer.jpg
 
Last edited:
C. Check the DMD name to enter in script below (described at the end)

EDmdName.jpg

Last edited by Gimli on Sat Nov 29, 2014 12:23 pm, edited 1 time in total.
 
Last edited:
2.Disable Hud HighScore

Under "Sub EndOfBallTimer_Expired()" Just put an apostrophe ' in front of two statements to inactivate them as follows:

'bEnteringAHighScore = TRUE
'EnterHighScore(CurrentPlayer)



Last edited by Gimli on Sat Nov 29, 2014 1:58 pm, edited 1 time in total.EDisableHudHIghscore.jpg
 
Last edited:
3.Enable DMD Highscore

Just below the last statements you just changed under If (BallsRemaining(CurrentPlayer) <= 0) Then

Copy 'N Paste :
Code:
Code:
If nvScore(CurrentPlayer)<nvHighScore(10)then

EndOfBallComplete()

exit sub

End if

if nvScore(CurrentPlayer)>nvHighScore(10)then

'ShutBackgroundsOff()

SelectLetter=1

letter1=64

letter2=32

letter3=32

letter4=32

benterhighscoremode=true

highscoremoveright=true

TIMEDmoveletters.set true,500

moveletterhs

exit sub

  End if
FEnableDMDHighscore.jpg
 
Last edited:
4. Set Left and Right Flippers for changing between letters

under "If (KeyCode = GetKeyCode(LeftFlipperKey)) Then"
Copy 'N Paste:

Code:
Code:
if benterhighscoremode=true then

'ShutBackgroundsOff()

PlaySound "Flipper"

highscoremoveright=false

moveletterhs

exit sub

            end if



and under "If (KeyCode = GetKeyCode(RightFlipperKey)) Then"
Copy 'N Paste:
Code:
Code:
if benterhighscoremode=true then

'ShutBackgroundsOff()

PlaySound "Flipper"

highscoremoveright=true

moveletterhs

exit sub

            end if

GLeftFlipper.jpg
 
Last edited:
Set Plunger for Selecting Letter (Copy 'N Paste)

under "If (KeyCode = GetKeyCode(PlungerKey)) Then"
Copy 'N Paste:

Code:
Code:
if benterhighscoremode=true then

'ShutBackgroundsOff()

PlaySound "plungerrelease"

if ChangeLetter=63 then'End the entername

endselection

exit sub

end if

if ChangeLetter=62 then'Backspace

if SelectLetter=1 then

exit sub

end if

if SelectLetter=2 then

letter2=64

end if

if SelectLetter=3 then

letter3=64

end if

SelectLetter=SelectLetter-1

highscoremoveright=true

moveletterhs

highscoremoveright=false

moveletterhs

exit sub

end if

SelectLetter=SelectLetter+1

if SelectLetter=>4 then

SelectLetter=4

ChangeLetter=63

end if

highscoremoveright=true

moveletterhs

highscoremoveright=false

moveletterhs

exit sub

         end if
HUnderPlunger.jpg
 
Last edited:
6.Scipting to make it all work (Copy 'N Paste)

Above "Drain / Plunger Functions "
Copy 'N Paste:

Code:
Code:
'HIGH SCORE DMD DISPLAY ROUTINE

'-----------------------------------------------------------------------------

sub TIMEDmoveletters_expired

TIMEDmoveletters.set false

moveletterhs

end sub





dim ChangeLetter'Selected initial

dim letter1'Name Initial 1

dim letter2'Name Initial 2

dim letter3'Name Initial 3

dim letter4'END letter



DIM ADER1

DIM ADER2

DIM ADER3

DIM ADER4

DIM ADER5

DIM ADER6

DIM ADER7

DIM AIZQ1

DIM AIZQ2

DIM AIZQ3

DIM AIZQ4

DIM AIZQ5

DIM AIZQ6

DIM AIZQ7



dim benterhighscoremode'Mode flag

dim SelectLetter'We are chosing the 1,2,3 letter, move up with enter

dim highscoremoveright'Move right true right flipper. false left flipper

dim tempnvname

dim giveacredit

dim temphsscore

dim tempposition





ChangeLetter=64





' 62 IS THE backspace

' 63 IS THE END

' 64 IS THE Space



Function FormatScore(num)

Dim n, f, s

n = CStr(num)

f = ""



do while len(n)>3

if len(f)>0 then

f = Right(n, 3) & "," & f

else

f = Right(n, 3)

end if

n = Left(n, Len(n)-3)

loop

if len(n)>0 then

if len(f) > 0 then

f = n & "," & f

else

f = n

end if

end if

FormatScore = f

End Function



Sub moveletterhs

if highscoremoveright=true then

ChangeLetter=ChangeLetter+1

IF ChangeLetter>90 THEN

ChangeLetter=62

END IF

end if

if highscoremoveright=false then

ChangeLetter=ChangeLetter-1

IF ChangeLetter<62 THEN

ChangeLetter=90

END IF

end if





ADER1=ChangeLetter+1

IF ADER1>90 THEN

ADER1=62

END IF

ADER2=ADER1+1

IF ADER2>90 THEN

ADER2=62

END IF

ADER3=ADER2+1

IF ADER3>90 THEN

ADER3=62

END IF

ADER4=ADER3+1

IF ADER4>90 THEN

ADER4=62

END IF

ADER5=ADER4+1

IF ADER5>90 THEN

ADER5=62

END IF

ADER6=ADER5+1

IF ADER6>90 THEN

ADER6=62

END IF

ADER7=ADER6+1

IF ADER7>90 THEN

ADER7=62

END IF



AIZQ1=ChangeLetter-1

IF AIZQ1<62 THEN

AIZQ1=90

END IF

AIZQ2=AIZQ1-1

IF AIZQ2<62 THEN

AIZQ2=90

END IF

AIZQ3=AIZQ2-1

IF AIZQ3<62 THEN

AIZQ3=90

END IF

AIZQ4=AIZQ3-1

IF AIZQ4<62 THEN

AIZQ4=90

END IF

AIZQ5=AIZQ4-1

IF AIZQ5<62 THEN

AIZQ5=90

END IF

AIZQ6=AIZQ5-1

IF AIZQ6<62 THEN

AIZQ6=90

END IF

AIZQ7=AIZQ6-1

IF AIZQ7<62 THEN

AIZQ7=90

END IF



MyNewDMD.AddFont 30, "jm_9"

MyNewDMD.AddFont 11, "dmd06x07p"

MyNewDMD.AddFont 8, "dmd05x05p"

AddDebugText "seleccionandoletra "&SelectLetter

AddDebugText "ChangeLetter"&ChangeLetter



select case SelectLetter



case 1

letter1=ChangeLetter

MyNewDMD.Text= "[f11][XC][Y1]PLAYER"&(CurrentPlayer)&" ENTER INITIALS[f30][x50][y10]"&CHR(letter1)&"[f30][x60][y10]"&CHR(letter2)&"[f30][x70][y10]"&CHR(letter3)&"[BF][box2,61,20,69,30][/BF][f30][XC][Y21]"&CHR(AIZQ7)&CHR(AIZQ6)&CHR(AIZQ5)&CHR(AIZQ4)&CHR(AIZQ3)&CHR(AIZQ2)&CHR(AIZQ1)&" [f30][X62][Y21]"&CHR(ChangeLetter)&"[f30][X72][Y21]"&CHR(ADER1)&CHR(ADER2)&CHR(ADER3)&CHR(ADER4)&CHR(ADER5)&CHR(ADER6)&CHR(ADER7)

case 2

letter2=ChangeLetter

MyNewDMD.Text= "[f11][XC][Y1]PLAYER"&(CurrentPlayer)&" ENTER INITIALS[f30][x50][y10]"&CHR(letter1)&"[f30][x60][y10]"&CHR(letter2)&"[f30][x70][y10]"&CHR(letter3)&"[BF][box2,61,20,69,30][/BF][f30][XC][Y21]"&CHR(AIZQ7)&CHR(AIZQ6)&CHR(AIZQ5)&CHR(AIZQ4)&CHR(AIZQ3)&CHR(AIZQ2)&CHR(AIZQ1)&" [f30][X62][Y21]"&CHR(ChangeLetter)&"[f30][X72][Y21]"&CHR(ADER1)&CHR(ADER2)&CHR(ADER3)&CHR(ADER4)&CHR(ADER5)&CHR(ADER6)&CHR(ADER7)

case 3

letter3=ChangeLetter

MyNewDMD.Text= "[f11][XC][Y1]PLAYER"&(CurrentPlayer)&" ENTER INITIALS[f30][x50][y10]"&CHR(letter1)&"[f30][x60][y10]"&CHR(letter2)&"[f30][x70][y10]"&CHR(letter3)&"[BF][box2,61,20,69,30][/BF][f30][XC][Y21]"&CHR(AIZQ7)&CHR(AIZQ6)&CHR(AIZQ5)&CHR(AIZQ4)&CHR(AIZQ3)&CHR(AIZQ2)&CHR(AIZQ1)&" [f30][X62][Y21]"&CHR(ChangeLetter)&"[f30][X72][Y21]"&CHR(ADER1)&CHR(ADER2)&CHR(ADER3)&CHR(ADER4)&CHR(ADER5)&CHR(ADER6)&CHR(ADER7)

case 4'END

letter4=ChangeLetter

MyNewDMD.Text= "[f11][XC][Y1]PLAYER"&(CurrentPlayer)&" ENTER INITIALS[f30][x50][y10]"&CHR(letter1)&"[f30][x60][y10]"&CHR(letter2)&"[f30][x70][y10]"&CHR(letter3)&"[f30][x80][y10]"&CHR(letter4)&"[/b][BF][box2,61,20,69,30][/BF][f30][XC][Y21]"&CHR(AIZQ7)&CHR(AIZQ6)&CHR(AIZQ5)&CHR(AIZQ4)&CHR(AIZQ3)&CHR(AIZQ2)&CHR(AIZQ1)&" [f30][X62][Y21]"&CHR(ChangeLetter)&"[f30][X72][Y21]"&CHR(ADER1)&CHR(ADER2)&CHR(ADER3)&CHR(ADER4)&CHR(ADER5)&CHR(ADER6)&CHR(ADER7)



end select

end sub



sub thehseseste

afterhseob.set true,1800

if giveacredit=true then

giveacredit=false

PlaySound"knocker"

PlaySound"knocker_"

nvCredits = nvCredits + 1

end if

'ShutBackgroundsOff()

MyNewDMD.Text= "[f8][XC][Y0]PLAYER "&(CurrentPlayer)&" TOTAL [f8][XC][Y12]"&formatnumber(FormatScore(temphsscore), 0, -1, 0, -1)&"[f8][xc][y22]"&tempnvname&" RANK " &tempposition

'MyDmd.Text= "[f1][XC][Y0]PLAYER "&(CurrentPlayer)&" TOTAL [f5][XC][Y9]"&formatnumber(FormatScore(temphsscore)* (100), 0, -1, 0, -1)&"[f1][xc][y22]"&tempnvname&" RANK " &tempposition





end sub



sub endselection

benterhighscoremode=false

if letter1=64 then

letter1=32

end if

if letter2=64 then

letter2=32

end if

if letter3=64 then

letter3=32

end if



tempnvname=""&CHR(letter1)&CHR(letter2)&CHR(letter3)&""

dim act

if nvScore(CurrentPlayer) => nvHighScore(1) then

for act=2 to 10

execute "nvHighScore("&-act+12&")=nvHighScore("&-act + 11&")"

execute "nvHighScoreName("&-act+12&")=nvHighScoreName("&-act + 11&")"

next

nvHighScore(1)=nvScore(CurrentPlayer)

nvHighScoreName(1)=tempnvname

giveacredit=true

temphsscore=nvscore(CurrentPlayer)

tempposition=1

thehseseste

exit sub

end if

if nvScore(CurrentPlayer) => nvHighScore(2) then

for act=3 to 10

execute "nvHighScore("&-act+13&")=nvHighScore("&-act + 12&")"

execute "nvHighScoreName("&-act+13&")=nvHighScoreName("&-act + 12&")"

next

nvHighScore(2)=nvScore(CurrentPlayer)

nvHighScoreName(2)=tempnvname



giveacredit=true

temphsscore=nvscore(CurrentPlayer)

tempposition=2

thehseseste

exit sub

end if

if nvScore(CurrentPlayer) => nvHighScore(3) then

for act=4 to 10

execute "nvHighScore("&-act + 14&")=nvHighScore("&-act + 13&")"

execute "nvHighScoreName("&-act + 14&")=nvHighScoreName("&-act + 13&")"

next

nvHighScore(3)=nvScore(CurrentPlayer)

nvHighScoreName(3)=tempnvname



giveacredit=true

temphsscore=nvscore(CurrentPlayer)

tempposition=3

thehseseste

exit sub

end if

if nvScore(CurrentPlayer) => nvHighScore(4) then

for act=5 to 10

execute "nvHighScore("&-act + 15&")=nvHighScore("&-act + 14&")"

execute "nvHighScoreName("&-act + 15&")=nvHighScoreName("&-act + 14&")"

next

nvHighScore(4)=nvScore(CurrentPlayer)

nvHighScoreName(4)=tempnvname



giveacredit=false

temphsscore=nvscore(CurrentPlayer)

tempposition=4

thehseseste

exit sub

end if

if nvScore(CurrentPlayer) => nvHighScore(5) then

for act=6 to 10

execute "nvHighScore("&-act + 16&")=nvHighScore("&-act + 15&")"

execute "nvHighScoreName("&-act + 16&")=nvHighScoreName("&-act + 15&")"

next

nvHighScore(5)=nvScore(CurrentPlayer)

nvHighScoreName(5)=tempnvname



giveacredit=false

temphsscore=nvscore(CurrentPlayer)

tempposition=5

thehseseste

exit sub

end if

if nvScore(CurrentPlayer) => nvHighScore(6) then

for act=7 to 10

execute "nvHighScore("&-act + 17&")=nvHighScore("&-act + 16&")"

execute "nvHighScoreName("&-act + 17&")=nvHighScoreName("&-act + 16&")"

next

nvHighScore(6)=nvScore(CurrentPlayer)

nvHighScoreName(6)=tempnvname



giveacredit=false

temphsscore=nvscore(CurrentPlayer)

tempposition=6

thehseseste

exit sub

end if

if nvScore(CurrentPlayer) => nvHighScore(7) then

for act=8 to 10

execute "nvHighScore("&-act + 18&")=nvHighScore("&-act + 17&")"

execute "nvHighScoreName("&-act + 18&")=nvHighScoreName("&-act + 17&")"

next

nvHighScore(7)=nvScore(CurrentPlayer)

nvHighScoreName(7)=tempnvname



giveacredit=false

temphsscore=nvscore(CurrentPlayer)

tempposition=7

thehseseste

exit sub

end if

if nvScore(CurrentPlayer) => nvHighScore(8) then

for act=9 to 10

execute "nvHighScore("&-act + 19&")=nvHighScore("&-act + 18&")"

execute "nvHighScoreName("&-act + 19&")=nvHighScoreName("&-act + 18&")"

next

nvHighScore(8)=nvScore(CurrentPlayer)

nvHighScoreName(8)=tempnvname



giveacredit=false

temphsscore=nvscore(CurrentPlayer)

tempposition=8

thehseseste

exit sub

end if

if nvScore(CurrentPlayer) => nvHighScore(9) then

nvHighScore(10)=nvHighScore(9)

nvHighScoreName(10)=nvHighScoreName(9)

nvHighScore(9)=nvScore(CurrentPlayer)

nvHighScoreName(9)=tempnvname



giveacredit=false

temphsscore=nvscore(CurrentPlayer)

tempposition=9

thehseseste

exit sub

end if

if nvScore(CurrentPlayer) => nvHighScore(10) then

nvHighScore(10)=nvScore(CurrentPlayer)

nvHighScoreName(10)=tempnvname



giveacredit=false

temphsscore=nvscore(CurrentPlayer)

tempposition=10

thehseseste

exit sub

end if

thehseseste

end sub





sub afterhseob_expired

afterhseob.set false,1500

EndOfBallComplete

end sub

Imegascript.jpg
 
Last edited:
There is one final step.

Different tables will have different names for the Hud and Backglass DMD's. (ie MyDMD, MyDMD2, DispDMD, DispDMD2, HudDMD, HudDMD2, MyNewDMD etc…)
There are 8 places where you must insert your desired DMD name into script that you just copied.
Use the find function…. and find "MyNewDMD" and change the name. (If you are using this tutorial in conjunction with Simple FutureDMD tutorial, no changes here are
required)

JChangeDMDName.jpg
 
Last edited:
Also if you are using this in conjunction with the Simple Background Animated DMD Tutorial there 5 places where you have to remove an Apostrophe to ShutbackgroundsOff() temporarily so you can see DMD highscore routine. (again use the find function …and find "ShutbackgroundsOff() and remove Apostrophe)
KShutBackgroundsOff.jpg
 
Last edited:
Well that's the procedure. Sometimes it takes some tweaking to get it right, especially if the flippers and plunger are doing numerous other tasks in certain games.
Step 3 Enabling DMD Highscore under "Sub EndOfBallTimer_Expired()" also can take some fiddling. But with a little persistence this method should work.

Existing Pinball tables with animations sometimes are tricky as the animations may need
to be turned off temporarily while DMD high score routine is active. Consider trying this on
a simple table the first few times until you get the hang of it.

All Credit goes to Franciso666 for this wonderful routine which makes gameplay seem even more authentic.

Feedback is appreciated

Good Luck !

Cheers,
Gimli
 
When was I consulted?

--the Tolkien estate!
 
Forum activity
Help Users
You can interact with the ChatGPT Bot in any Chat Room and there is a dedicated room. The command is /ai followed by a space and then your ? or inquiry.
ie: /ai What is a EM Pinball Machine?
  • No one is chatting at the moment.
      Chat Bot Mibs Chat Bot Mibs: keefus is our newest member. Welcome!
      Back
      Top