Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Creating A mini typing game!

by marto (Cardinal)
on Feb 25, 2014 at 18:15 UTC ( [id://1076181]=note: print w/replies, xml ) Need Help??


in reply to Creating A mini typing game!

"Can I make a code that saves information just like a login but with two files in the same directory?"

Yes, but this makes no sense since you suggest "file 1" should contain the user and password details, "file 2" contains this with the addition of the stage. Why have two files when "file 2" contains all of this data? This is the only question I can find in your post. I suggest you think about your design some more and read How do I post a question effectively?. If you have any questions quesitons please feel free to ask.

"Also I heard Perl isn't much for games so if this isn't possible"

Your question has nothing specific to computer games, you're asking about basic file input and output.

Replies are listed 'Best First'.
Re^2: Creating A mini typing game!
by Jabox (Sexton) on Feb 25, 2014 at 18:25 UTC
    I apologise for not writing it more clear, was all bunched up in my head. What I meant was file 1 is where everything happens and file 2 is just a file where it holds the user, password, and stage level. So when I login while running file 1, it gets the information from file 2. And when I save in file 1, it saves any changes in file 2.

      Sure, keeping your perl code and application data in separate files is common practice. You could even store this data in a database, for example DBD::SQLite.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1076181]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2024-04-19 09:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found