开发者

ActionScript-3 physics libraries

开发者 https://www.devze.com 2023-03-24 13:36 出处:网络
I want to write a game in which there will be some balls on the stage, that will move randomly. They must have unique starting speed and angle and should interfere with each other just like real billi

I want to write a game in which there will be some balls on the stage, that will move randomly. They must have unique starting speed and angle and should interfere with each other just like real billiard balls. Is there any physics e开发者_开发问答ngine in AS3 that might be useful for this purpose, or will I have to write and model their behavior from the scratch?


well, doing so "from scratch" isn't really much of a challenge if you know what to do. if you're interested in learning i would suggest you pick up Keith Peters' Foundation ActionScript 3.0 Animation book. one benefit from studying the lessons in the book (and perhaps the book's sequel) is that all of the algorithms and logic are easily portable to other languages.

that being said, i believe the most popular physics engine for Flash currently is the popular C++ engine Box2D, which was recently ported to AS3 using Adobe's Alchemy. included in the ActionScript port is a "World Construction Kit" component for Flash Professional.

more here: Box2d Flash Alchemy Port + World Construction Kit

0

精彩评论

暂无评论...
验证码 换一张
取 消