3D dungeon crawler

I’m looking to develop a 3D dungeon crawler, i was wondering how i would implement a map loader using a .txt file. I want the map loader to read the text file and render a wall when it reads “1”, and nothing when it reads “0”. What would be the best way to go about implementing this feature?

There is no best way.

okay… would you be able to give me some sort of idea how to implement this feature?

Here’s a nice post on the best way to read a text file line-by-line:

Hope that helps.

Hint. Parse each character in each line to figure out which type of object to place.

I just happened to have a project open that reads a CSV file (although mine is seperated by tabs, which I find makes things easier).

		
		Path path = FileSystems.getDefault().getPath("./data/maps", file);
		List<String> lines = Files.readAllLines(path);

		int y=0;
		for (String line :  lines) {
			String tokens[] = line.split("\t");
			int x = 0;
			for (String t : tokens) {
                                // Do you what you want depending on t.  x and y are the coords.
				x++;
			}
			y++;
		}

Thanks guys for the help :D, i’ll see if i can get it working today