Games::3D 0.09 reviewDownload
Games::3D is a package containing an object system for (not only) 3D games. SYNOPSIS use Games::3D::World; m
Games::3D is a package containing an object system for (not only) 3D games.
my $world = Games::3D::World->new();
$world->save_to_file( $filename );
my $loaded = Games::3D::world->load_from_file( $filename );
my $thing1 = $world->add ( Games::3D::Thingy->new( ... ) );
my $thing2 = $world->add ( Games::3D::Thingy->new( ... ) );
Games::3D::World provides you with a container class that will contain every object in your game object system. This are primarily objects that have states, change these states and need to announce the states to other objects.
The Games::3D::World container also enables you to save and restore snapshots of your objects system.
Basic things that you object system contains are derived from a class called Games::3D::Thingy. These can represent physical objects (buttons, levers, doors, lights etc) as well as virtual objects (trigger, sensors, links, markers, sound sources etc).
You can link Thingys together, either directly or via Games::3D::Links. The links have some more features than direct linking, which are explained below.
This package also provides you with Games::3D::Sensor, a class for objects that sense state changes and act upon them. Or not, depending on the sensor. Sensors are primarily used to watch for certain conditions and then act when they are met. Examples are the death of an object, values that go below a certain threshold etc.
State changes are transported in the object system with signals.
Games::3D 0.09 search tags