Monday, July 11, 2011

Scenes and Dictionary

So today I'm working on changing a scene to work as sequences of bodies. As right now there is no way to know which bodies belong to which scene based upon only have the scene as information. Creating an external storage only makes the code using it really messy. I tried this originally before I realized how silly it was to do it that way, when it could be changed in the API to work better. So I asked Arc about it.

Originally Arc said it was intended to implement this as a sequence of bodies, but after we talked he came to conclusion that it would be better implemented as a dictionary of bodies. This way bodies can be created outside of a scene, be removed from a scene and essentially exist outside of a scene. (In a void scene which contains all bodies not contained in a scene.) Also with the dictionary it helps reference the various different bodies of different names.

So what I'll be doing is looking into Python3's Mapping Protocol, and figure out how to make this all work.

No comments:

Post a Comment