Originally Posted By: Steev
Ugh, that is a lot of code...

I would read the file first. After loading I would steer the entitys with an array. This migth be faster than reading and moveing at runtime. You must know, the harddisk is one of the slowest hardwarecomponents in a pc.

best regards steev


yes thats true. but the file is quite big. every 0.05 seconds it gives the position of the entities. i have around 200 entities. and the file looks like this:


CREATE,1,2460.11,-596.35,128.001,0.0*
CREATE,2,1034.28,-1228.65,128.001,0.0*
CREATE,3,1430.34,273.059,128.001,0.0*
CREATE,4,479.787,-2572.28,128.001,0.0*
CREATE,5,2380.9,352.096,128.001,0.0*
CREATE,6,2618.53,-754.424,128.001,0.0*
CREATE,7,-946.045,-912.498,128.001,0.0*
CREATE,8,479.787,273.059,128.001,0.0*
CREATE,9,1271.92,-833.461,128.001,0.0*
CREATE,10,162.936,-438.275,128.001,0.0*
.
.
.
. (till 200)
.
RUN,7,-930.045,-912.498,128.001,0.0
RUN,8,479.787,257.059,128.001,0.0
RUN,10,162.936,-454.275,128.001,0.0
RUN,4,479.787,-2556.28,128.001,0.0
RUN,3,1414.34,273.059,128.001,0.0
RUN,1,2444.11,-596.35,128.001,0.0
RUN,2,1034.28,-1244.65,128.001,0.0
RUN,5,2364.9,352.096,128.001,0.0
RUN,9,1281.146745456179,-837.613113872019,128.001,0.0
RUN,6,2602.53,-754.424,128.001,0.0
RUN,9,1293.098549970394,-845.5541176069796,128.001,0.05
RUN,1,2428.11,-596.3464999999851,128.001,0.05
RUN,10,162.936,-470.275,128.001,0.05
RUN,2,1034.28,-1260.65,128.001,0.05
RUN,5,2348.9,352.096,128.001,0.05
RUN,8,479.787,241.05900000000003,128.001,0.05
RUN,3,1398.34,273.059,128.001,0.05
RUN,6,2586.53,-754.424,128.001,0.05
RUN,7,-914.045,-912.498,128.001,0.05
RUN,4,479.787,-2540.28,128.001,0.05,0
.
.
.
.
.
(some more for every 0.05secs)


A7 commercial Team / VC++ 2008 Pro
homepage | twitter | facebook