May 13th: Dang it.

Well, I constructed most of the conversion functions to and from xml when I realized I had a problem: That is, while AS3 has a way of creating graphics data variables that you can pass to the Flash graphics drawing functions, it has no built-in way of saving or loading them. So, at this point, as I see it I have three options:

A) Serialize the graphics data objects directly into binary to save and back to load them. If this is possible, this is probably the best solution, but I’m not sure yet if it will work or not. I’ll have to experiment.

B) Create a function to convert graphics data to and from a saveable format (probably xml). This will definitely work, but it will also definitely take a lot of effort to make happen. I’m not sure yet if this functionality is actually important enough for me to dedicate this amount of work.

C) Drop it. Comment out the graphics drawing functionality completely for now, and then if I decide it’s actually something I really NEED later then I can add it then. I may end up doing this if A doesn’t work out.

Something else that I’ve been pondering: Right now, if I create a bitmap animation to be used in a particle effect it creates an entirely new instance of the animation to be saved and loaded with the effect. The same is true of entities and basically anything else that uses this class. This has its advantages, but one of the major drawbacks that has occurred to me is that, now, if I want to edit the animation that means I have to change it in ALL the instances it’s used, instead of just once at the source.

I’m starting to think this is potentially a huge and ugly time-sink later on down the road, so I think it might be a good idea soon to make it so that, rather than interacting directly with a bitmap animation at load time, all of these classes that use bitmap animation load their animations from a path and only save the path. That way, when the animation is modified those changes will be distributed to all of the entities and effects which use it. So that’s another thing to work on.


About problemmachine

What is the nature of your problem? Can we modify the nature of your problem? Can your problem be touched? Eaten? May we eat your problem for you? May we eat your soul for you? Would you like a replacement problem? We make problems. We eat souls. We crap solutions. We are Problem Machine.
This entry was posted in Daily Update, Programming. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s