3
\$\begingroup\$

I'm planning to develop a game in which I want to draw 3d models in real time using some given x,y,z coordinates. The coordinates will be given at an average of 30 coordinates per second. Drawing will happen maximum of 15 seconds (450 coordinate sets)

For faster retrieval what, is the most efficient way of retrieving data? Is it storing in file system (storing coordinates in a text file etc.) or storing the coordinates in a database (SQL).

\$\endgroup\$
  • \$\begingroup\$ Everything depends on what the source stream for these coordinates is and why do they need persisting, if at all. \$\endgroup\$ – Patrick Hughes Feb 11 '12 at 19:14
4
\$\begingroup\$

For real-time retrieval you wouldn't use a text file or a database - you'd have the data in memory. It's not clear why you would want to persist these details to the disk if you're just rendering them on-screen.

\$\endgroup\$
2
\$\begingroup\$

No matter where do these coordinates come from (database or filesystem), before drawing them, you should load them into memory and cache them for drawing. Is your memory big enough to contain all coordinates? I guess it shouldn't be a problem.

\$\endgroup\$
  • 1
    \$\begingroup\$ If memory isn't big enough to contain all the coordinates he's got bigger problems to solve for "real-time" than mere file access =) \$\endgroup\$ – Patrick Hughes Feb 11 '12 at 20:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.