50 likes | 153 Views
Perl Space command. A TK based 2D space game written in Perl. By Michael sparks. Packages Used:. TK TK::Photo DBI Sprite package written by Clinton Pierce Database package. Objectives of the game:. Take player initials from the command line for storage of high scores
E N D
Perl Space command A TK based 2D space game written in Perl. By Michael sparks
Packages Used: • TK • TK::Photo • DBI • Sprite package written by Clinton Pierce • Database package
Objectives of the game: • Take player initials from the command line for storage of high scores • Compare scores to those stored in MySQL database to determine new high scores • Store information about ship position and contact with other things • Use information to update the game every loop
Data Structure: • Hash of information • Previous location • X and Y • Information about the ship • Names • Type of ship • name • Coords • ID number • Picture • Object information • Hash of Tags
Database Structure: • Table with Initials of player • Taken from ARGV • Defaults to AAA • Score of each player • Only inserted if greater than last high score • Recalled from main program and stored into an array