Archive for February 19th, 2006

Walk to bone, but don’t forget food

On the Adobe Director Forums someone posed a question about how to get started with a “virtual pet.” There are different ways to think about such things. As a physics guy I like to think about pets that obey rules of physics. In this example I set up a pet (let’s just say it is a dog) that will wander around on the screen. If you throw a bone (by clicking on the stage) it will head for that bone, but on occasion it will see something else of interest and forget about the bone. It slowly gets hungry, and if you don’t coerce it in to getting to the food bowl bad things will happen.

The behavior has a nifty “chase” algorithm in it. I’ll probably do more with this file in the future to expand upon my pet.

Can you call that a virtual pet?

The code uses a few DirMX 2004 specific features (named sprites), but could quickly be adjusted to run in older versions (these issues are commented in the code). The graphics in this one are rather primitive to say the least.

Walk to the bone source code.

1 comment February 19th, 2006


Recent tweets...

  • I ordered my iPad this morning. 16 gig wifi edition. I need to look like the hippest kid in the coffee shop ;) 4 days ago
  • Director get together for "old timers" at GDC for those that will be there. Wish I was going. Maybe next year ;) 1 week ago
  • Just noticed I have lots of comments in moderation on my blog...and was never informed of them. Bad server, bad! This weekend... 1 week ago
  • Best of luck to Rob Griffiths @rgriff who started Mac OSX Hints a decade ago. A valuable resource! http://www.macosxhints.com/ 3 weeks ago
  • Still waiting for Snow Leopard Shockwave plugin. I think I'll be waiting a LONG time. Adobe: more time developing, less html5 fights. 2010-02-15
  • More updates...

Director Sites

RSS Adobe Director RSS

Calendar

February 2006
M T W T F S S
    Mar »
 12345
6789101112
13141516171819
20212223242526
2728  

Archives

Recent Posts

Recent Comments