April 10th: Prerequisites

Hmm! An interesting and unexpected hurdle has appeared. Well, I got the behavior dragging working: I can now re-order behaviors as necessary and I can easily drag them from the behavior list on the right as well. However, I created an error checking system for creating new behaviors, where each behavior checks to be sure the entity it’s created for has any necessary pre-requisite behaviors and throws an error if it’s missing any. So, for instance, gravity requires velocity and velocity requires position, so if I try to make position and then gravity it throws an error.

I think this is actually still a pretty good idea… I think I’ll want to ensure, as I go forwards, that not only is this respected when creating new behaviors, it’s also respected when attempting to delete other behaviors. It may get a bit tricky, but I think this is the smart way to do it and could solve me some much trickier debugging somewhere down the line.


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:

WordPress.com Logo

You are commenting using your WordPress.com 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