Squirrel Tao » Programming http://squirreltao.dreamfishery.com The tao of my squirrel paths on the web Wed, 17 Feb 2010 21:49:16 +0000 http://wordpress.org/?v=2.9 en hourly 1 Aegia Physics Code Samples in Director 11 http://squirreltao.dreamfishery.com/2008/04/05/aegia-physics-code-samples-in-director-11/ http://squirreltao.dreamfishery.com/2008/04/05/aegia-physics-code-samples-in-director-11/#comments Sun, 06 Apr 2008 03:00:27 +0000 Jennifer Elrod http://squirreltao.dreamfishery.com/2008/04/05/aegia-physics-code-samples-in-director-11/ Somebody has already made some code samples available to the Director user community, using the new Aegia Physics plug-in for 3D work in Director. I was glad to find these, since it was a disappointment to me that Aegia did not make any samples or tutorials available upon Adobe’s release of Director 11. I remember when the Havok Physics Xtra was made available for Director back in the olden days, Havok made a nice collection of tutorials, demos and sample code available to the community. Looks like we’re on our own here for the time being.


Browse all the entries under 3D Programming, Director, Shockwave 3D.

]]>
http://squirreltao.dreamfishery.com/2008/04/05/aegia-physics-code-samples-in-director-11/feed/ 1
WOW 3D Physics Engine for Flash http://squirreltao.dreamfishery.com/2008/01/30/wow-engine/ http://squirreltao.dreamfishery.com/2008/01/30/wow-engine/#comments Wed, 30 Jan 2008 17:57:22 +0000 Jennifer Elrod http://squirreltao.dreamfishery.com/2008/01/30/wow-engine/ There is finally a 3D physics engine for Flash. Called WOW-Engine, it is still under development. It extends Alec Cove’s APE 2D engine, uses the Sandy library for all 3D math and incorporates data structures classes written by polygonal labs. It’s a very promising beginning. The future of Flash 3D programming and game development looks brighter and brighter. At least if Director ends up dying after all, there will now be a viable alternative, especially considering that the Havok 3D physics engine for Director has not been updated since Director MX 2004, and Adobe and Havok do not appear to formed any new partnerships.


Browse all the entries under 3D Programming, Flash.

]]>
http://squirreltao.dreamfishery.com/2008/01/30/wow-engine/feed/ 0
Creating a Simple Hinge in Shockwave 3D Using the Havok Xtra http://squirreltao.dreamfishery.com/2007/04/11/creating-a-simple-hinge-in-shockwave-3d-using-the-havok-xtra/ http://squirreltao.dreamfishery.com/2007/04/11/creating-a-simple-hinge-in-shockwave-3d-using-the-havok-xtra/#comments Wed, 11 Apr 2007 20:25:03 +0000 Jennifer Elrod http://squirreltao.dreamfishery.com/2007/04/11/creating-a-simple-hinge-in-shockwave-3d-using-the-havok-xtra/ Today I finally figured out how to create a simple hinge in Shockwave 3D using the Havok Xtra’s linear dashpot. In the past, I was frustrated by Havok’s linear dashpot, because by default it connects two movable rigid bodies’ centers of mass. I wanted to be able to connect them more precisely, such as by their corners. I found that it is simple to accomplish this by assigning pointA and pointB of a linear dashpot to the desired vertice. First I attached two cubes using two linear dashpots. Then I set point A of the first linear dashpot to be positioned at the desired corner on the first cube and point B at the desired corner on the second cube. I did the same with the second linear dashpot. My demo source code is nothing but a toy app, but it’s enough to get the concept. Once you get the concept, you can adapt it for your own project. Be warned that when you increase the size of the boxes, the results become unpredictable. To adapt this to your own code, you may need to experiment with the vertex lists of the faces of your own model. Download source.


Browse all the entries under 3D Programming, Shockwave 3D.

]]>
http://squirreltao.dreamfishery.com/2007/04/11/creating-a-simple-hinge-in-shockwave-3d-using-the-havok-xtra/feed/ 0
Director, I Missed You http://squirreltao.dreamfishery.com/2007/02/09/director-i-missed-you/ http://squirreltao.dreamfishery.com/2007/02/09/director-i-missed-you/#comments Sat, 10 Feb 2007 01:00:05 +0000 Jennifer Elrod http://squirreltao.dreamfishery.com/2007/02/09/director-i-missed-you/ Playing with Director again is like coming home. Director was the first system I learned to program in. Lingo was my first scripting language. I love Lingo! In spite of being verbose, it’s also concise. Sounds contradictory, but it’s true! I won’t use JavaScript in Director, even though I know JavaScript, and Director supports it. I prefer Lingo. You can do so much with so few lines of code. Here’s what I have to say about Lingo, after having used JavaScript, ActionScript, Visual Basic.NET, and Java: Lingo is the easiest of all!

Now that I’m back in the Director’s seat again, I’ve found even more online resources than I ever could before. Sample source code downloads abound. It’s as if my sudden re-opening of my mind to Shockwave 3D has made it easy for me to find an abundance of what I need. I used to scour the web for resources without finding this much. Yet, many of the resources I’ve effortlessly found lately have been around for some time. Particularly helpful to me is the Havok Developers Site Archive, which contains a wealth of demos and sample code downloads for the Havok Physics Xtra for Shockwave 3D. I don’t recall seeing this many when I played with Havok in the past. After having looked into other physics options, let me tell you, the Havok samples and documentation are very well done. It makes me sad that the business relationship between Macromedia and Havok went sour, back when Macromedia was still Macromedia. In spite of the lack of further development of the Havok Xtra since Director 8.5, Havok is still the best thing going, in terms of implementing physics for real-time 3D on the web. That is, unless you’re already an expert game programmer who’s proficient in Java. In that case, you may be able to do even better with Java. For everyone else, Havok is still the best we’ve got.

Another collection of resources I’ve learned a lot from, just by examining the lingo scripts, is the Tips section on the OS NonLinear Website, which belongs to the ingenious Lingo scripter, James Newton. I had never seen an example code snippet of working directly with vertices in Shockwave 3D, before seeing the source code for his MissVertex demo. His SnapToCap demo source code showed me an example of getting and working with points for the first time. It’s worth looking through his source code, even if you don’t need that specific piece of functionality, because you may see how to do something else. He’s got all kinds of custom behaviors in his movies.

If you don’t know your way around in Director yet, you’ll want to start with the basics before diving right into code samples. The best online Director tutorials I’ve ever found are Dean’s Director Tutorials and Resources. These are the tutorials I cut my baby teeth on. They are a lot of fun.


Browse all the entries under 3D Programming, Director, Shockwave 3D.

]]>
http://squirreltao.dreamfishery.com/2007/02/09/director-i-missed-you/feed/ 0
Going Around in Circles – Back to Shockwave 3D Now http://squirreltao.dreamfishery.com/2007/02/04/going-around-in-circles-back-to-shockwave-3d-now/ http://squirreltao.dreamfishery.com/2007/02/04/going-around-in-circles-back-to-shockwave-3d-now/#comments Sun, 04 Feb 2007 20:32:24 +0000 Jennifer Elrod http://squirreltao.dreamfishery.com/2007/02/04/going-around-in-circles-back-to-shockwave-3d-now/ Why Shockwave 3D?

In my long and winding quest to do real-time 3D programming on the Web, I’m back where I started — with Shockwave 3D. Much as I love Sandy, I need at least joints and collision detection, and the only existing Flash physics engines are made for 2D. I’ve put considerable thought and effort into extending Flade (now replaced by APE) to 3D; but I’ve concluded that even if I succeeded, it would take some time for the code to mature. When I first started, I set out to learn Java 3D, but I soon abandoned it for Shockwave 3D. Then I abandoned Shockwave 3D for Flash, once Sandy came on the scene. In my naivety, I thought I could hack out a physics engine the same way I’ve always been able to hack out everything else I’ve needed. Once I learned how complicated physics engines and game engines are, I turned to the Torque Game Engine.

I’m Always Looking for Something Better – But Shockwave 3D Has Been Right in Front of Me All Along

Today, I finally realized that my real problem is that I’m continuously looking for something better, without sticking to one thing long enough to get it working. I feel sick at heart, at times, to think of all the time and effort I’ve wasted. It’s a very de-motivating feeling. But I perk up at the thought that I’ve got a lot of flexibility now. I can quickly choose to go in many different directions. Plus, I plan to use Torque Game Engine for CD content that I’ll ship with the Myth of Merula once I’ve published it in book form. As for Sandy, Flash has a future and Director probably doesn’t, so I’ll keep plowing away. It’s just that it will take some time. In the meantime, it just makes more sense to use Shockwave 3D rather than Torque. I wouldn’t even be able to display Torqe-created stuff on the Web. I can quickly get something working in Shockwave 3D at this point. I may as well do that, while I continue to work intermittently on getting Sandy to work with APE hacks. Who knows? Somebody may even release a 3D physics engine for Flash.

Knowledge Is Never Wasted

What’s even more encouraging to me is that my very formal and dry guide to 3D programming in Director, Director’s Third Dimension, now seems very easy to me. At this point, I don’t just know a tool. I know quite a bit about 3D programming, along with the basics of game physics programming. One thing I’ve learned is that, when it comes to 3D and game programming, it doesn’t matter if you learn some software and scripting; you still won’t be able to do much with it, if you don’t understand the basic underlying principles of how everything works. You won’t have any way of knowing what sorts of parameters to pass to functions, for one thing. Heck, you’ll have a hard time even knowing which functions to use, in the first place.

If Adobe Won’t Develop Director Any More, Why Not Let Us Develop It?

Still, all of this would be much simpler if Shockwave 3D would have a future. I wish that Adobe would shit or get off the pot, when it comes to the future of Director. In my opinion, if Adobe no longer intends to develop Director, Director’s code should be released to the community of Director enthusiasts, for us to maintain as an open source project. (Not that Adobe cares about my opinion.)

No Money in 3D on the Web?

Many people believe that the reason why Adobe appears to have abandoned both Atmosphere and Shockwave 3D is that there proved to be too little money in 3D on the Web. There is so little vision in that belief. I recall a small bookstore owner back in 1997 telling me that there was no money to be made on the web, pointing to Amazon.com to back up his statement. But realizing the inaccuracy of the no-money-in-Web-3D-belief doesn’t even require vision, since all you have do is to look at the phenomenon of Second Life. I’ll grant that if you’re a Shockwave 3D developer, you may not have experienced clients standing in line and beating down your door, but you’re just a person. You can’t afford to wait. A large corporation like Adobe can afford to grow a market. Adobe has deeper pockets than you have.

UPDATE 2/5/2007: I was pleased to read today, in Adobe’s Director and Shockwave Player Support FAQ, that Adobe plans to continue to develop Director. “Adobe has not published an official time frame for the next release of Director and generally does not disclose details of new releases more than 30 days before a product is expected to ship. However, our current planning assumption is that the next major release of Director will be in the second half of 2007 [emphasis mine].” Hooray! The last time I scoured the Director Website, I did not notice this. I don’t know how long it’s been up. Now I feel foolish about my above rant. Foolish but happy!


Browse all the entries under 3D Programming, Game Programming, Shockwave 3D.

]]>
http://squirreltao.dreamfishery.com/2007/02/04/going-around-in-circles-back-to-shockwave-3d-now/feed/ 0