Jason Felds > Games-Framework-RCP > Games::Framework::RCP::Database::Result::Color

Download:
Games-Framework-RCP-0.04_01.tar.gz

Dependencies

Annotate this POD

Module Version: 0.23   Source  

NAME ^

Games::Framework::RCP::Database::Result::Color - The foreground/background color combinations.

VERSION ^

0.23

DESCRIPTION ^

The colors table allows a Game Master to give a class, move, item, or almost anything else a foreground and background color for variety. The format is specifically left unspecified: one can use mIRC colors, HTML colors, or any other color system. The only thing to be careful of: do not try to store every color in the universe. Why is that?

Assuming HTML color format, there are 1000000 colors using hexadecimal. Squaring that gives 1000000000000 hex, or 2^48 in decimal. Storage requires 8 bytes for the ID, 4 bytes for the foreground, and 4 bytes for the background, so multiplying 2^48 * 16 = 2^52 bytes. How many bytes is that exactly? Well, take a look below:

Ways to represent 252
2x Full Number Measurement
252 4503599627370496 bytes
242 4398046511104 kilobytes
232 4294967296 megabytes
222 4194304 gigabytes
212 4096 terabytes
22 4 petabytes

Needless to say, keep the colors you use for your home game in moderation. ☺

DATABASE TABLE ^

The foreground/background color combinations.

id_color

This is the primary key of the table, using the traditional auto incrementing.

fg

This is the foreground color.

bg

This is the background color.

SUBROUTINES/METHODS ^

sqlt_deploy_hook()

sqlt_deploy_hook is used to define the table settings for the various databases.

AUTHOR ^

Jason Felds, <wolfman.ncsu2000 at gmail.com>

BUGS AND LIMITATIONS ^

Please report any bugs or feature requests to bug-Games-Framework-RCP at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Games-Framework-RCP-Database-Result-Color. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT ^

You can find documentation for this module with the perldoc command.

    perldoc Games::Framework::RCP::Database::Result::Color

You can also look for information at:

ACKNOWLEDGEMENTS ^

Major thanks must be given to the Freenode Perl channel for pointing out the futility of storing every single color combination in a database.

See Games::Framework::RCP for all other acknowledgements.

LICENSE AND COPYRIGHT ^

Copyright 2009 Jason Felds, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: