Friday, July 15, 2016

planning, enums

Sorry for the long silence; I was on vacation this week, returning to work today.

Today I finished implementing my solution for enums. I decided to go with semantically self-contained enums, which is an idea I've found attractive for a while. Basically, the enum is a 64-bit integer. The integer value is formed from packing 12 characters together using a special 5-bit encoding. That's a little better than DOS filenames, even! This ducks a lot of annoying questions that come up with enums, like how to prevent re-enumerating a value, and how to coordinate enum value assignment across multiple developers.

I worked on this now because I'm almost ready to start mocking up game data. Pretty excited about that.


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.