Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 29.659.308 Times

Games::Object 0.11

  Date Added: April 27, 2010  |  Visits: 643

Games::Object

Report Broken Link
Printer Friendly Version


Product Homepage
Download (71 downloads)



Games::Object is a Perl module to provide a base class for game objects. SYNOPSIS package MyGameObject; use Games::Object; use vars qw(@ISA); @ISA = qw(Games::Object); sub new { # Create object my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); bless $self, $class; # Add attributes $self->new_attr(-name => "hit_points", -type => int, -value => 20, -tend_to_rate => 1); $self->new_attr(-name => "strength", -type => int, -value => 12, -minimum => 3, -maximum => 18); ... return $self; } package MyObjectManager; use Games::Object::Manager; use vars qw(@ISA); @ISA = qw(Games::Object::Manager); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new( , @_); bless $self, $class; ... return $self; } my $world = new MyObjectManager; my $object = new MyGameObject; $world->add($object); ABSTRACT The purpose of this module is to allow a programmer to write a game in Perl easily by providing a basic framework in the form of a module that can be either subclassed to a module of your own or used directly as its own object class. The most important items in this framework are: Attributes You can define arbitrary attributes on objects with rules on how they may be updated, as well as set up automatic update of attributes whenever the objects process() method is invoked. For example, you could set an attribute on an object such that: It ranges from 0 to 100. Internally it tracks fractional changes to the value but accessing the attribute will always round the result to an integer. It will automatically tend towards the maximum by 1 every time process() is called on the object. A method in your subclass will be invoked automatically if the value falls to 0. This is just one example of what you can do with attributes. Flags You can define any number of arbitrarily-named flags on an object. A flag is a little like a boolean attribute, in that it can have a value of either true or false. Like attributes, flags can be created independently on different objects. No "global" flag list is imposed. Load/Save functionality Basic functionality is provided for saving data from an object to a file, and for loading data back into an object. This handles the bulk of load game / save game processing, freeing the programmer to worry about the mechanics of the game itself. The load functionality can also be used to create objects from object templates. An object template would be a save file that contains a single object. Object Managers New to version 0.10 of this module is object managers. An object manager is a Perl object that allows you to manage groups of related game objects. The object manager allows you to relate objects together (for example, you could define a relationship that allows certain objects to act as containers for other objects). In effect, the object manager acts as your world or universe. Like the game object class, the manager class can be subclassed, allowing you augment its functionality. An object manager can be loaded and saved, which in turn performs a load or save of the objects being managed by it..

Requirements: No special requirements
Platforms: Linux
Keyword: Base Class Class Game Gamesobject Isa Libraries Module New Object Object Manager Objects Perl Module Programming
Users rating: 0/10

License: Freeware Size: 84.99 KB
USER REVIEWS
More Reviews or Write Review


GAMES::OBJECT RELATED
Libraries  -  Object::Trampoline 1.25
Object::Trampoline is a Perl module for delay object construction, and optionally using the class module, until a method is actually dispatched, simplifies runtime definition of handler classes. SYNOPSIS # adding "use_class" will perform an...
9.22 KB  
Libraries  -  Object::Declare 0.13
Object::Declare is a Perl module for declarative object constructor. SYNOPSIS use Object::Declare [MyApp::Column, MyApp::Param]; my %objects = declare { param foo => !is global, is immutable, valid_values are qw( more values ); column...
27.65 KB  
Libraries  -  Module::Install 0.64
Module::Install is a standalone, extensible Perl module installer. SYNOPSIS In your Makefile.PL: (Recommended Usage) # Load the Module::Install bundled in ./inc/ use inc::Module::Install; # Define metadata name Your-Module; all_from...
79.87 KB  
Libraries  -  Object::LocalVars 0.16
Object::LocalVars is a Perl module with outside-in objects with local aliasing of $self and object variables. SYNOPSIS package My::Object; use strict; use Object::LocalVars; give_methods our $self; # this exact line is required our...
40.96 KB  
Network & Internet  -  MyCMS perl module 1.0
MyCMS perl module provides the MN::CMS Perl module used by the MyCMS. MyCMS perl module contains Perl object classes to manage the data of MyCMS (such as articles, links, and images). MN::CMS is a perl module that allows you to manage an...
16.38 KB  
Libraries  -  Rose::DB::Object::QueryBuilder 0.764
Rose::DB::Object::QueryBuilder is a Perl module that can build SQL queries on behalf of Rose::DB::Object::Manager. SYNOPSIS use Rose::DB::Object::QueryBuilder qw(build_select); # Build simple query $sql = build_select ( dbh => $dbh,...
481.28 KB  
Libraries  -  Class::DBI::FormTools 0.0.4
Class::DBI::FormTools is a Perl module to build forms with multiple interconnected objects. SYNOPSIS package MyApp::Film; use base Class::DBI::FormTools; Mason example my $o = Film->retrieve(42); < input...
9.22 KB  
Libraries  -  Class::Tangram 1.57
Class::Tangram is a Perl module for tangram-friendly classes, DWIM attributes. SYNOPSIS package MyObject; use base qw(Class::Tangram); our $fields = { int => [ qw(foo bar) ], string => [ qw(baz quux) ] }; package main; my $object =...
50.18 KB  
Libraries  -  Alien Perl module 0.91
Alien Perl module package contains external libraries wrapped up for your viewing pleasure! SYNOPSIS perldoc Alien; Alien is a package that exists just to hold together an idea, the idea of Alien:: packages, so there is no code here, just...
10.24 KB  
Libraries  -  Net::DBus::Tutorial::ExportingObjects 0.33.4
Net::DBus::Tutorial::ExportingObjects is a Perl module that contains tutorials on providing a DBus service. This document provides a tutorial on providing a DBus service using the Perl Net::DBus application bindings. This examples in this...
94.21 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  wolfSSL 3.11.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
2.73 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB