home Downloadable PC Games Web Games
Abduction Studios Inc. Games! Developer Corner Contact Abduction Studios Inc.

Game Development Tutorials - > Using Zinc to Wrap Your Flash Game

** note, this is for Zinc 2.5. Zinc 3.0 will have a new tutorial when I get it all wired up.

The purpose of this article is to walk you through setting up the basics for a game application that will allow for full screen and windowed mode. Zinc has a ton of options and they can be overwhelming to a new user.

So you have spent a ton of time developing a beautiful game, one that your friends and family are sure will make you rich! Now you have to get it into a distributable format in order to cash in on all of your hard work. Enter Multidmedia’s Zinc.

The Basics:
If your game is in flash there are several things you want to do off the bat.

  1. Setup a basic project in Zinc.
  2. Disable the Flash right mouse button.
  3. Set a pretty icon for your exe.
  4. Setup your project for DirectX full screen mode details.
  5. Fill in all of the exe details.
  6. Fix some interesting tid bits.
  7. Create an exe.
  8. Patch your final exe with the MDM Patcher tool.

 

Setup a basic project in Zinc:
When you launch Zinc you are in the most useful screen of all. From here you can set your Application Title, your Form Caption, input and output files.

  1. Application Title: INSERT YOUR APPLICATION NAME HERE.


** Note: There is a limit to the number of characters you can have in the Application Title.  (I think it is 13) So if your application name is longer, you can set this up in the Actionscript of your Flash File:
mdm.Application.title = "A Pirate's Legend";

  1. Form Caption (when visible): This is what gets displayed at the top of the window if you are not running full screen mode.
  2. Input File: This would be your actual SWF file from Flash.
  3. Output File: Use this to point to where you want Zinc to put your final build EXE file.

 

Disable the Right Mouse button:
Select the input devices (or the icon with the keyboard key “A”) and simply set the right mouse button to “ignored”. You can also do this with the middle mouse button as well if you like.

**NOTE: One very unique thing about the way that Zinc ignores the right mouse button, is that you can still use the Flash Right Mouse capturing stuff and it will work! It just won’t show you that silly flash popup window. So you can create games that use the right mouse button to jump ect… without having to worry about the Flash Popup window.

Set a pretty icon for your exe:
There are tons of free tools out there to help you create your icon. Once you have your pretty little icon, simply open Zinc, select the application settings (the floppy disk icon with a sprocket) and point the “App Icon:” to your new icon. That’s it your done!

Setup DirectX Full screen mode details:
Almost all serious games run full screen. Yours should be no exception!

I will try and describe the process the best way I can. It may get a little confusing so bare with me. I have found this to be the most reliable way to get full screen / windowed screen to work. There may be better ways! J

Frame 1 of your Flash file:

mdm.Application.bringToFront();

// _root.fullscreen is a variable saved in our save game file to know how to start the game the next time around.

if(_root.fullscreen == 1)
          {
                   // start full screen...
                   mdm.System.DirectX.enable(800, 600, 16);
mdm.Forms.thisForm.showFullScreen(true);
                   mdm.Forms.thisForm.hideCaption(true);
          }
else if(_root.fullscreen == 0)
          {
                   mdm.System.DirectX.disable();
                   mdm.Forms.thisForm.showFullScreen(false);
                   mdm.Application.restore();
                   mdm.Forms.thisForm.hideCaption(false);
          }

 

The “on(release)” function of your Full screen Button

on(release){
          mdm.System.DirectX.enable(800, 600, 16);
          mdm.Forms.thisForm.showFullScreen(true);
          mdm.Forms.thisForm.hideCaption(true);
          _root.fullscreen = 1;
          }

The “on(release)” function of your Windowed Button

on(release)
{
          _root.fullscreen = 0;
          mdm.System.DirectX.disable();
          mdm.Forms.thisForm.showFullScreen(false);
          mdm.Application.bringToFront();
          mdm.Forms.thisForm.hideCaption(false);
}

 

Basically what we do when we go to full screen is:

  1. Enable DirectX at 800x600, 16bpp resolution.
  2. Show the main form full screen.
  3. Hide the Caption of the form.

When we show the window (exit full screen) what we do is:

  1. Disable directX.
  2. Set the form full screen to false.
  3. Bring the application to the front.
  4. Unhide the form caption.

Again, there may be better ways to go about this, however this was the most reliable way that I have found. Of course you will want to save and load your _root.fullscreen variable after you toggle between windowed and full screen as well.

Fill in the EXE Details
This is one of the more satisfying steps for me. Select the version information tab, or press the Icon that is an “I” in a blue circle. Here you can set all of the great information about your game version, copyright information and company information. This will show up in the EXE after you build your EXE.

Fix some interesting tid-bits
These are just some little tips we found along the way that may come in handy.

  1. Under the “Style” Tab (or the Star Icon), you will find under “window settings” a check box for “maximize”. We usually turn that off ourselves because if you maximize the window without setting the directX stuff properly, it keeps your movie size at 800x600 and stretches the area around it to be full screen. In a lot of cases this can show some “hidden” workings of your project so we usually turn it off.

 

  1. Under “Edit -> Preferences” (CNTRL+P) you can set some interesting things about the EXE itself. You most likely want to set it as “Standalone Standard PC Projector”. Under “compression” we usually use standard however you can play with this setting. Finally under version information you can set your company name and copyright information in there as well.

 

SAVE!!! This is a great time to save your brand new Zinc file.

Create an EXE
Now that you have done all the hard work, it’s time to sit back and let Zinc to it’s magic! In the lower right click on the “build” button. When it is completed you will be prompted if you want to run the application.

The new EXE will be right were you told it to be in the “output” directory in step one.

Patch your final exe with the MDM Patcher Tool
This step is vital if you are going to be using any DRM like Armadillo, activeMark or Protexis. You can only get the Patcher tool after you have purchased Zinc, so don’t go bugging them till you have your purchase code! Once you do, simply send a request to the support team and you will be sent a link to download it.

It’s super simple to use. You run it, select your EXE and Hit “Patch”. In a few seconds your EXE is now ready to be wrapped in every DRM I have tried!

You’re done! After all of that you are ready to go. It sounds like alot, however, it goes pretty fast with a little practice. Good Luck!

 

home | pc games | web games | our games | area51 | contact

If you are interested in helping us out with beta testing email us at info@abductionstudios.com.
For information on distribution of any of our games, please contact us at sales@abductionstudios.com.

© 2008 Abduction Studios Inc.