text data
Posted: Wed Nov 16, 2005 12:04 pm
okay i'm probably trying to hard and cant think anymore.. 
my random map maker for the 3D bzflag game is coming along fine
and works 99% of the time without a hitch....
problem is i have to hardcode all the shapes if i want more
then just the generic box and pyramids...so someone suggested
i have an importer....
so far though i only have a primitve one that is really not
much good...
BZEDIT is a 3D map maker that you can move rotate etc
objects and build a map file...which is a plain text file with
the following in it...
box
position x y z
rotation 0 to 360
size x y z
end
pyramid
.
.
same data
.
.
end
thats how BZedit or someone with NOTEPAD would make
the game objects...
my job would be to read that and place it into the random map
randomly...using an import feature...
but a normal data file puts data on one line x,y,z,b,c,d
this one puts data on seperate lines and different info on each line
and so far i can't seem to sepereate each lines data...
IE
position x y z
i need to seperate it cuase i will be changing the x y z mainly
right now i can only read the line and slap the WHOLE line
into the map file a straight read write thing...but can't change
the x y z...
i also can't figure how to read 1 line which may have only 1 item
VS the next line which would have 5 items...
my head hurts....
any ideas would be appreciated...

my random map maker for the 3D bzflag game is coming along fine
and works 99% of the time without a hitch....
problem is i have to hardcode all the shapes if i want more
then just the generic box and pyramids...so someone suggested
i have an importer....
so far though i only have a primitve one that is really not
much good...
BZEDIT is a 3D map maker that you can move rotate etc
objects and build a map file...which is a plain text file with
the following in it...
box
position x y z
rotation 0 to 360
size x y z
end
pyramid
.
.
same data
.
.
end
thats how BZedit or someone with NOTEPAD would make
the game objects...
my job would be to read that and place it into the random map
randomly...using an import feature...
but a normal data file puts data on one line x,y,z,b,c,d
this one puts data on seperate lines and different info on each line
and so far i can't seem to sepereate each lines data...
IE
position x y z
i need to seperate it cuase i will be changing the x y z mainly
right now i can only read the line and slap the WHOLE line
into the map file a straight read write thing...but can't change
the x y z...
i also can't figure how to read 1 line which may have only 1 item
VS the next line which would have 5 items...
my head hurts....

any ideas would be appreciated...