Demonstration of Simple Movement using Python AI for Gaming 2013, SCU
Definition of Modules tmain - tkinter – entry point Starts animation Calls myPaint in level for animation tsLevel Has a list of dynamic and static objects Contains all the information needed for steering moving object Parameterized class of moving objects Parameters include geometry of the object and dynamic behavior
Definition of Modules Steering Given a behavior, moving object, and level calculates new velocity (kinetic) or acceleration (dynamic) Math implements vector class Level implements objects in the level dynamic static
Dependencies Application runAnimation displayAnimation myPaint(level)
Dependencies myPaint(level) object.paint object.update(level) get Steering(level, behavior, relObject) update location, velocity, acceleration
Steering Implements methods for objects, levels Kinetic wander Simple version: random vector Elaborate version: pick far away line and target object on this line, seek towards target object. Search Flee