Simple DMD tutorial PART 1

This is in two sections – preparing frame images, and the actual FP bit. For a recreation, you may wish to skip the image preparation section.

In this document, I hope to explain how to make a simple DMD in FP using an overlay and and image list. First up, we will prepare some frames fro our DMD's animation. Please note that this is a very simplistic example to point you in the direction you need to go to create what you want. The Monsterland tables introductory animation was 94 frames, and this one is only 25, so it is not of the quality that can be achieved with a little effort. The preparation of the frames for you animation is the most time consuming part of the process, so we will do that first.


Image Preparation:

For this demonstration I will be using PSP 8 and an image from some stuff for an unWIPworthy as yet table called Creepy House. The image below shows PSP with two images. Image1 is blank, 300x150 pixels. We will use that to cut frames. The other image is our source material.



We will cut a section of the source image, and use it to create a panning animation, taking in the bat, and then the house. It will then zoom in on the tower of the house and flash the text “Bell Tower 50000 points”.



Select and copy the image area needed.


We then paste the selection as a new image. Following that we need to DECREASE the colour depth to four colours (this being the number of tones on the average DMD) this is in the menu as shown bellow. This same area of the menu is used again to convert to Greyscale. The image below shows this having already been done, and the cursor on Increase. Once it is reduced to 4 colours, and greyscaled, increase the colour depth again.




Having increased the colour depth we can give the image its orange tint (that of a DMD) – this tone can vary somewhat from table to table, but you should try to keep it consistant within your tables own DMD. In this case, the result is a bit too red, but we can live with that for this demo.



Set your colour and then flood fill the image with it, being carefull to ensure it is a tinting style effect (the blend mode) you use. The image below shows the settings we have used in PSP8:



Now we are ready to cut some frames from the image. As with the previous tasks, this is just one method. You may find another way easier, if so, do it that way :)


Copy the tinted image in its entirety to the clipboard. That done, select the smaller 'image1' and paste the clipboard to it. Remember to paste it as a new layer. This will enable you to move it around.



If you zoom out and maximise the image1 window, you will see (as below) that the pasted layer is much larger. This one has already been shrunk down the fit the width we need.



Select file->save as and save the image. Then click on the layer and move it up, repeateing the save/move steps until you reach the bottom of the layer. The image may need to be merged in each save – ok this as it is not a problem providing the save as option is used. To zoom in or out in you frams picture, use the layer deform tabs to enlarge or shrink it (the larger points on its selection box)


We ended up with 21 frames. The last frame (21) was identical to 20, except we placed text on it. To give the DMD feel, use a dotted line for your text, as in the sample below:


Once this is done for all your animations, you are ready to break into FP's editor.


FP BITS FOR PREPREPARED IMAGES:


First you need to import all your frames using Fp's texture manager. I shouldn't need to explain how to do that here :)


Second you need to access the imagelist manage, as shown in the table menu image above.


It will appear as follows:


Click on Create New, and then select the new image list and click Edit. The following will appear:



Select each of your frames and click on include. Note that you must be extremely carefull to include the m in the correct order! Selecting them all at once will likely hit trouble as the list will not have numbered files in sequence, with 10,11,12 etc coming before 2.


Not that you should have ALL animations, still frames, scoring and bonus reporting frames for your entire game in this one imagelist.


OVERLAY


Once this is done, click on the translite to get to the hud are of your table.


Next, place an overlay on the HUD (or the translight – in monsterland I placed two, that were identical – connected to the same imagelist – one on the HUD and one on the transilte)


Find the overlay in the special objects menu at the bottom of the FP editor screen



Overlay is second from the top of this menu. Select it and place your overlay on the translite.


See the screenshot below:



Notice the placement. Keep the overlay within the bounds of the HUD for proper effect. If you wish it on the HUD, unselect the “render on translight” selector in the options to the right of screen. We have set this one to 192x64 which is apparently one of the sizes of real pinball DMD's. Select the imagelist we created before in the Colours and Rendering section of the overlay's options.

SCRIPTING:

Once this is all done, comes the easiest part of all. The Scripting. We have only one event in our image list, so we will start with that. Not that it is best practice to start your image list with your introductory attract sequence, as you can call this at the commencement of the program. ( in the Sub FuturePinball_BeginPlay() routine – this would mean it allways started at fram 1 and you could easily port your code between projects)


We have created a table with a kicker, and will attach our animation sequence to a kicker hit event in the table. For this you must take note of the numbers in the imagelist for your frames. This one is easy as there is only one in there, and there were 21 frames. To make the text at the end of the animetion flash, we added frames 20 and 21 twice more, giving us a total of 25 frames. So for our kickers hit event, we add the following to the script:


sub kicker1_hit()

overlay1.frame 1, 25

addscore 500

playsound “somesound”

end sub


Overlay1 is the name of our overlay.

Frame is the comand that tells FP to jump to a certain frame.

The number 1 is the number of the first frame in our animation

The number 25 is the name of the last frame in our animation.

We could add a third figure for repeating the animation, either from the beginning of partway through. EG 20 would set the text flahing on repeat. (it would cycle frames 20-25 until the overlay received another command)


More information can be found in the FP help manual under Overlays.


That is all the scripting necessary at this stage. To include your actual score on the DMD may require more effort, however HUD displays for scoring can be covered in another tutorial. The HUD score in Monsterland is placed above the DMD overlay, it could be mergered cisually into it or incorporated. For now, I hope this tutorial gives you enough info to get started. From this pooint it is possible to do a lot more. All the script you need is in that one line – simply adjust the frame numbers to call each events own animation. I am not sure if there is a maximum of images for the imagelist, however I had a few hundred in monsterland without problems. Incorporating timesr could save you frames in the list if you get adventurous for your flashing items – play with it and you'll surely find all sorts of other techniques you can add to this. Remember this is just the beginning


As I master more techniques to add to this, I'll release further tutorials. This is part one. Hopefully it gets you started with DMD's in your tables!


Therefore, be sure to check the new DMDs coming from authors like Ruckage, that will include functions like arcade game modes as well!.

PS: Here is the finished animation (as a GIF):