I'm ahead of my class right now (they're going on lists) but it seems I'm unable to get them to install moose on the computers (something about the way the computer images every time the user logs off and on) so I'm stuck with regular OOP in class, sadly, which seriously hinders my will to use moose... :(

I did install Moose on my home computer, though, so we'll see if I don't get anything out of that...

I've got a problem visually thinking about the whole idea of the game loop, will be looking it up to see if there's anything to more readily help visualize it, as well as how to handle game//dungeon progression in the game.

Some stuff I'm doing:

Get the Game loop up

Get some file handling going for persistent data

Design inventory system as well as attribute system


Here's some example code:
sub role_play_game { print "What is the Name of the character you wish to play as? "; chomp ( $name = <STDIN>); print "What is the gender of your character? m/f: "; chomp ( $gender = <STDIN> ); print "What is the Age of the character? (years): "; chomp ( $age = <STDIN>); print "\n"; $player = new Player ($name, $gender, $age); $player->getValues; $player->start; $player->invent; } package Player; sub new { my $class = shift; my $self = { name => shift, gender => shift, age => shift, level => 1, hp => 10, currhp => 10, }; $inv = { q_itm => "no", money => 0, }; # Print all the values just for clarification. bless ($self, $class); bless ($inv); return $self; } sub getValues { my $self = shift; print "\nName is $self->{name}\n"; print "Gender is $self->{gender}\n"; print "Age is $self->{age}\n"; } sub start { my $self = shift; print "You are Level $self->{level}\n"; print "You have $self->{currhp} of $self->{hp} hit points left!\n" +; } sub invent { #This is where it gets a little... dirty. print "You have $inv->{q_itm} quest items!\n"; print "You have $inv->{money} gold!\n"; } 1;
Also, soon enough I'll have a CPAN Roleplay module up so that others can contribute if they want to help out, haha. Also, that magic +; came in from nowhere >.>

In reply to Re^8: Module Organization by Dwood
in thread Module Organization by Dwood

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.