How to draw vector objects from database in python with pygame?
A:
I don't believe that storing all your vectors in a database is the best solution for this. I would store it in a structured file. You should abstract your design out so that your file utilities have nothing to do with your drawing. An individual object should be able to read the file, and convert the file data into the correct objects/structure to be drawn by another object.
In summary you should:
- Read data from storage
- Convert data from storage to meaningful information (datastructures/objects)
- Draw on the screen when the logic permits.
monksy
2009-11-23 20:04:42
i should work with database. dont ask why :) anyway, thank you for suggestion.
dinamo
2009-11-23 20:24:52
Reguardless, this solution is data source independent. As long as you abstract out your data source it doesn't matter where it comes from.
monksy
2009-11-23 21:09:38