Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
05-19-2013, 10:52 PM #1
- Join Date
- May 2013
- Thanked 0 Times in 0 Posts
Need Help on Loading Data in HTML Choose Your Own Adventure Game
Well I am trying to make a Choose Your Own Adventure Game in HTML(with JS) and I currently have a save function which works pretty well, you make a character (race, name, and gender), it saves a text file with the race, name and gender written inside the .txt file named "Character_<name>.txt", what I want to do is save the file, then when you hit load it opens a File Input and you search for the file and open it up. <-- That's where I am at.
But I do not know what to do after that... I would like it to read the file and extract the data. Maybe it would be better if it was XML not a text file. But I do not know how to save those files.
So if anyone can help me, you will get a spot in the game's credits when it is done.
P.S. It is going to be a downloaded game, not a Server hosted game, so all the stuff is client side, not server side.
05-20-2013, 03:11 PM #2
- Join Date
- Jan 2011
- Thanked 520 Times in 519 Posts
Using js to read and write a file maybe harder than you want to do. JS is not equip to do this without help. Maybe someone will come along and give you a script to do it (I'm by no means an athourity on what js can do), but I would go with doing this server side. I say this because you want the game to work in a browser making server side languages readily available to you.. . If you truly wanted
It is going to be a downloaded game, not a Server hosted game, so all the stuff is client side, not server side.