Results 1 to 2 of 2
Thread: 3D array to .txt
- 11-28-2011, 11:36 AM #1Member
- Join Date
- Nov 2011
- Rep Power
3D array to .txt
I am currently making a 3D game for a computing project I am undertaking, but i am stuck on a problem I assumed to be easy.
I will be having a couple of set maps the user can play on, and all objects and entities to be placed on the map will be given a x, y and z co-ordinate. Creating these co-ordinates as an array in java I can do easily enough, but then the problem I am having now, is I will want the data for the maps to be saved in a text file.
So I am wondering how I am able to save a detailed array such as this in a txt file. I can write to the file and read from it no problem. But it is more, what will be saved in what order that is my problem.
For example, and 2D array would be saved in a simple table in rows and columns, but then how would I save a 3D array in a easy format such as a table?
The only way I have thought of, is having the data for x and z input into seperate tables for each y co-ordinate, which I think is simply unnecessary. So does anyone else have any suggestions?
Sorry for any misunderstanding, I tried to make it as clear as possible,
- 11-28-2011, 01:32 PM #2
- By jonathan920 in forum NetBeansReplies: 0Last Post: 05-12-2011, 07:04 PM
- By asmodean in forum New To JavaReplies: 23Last Post: 09-07-2010, 08:12 PM
- By javanew in forum New To JavaReplies: 2Last Post: 09-06-2010, 01:03 AM
- By jschmall12 in forum New To JavaReplies: 1Last Post: 04-27-2010, 09:01 PM
- By Hannguoi in forum New To JavaReplies: 1Last Post: 03-31-2009, 06:40 AM