Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2013
    Location
    Earth
    Posts
    1
    Thanks
    0
    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.

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    3,763
    Thanks
    23
    Thanked 548 Times in 547 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.
    write it in C++.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •