January 13th: Feature Creep

I probably could have finished the overhaul today, except I thought of a way better way of doing it partway through, which required me to go back and redo a lot of my work, and I really am my own worst enemy.

Okay, so the new structure is that the entity template stores the default parameters: Any attempt to access the entity parameters will hand over the default, UNLESS the parameter is overridden. Each entity stores its overridden parameters, and they will be automatically saved with the entity, and will take precedence over the defaults any time you try to access the entity parameters. This means that I never need to initialize specific entity parameters at all UNLESS it’s to override the default values which I specified elsewhere.

This is probably the optimal solution. I’m streamlining the entity/behavior system a LOT with all of this — the only drawback being that now at the top of each behavior I need to specify a whole bunch of getters and setters. There’s probably a way to simplify all of that with macros, but I found Haxe macros completely impenetrable on first glance and am discouraged from exploring further at the moment. On the other hand, the macro thing not panning out probably lead to the more elegant system I have now, so I won’t complain too much.

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s