Page 2 of 2 FirstFirst 12
Results 21 to 28 of 28

Thread: Saving world

  1. #21
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: Saving world

    It will take more than "a string of code". Again you will want to study the tutorials, try to solve this, and then come back with your code attempt if it does not work. But we're wasting valuable time with this unhelpful debate. You'd be better off going back to a serialization tutorial and trying to implement its recommendations or coming back here asking for clarification regarding any specifics which you don't understand.

  2. #22
    Join Date
    Apr 2013
    Location
    Your face.
    Posts
    92
    Rep Power
    0

    Default Re: Saving world

    I HAVE studied tutorials. the whole reason i posted here was because i wanted help. i'm not asking for someone to write it for me,but i'm asking if someone more experienced can help me get this.The world is 2D,and it's about 105 by 105 blocks. it may be harder to get the code that reads from the world,but actually writing onto the file should be easy.I don't mean to sound like a jerk,but i've searched around,went through almost all the tutorials on the website,and even just plain searched. i came here BECAUSE i couldn't find any tutorials on this. writing to files,yes. but actually getting the code in that specific way? Nothing. If your not willing to help me in that topic,just the reading from the world,just lock the topic or whatever.

  3. #23
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: Saving world

    We are more than willing to help, but you must ask a specific question. You've not told us anything about what you do or don't understand from the tutorials. Without this information, how can we help you? All you're saying is "I've read and I don't understand", but there's no way to answer that type of question.

  4. #24
    Join Date
    Apr 2013
    Location
    Your face.
    Posts
    92
    Rep Power
    0

    Default Re: Saving world

    My question: How do i make it read the world,write it to a file,and also be able to read the file,and write it to the world. what i DON'T know: How to read the worl. what i DO know: How to write a file(s).

  5. #25
    sibernewf is offline Member
    Join Date
    Mar 2011
    Posts
    48
    Rep Power
    0

    Default Re: Saving world

    ok, why dont you start simply? Do you know how to write a simple string, maybe your name to a file? If you can do that, do you know how to read your name from that file and put it into a variable?

    If you can do both of these things, then you will probably be able to solve your issue without any help.
    You need to understand fileIO. Goto the Oracle website and look into FileIO do some simple tutorials so you understand streams.

    Good luck on your project.

    Al

  6. #26
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,453
    Blog Entries
    7
    Rep Power
    20

    Default Re: Saving world

    Reading your 'world' is as easy as writing it; before you write it make your World class implement the (empty) Serializable interface; when you write it you open an ObjectOutputStream and write your 'world' object with one single method call. When you want to read back your 'world' object, open an ObjectInputStream and with one single method call read back your object.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  7. #27
    Join Date
    Apr 2013
    Location
    Your face.
    Posts
    92
    Rep Power
    0

    Default Re: Saving world

    I already said i know how to sort out the files. what i need is how to read/write the world.

  8. #28
    Join Date
    Apr 2013
    Location
    Your face.
    Posts
    92
    Rep Power
    0

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Java world generator-real world with people and stuff
    By conker5295 in forum Jobs Offered
    Replies: 2
    Last Post: 02-23-2012, 01:22 PM
  2. Hello World.... now what!?
    By JoshNerd557 in forum New To Java
    Replies: 11
    Last Post: 03-07-2011, 03:22 AM
  3. Hello World in AOP
    By lheebhee in forum Eclipse
    Replies: 0
    Last Post: 11-18-2009, 11:30 AM
  4. hello world
    By wayne.seymour in forum Introductions
    Replies: 2
    Last Post: 02-11-2009, 01:19 PM

Posting Permissions

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