I got this idea from a game creation toolkit called zgameeditor wherein a 3d FPS maze was generated from ascii characters in a .txt file, and I've been working on implementing it in DBPro but I'm a bit stuck. What I need to be able to do is have the program open a file, iterate over the characters inside, and for every character that matches a certain ascii code generate a specified 3D object (such as a wall, door, or passable floor) at coordinates that would update with the iteration. The trouble I'm encountering is twofold:
First, I am new to I/O in DarkBasic and I'm not certain which Read__ function I should be using to take in a single ascii character per iteration.
Secondly, I'm not sure how I should handle the iteration itself-- how might I instruct DBPro to read in one character at a time, moving right one character after each read-in, and then move down to the next line when it came to the end of the current one? I suppose the break condition would be simple enough [just put a set character at the end of my "dungeon" in the .txt file and instruct DBPro to end its loop and close the file when that character is reached] but I don't know about the interim.
Thanks all,
CCJ
CresCo Games: makers of fine software since 2004