Java

Moderators: zibadian
Number of threads: 7836
Number of posts: 18235

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Re: saving an array to a file Posted by zibadian on 10 Mar 2006 at 12:49 AM
: ok i have this game that has a muti demental array for each map the maps are not vary big to all to geather it has about 800 values. is there an esay way to save all 800 values to a txt file, if so how?
:
: thx cloudncali
:
I don't know how to save to files yet, but the most logical solution is to save them as strings, where each number in each row is separated by a space, and the rows are separated by line endings. This gives a text file, which looks like this:
1 2 3 4 5
6 7 8 9 10 11
12 13 14 15
16 17 18 19 20

Perhaps a predefined java class already has a save/load method for this, otherwise it is simple enough to write one.
Thread Tree
cloudncali saving an array to a file on 9 Mar 2006 at 5:10 PM
zibadian Re: saving an array to a file on 10 Mar 2006 at 12:49 AM
-Necro- Re: saving an array to a file on 18 Mar 2006 at 4:52 PM
-Necro- Re: saving an array to a file on 18 Mar 2006 at 4:55 PM



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.