Director FAQ || Notes ~ Short Index ~ Full Index ~ Search || Prev ~ Next ||

[17] Cross-platform issues


Director FAQ [17] Cross-platform issues

[17.1] Is porting really as easy as Macromedia claim?

Amazingly, it almost is. It certainly isn't an instantaneous or 100% dependable process, but it is smoother than anyone could reasonably anticipate. Do *not*, however, expect to be able to do all development on one platform and just waltz the files over without a thought at the last minute.

If you intend to develop a project for both platforms, make a serious effort to test regularly on both from an early stage, and do all final collation and polishing for each version on its target machine.

[top]


Director FAQ [17] Cross-platform issues

[17.2] What pitfalls should I look out for?

Fonts are far and away the number one headache. Quote Paul Farry p.farry@cqu.edu.au: Together with Director's lousy text handling in general this is a major incentive for going with pre-rasterized bitmaps of text wherever possible, but frequently this isn't feasible. Otherwise, do all final text layouts on the their target platforms, and as ever "test early and test often".

Other tripwires:

Quicktime can only be played directToStage in Windows [see section 8]

Director for Mac doesn't (can't?) support AVI-format digital video.

Sound playback differs between platforms. Particularly, sounds on the PC may play with noticeable delays on the PC compared to the Mac. There's a note about this in the DfW Read Me somewhere.

DfW seems to be somewhat more stringent about sloppy Lingo constructs such as arithmetic operations between incompatible types or voids. (I can't at present provide a concrete example of this, since it's some months since I was shown the effect and I don't currently have a Windows machine to try it out on, but my recollection is that an operation like

    set x = y + z
where y = 1 and z is uninitialized (void) caused problems. This may also have been with a pre-4.0.4 version, so I may be needlessly scaremongering, but it's always worth being careful about such things!)

2 pixel dropout on bitmapped images (?)

[top]


Director FAQ [17] Cross-platform issues

[17.3] Can I convert between mac and windows truetype fonts?

Yes, there are a number of utilities available to do this (I think you'll find some at the sharedcast site, ftp://198.64.7.253/), but remember Paul's point in the previous answer: even if you convert a known font from one to the other, it still won't be the same.

[top]


Director FAQ [17] Cross-platform issues

[17.4] This fontmapping thing...

[top]


Director FAQ [17] Cross-platform issues

[17.5] Windows has *how* many sound channels??

One, nominally. In fact, most PC sound cards will provide more than this but (or so I'm told) Windows itself only provides one as its baseline, and Director doesn't actually talk to the hardware directly. This is not so much of a problem as it may seem, since DfW incorporates Macromedia's MacroMix DLL which enables the mixing of multiple simultaneous sounds at differing volumes and (with 4.0.4) sample rates prior to output via the single channel.

There are still two problems. One, mentioned above, is that this may introduce a noticeable delay in your sound playback, so it may not run in sync with the visuals (or rather, you'll have to resync it for each platform). I *think* this is caused by MacroMix, but I don't know for sure.

The second problem is that there's still really only the one sound channel, and while Director has it no-one else can. In particular, QuickTime for Windows can't have it, which means that either your QuickTime movie can play its soundtrack, or your Director movie can, but not both at the same time. (I feel certain there must be a workaround for this, but if so nobody's told me.)

Also, note that the number of sound channels for which Director allocates buffers depends on the settings in your DIRECTOR.INI (or PROJNAME.INI) file. I think this specifies 4 sound channels by default (though again, I don't have a copy to hand), but this can be increased up to 8. So, if you want to use more than 4 channels, make sure to edit your INI file accordingly.

[top]


Director FAQ [17] Cross-platform issues

[17.6] Does Director work OK on PowerMacs?

More-or-less. Run in emulation, Director is a bit slow (subjectively I'd say about Centris 610 speed, maybe 650, on a 7100/66). Native, it's wonderfully fast.

However, there are some PowerMac-specific problems. In particular, the memory management seems a bit flaky. Using the "Purge" button in the About Director window is at best very slow, at worst calamitous. If you have MacsBug installed, you'll find that opening a MIAW causes a PowerPC unmapped memory exception -- the OS happens to be smart enough to let Director get away with this, but it's still a bug. In general the program hangs a *lot* more often than on either a 68K Mac or a PC.

On the other hand, it is *very* fast, and the problems don't seem quite so prevalent in PowerMac or Fat projectors.

[top]


Director FAQ [17] Cross-platform issues

[17.7] How do I determine the current drive letter or volume name?

These can be extracted from the pathname, which returns the absolute path to the current movie, including the drive or volume. Despite the different path formats of the Mac and PC, both coincidentally start with the item we want followed by a colon (eg, "C:\BLAH" or "matthew:Desktop Folder:Blah")
    on getDriveOrVol
      -- save off the old item delimiter so we can use our own
      set oldDelimit = the itemDelimiter
      set the itemDelimiter = ":"

      -- get what we want
      put item 1 of the pathName into driveOrVol

      -- restore the old item delimiter so everyone else can keep using it
      set the itemDelimiter = oldDelimit
      return driveOrVol
    end getDriveLetter
[top]


Director FAQ [17] Cross-platform issues

[17.8] How do I create a CD that runs on both Mac and Windows?

This is from the estimable marvyn hortman HORTMAN_M@hccs.cc.tx.us:

Hybrid/ISO-9660. Most CD-burner software includes this option. This type of CD allows you to have your regular Mac-named (34 character) projector along with your nice custom icon, but it also works like an ISO-9660 format under Windows, so you can stick your windows projectors on the cd as well in the ugly 8 character format that PC people know and love. Technically it achieves this by writing the Mac HFS information in the first 17 blocks, and since the ISO-9660 specification is such that it ignores the first 17 blocks on the PC side, you are effectively fooling the computer so that when this CD is put into a Mac CD-drive, it is seen as an HFS volume, and when it is stuck in a PC, it appears to be a standard ISO-9660 volume.

Gotchas: ISO-9660 restricts you to the standard alphabet (upper case only) and the numbers 0-9 The only special characters you can use are the "_" (underline) character and the "." (period) to seperate the file extension (e.g. MY_PRJCT.DIR or SOUND.WAV). Things not acceptable include (&, #,$,*,-, etc.) What this means is that you must be very careful to name your Mac files so that they are 8 characters dot 3, in ALL CAPS. Anything else is ignored by the ISO format, so if you accidently leave any files with any small letters, or nonstandard characters, when Director goes to access that file, it won't find it. Once again, when you're running on the Mac, all will work fine, as it sees the CD as a typical Mac HFS volume. It's only on the PC side where you will have problems if you don't follow the above directions very carefully.

When creating the CD in this manner, since the Director files are binary-compatible, all you have to do is check them out under Windows first (not necessarily a simple task!) and simply compile 2 projectors linked to the files; one for the Mac and one for the PC. (Hint: Create a tiny opening file that points to your first "real" first file of your program; maybe something like: go to movie "START.DIR" or something, and compile this ONLY into your projector, then you can simply stick the projector on a floppy each time you need to modify it, and you don't have to hassle with moving a big file across the network every time. We've found this makes minor modifications easier in our tests. Plus your projector is relatively "independent" of the rest of your files so you don't need to rebuild it unless it becomes corrupted or something.

[top]


Director Web: Director FAQ: [17] Cross-platform issues

Maricopa Center for Learning and Instruction (MCLI)
Maricopa County Community College District
HTML by Paul Farry, p.farry@cqu.edu.au

The Internet Connection at MCLI is Alan Levine --}
Comments to levine@maricopa.edu

URL: http://www.mcli.dist.maricopa.edu/director/faq/faq17.html