Like many Director users, I have been seeing the writing on the wall and have been looking for alternatives to Director. Unfortunately, I do educational apps not games, so the options are limited. But if 3D is involved, Unity seems like the best alternative I’ve found. It’s definitely much more capable than Director when it comes to 3D. That much was obvious pretty quickly. So I’ve spent about the past month attempting to convert one of our relatively simple physics simulations from Director to Unity. The free version made this possible for me. Thanks Unity! Surprisingly (to me), I was successful. Mostly.
So you can compare for yourself, here is the original Director version:
http://www.polyhedronlearning.com/cengage/lab_5_sim.html
and here my attempt at a Unity version:
http://www.polyhedronlearning.com/cengage/lab_5_unity.html
The Unity version is not complete content-wise, and it still has a few rough edges. I did just enough for a proof of concept. And I’m aware that Unity is primarily a game engine, so my comments about it’s limitations are in the context of using it for something it was not designed to do. By someone who is a novice in its use and could be completely off base.
The one, significant deal breaker for me is Unity’s inability to print. Our simulations generate lab reports that can be printed or saved to PDF. And as far as I can tell, Unity has absolutely no support for printing. Not sure how to work around this one. Of course, Director doesn’t support printing either, yet I found a workaround. So who knows.
There’s only one other border-line deal breaker, and that’s text-related. You cannot display rotated text in Unity, AFAIK. Our simulations often generate graphs, and you cannot label a Y-axis without rotated text. I haven’t found a workaround for this one yet either.
The rest of my comments are about things that are not optimal (for my purposes), but can be worked around.
Text input is ugly. Period. There is no standard editable text field, such as can be seen in any app written since 1984. What’s available doesn’t have a flashing cursor and, if there’s more than one field, you can’t tell for sure where you are going to be entering text until you start typing. And selecting text flashes some strange colors in the field. Actually, there is no workaround for this that I know of, other than just living with it. At least it works.
Manipulating bitmaps is very limited. Limited to drawing individual pixels or copying from one bitmap texture to another. The ability to draw lines, ovals, or rects would be convenient. Also the ability to draw text on a bitmap (rotated of course). All of these capabilities would make generating graphs a lot easier.
Text in general is very limited too (not surprisingly). The ability to mix fonts and styles in one text field would be really nice, as would unicode support for special characters (not sure if it supports that or not). And if we’re talking ideal, it would support HTML-formatted scrolling text fields (like Director’s text members are supposed to). Not a big deal, since that can be done in the browser, but it would be nice to have everything self contained.
Support for custom cursors is limited. You have to show a 2D texture, hide the cursor, then adjust the texture’s coordinates to follow the mouse. It’s doable, but a bit complicated if you have to switch between multiple cursors and/or have other 2D objects on screen.
It would be nice to be able to detect mouse events in 2D objects, for example to click and drag a 2D object or to change the cursor when it’s within the object. It can be done, but is a bit cumbersome. I miss Director’s messaging system and the ability to attach handlers for mouse and other events directly to objects. In this respect, Unity is completely different.
Finally, the script and debugging tools lack some features I’m used to. Like automatically formatting scripts with indents. Manually reformatting a script after an edit can be a major pain. Or being able to pause execution and step through line by line. On the other hand, you can watch some (not all) variables live while running, which is very nice.
One thing I haven’t tried yet, but is supported, is calling JS functions in the browser. This is necessary for us because most commercial educational products must be SCORM compliant. Since we already have the SCORM JS browser scripts, this ability should make the transition much easier.
So, although not perfect, Unity can be a reasonable substitute for Director. At least for me. And some of its apparent limitations may just be the result of my lack of experience with Unity. It’s 3D capabilities leave Director in its dust. If I were Adobe, I would be very embarrassed by Director’s meager, antiquated 3D functionality. Talk about blowing a really big head start.
As far as adjusting to the new environment, my biggest hurdle was scripting. I thought I knew the essentials of Javascript, but JS in Unity is very different than JS in a web page. Accessing global variables, calling functions in other scripts, and the like gave me more trouble than any of the 3D stuff. That and my many years of Lingo programming. Who’d have thought variables can have types, and arrays can start with zero. It’s been a long time since I did much of anything outside of Director, and that is definitely a hindrance when trying to get back into a more standard programming language.
One final thing about Unity that I’m anxious to explore is its ability to export to iPhone. This more than anything is my main reason for looking into Unity. We would very much like to port some of our simulations to iPhone, and Unity looks like the best route given what we’ve already done. Unfortunately, the free version does not support iPhone development, so it might be a while until we can justify that financially. In the meantime I hope to be able to learn enough to determine whether or not we should eventually make that commitment.
I’d also like to take this opportunity to thank the folks on this forum for their help and especially for their patience with my very basic questions. I could not have gotten as far as I have without this forum.