I'm not talking about Math problems - I'm absolutely pants when it comes Math in the first place, so anything calculated is a smaller hurdle for me. Rather, I'm thinking more of the mental excercises -I haven't had to do any serious figuring on how to do something or even constructed simple algorithms.
Until today, that is.
I started off the day right today by not getting to bed until around 5AM. Then I had a series of ludicrous dreams, then I was woken up at 6AM by the lady next door asking "Is this yours?" and pointing to a dead cat in a box she had brought over (it wasn't mine, thank goodness).
After a robust effort at continuing-to-sleep-till-noon, I thought perhaps today was a day to do something different.
Forgetting to eat, I scanned my to-do list and tackled the most interesting sounding task: Copying all items connected to whatever you clicked on. For example, if you created a complex molecule in Protonaut's editor, duplicating the whole shibang, maintaining proportions, and moving them around the screen all at once.
This one is a bit more complex than it sounds, as I did a really good job of keeping my level objects... well, more of a theory than actual hard definitions. My level objects suggest that an item might be in one place, and if you did some hefty math and lookups you'd see that it was correct. Bonds are an excellent example; they have no X,Y coordinates or size definitions - they are merely the idea that a bridge may exist between two already existing elements. All the hard definitions I allow the physics engine to handle for me. It's this exact architecture that's made it really quite easy to write up this whole deal.
I ended up making my first Linked List in years (through lack of requirement, not choice), and designed some tree-traversal algorithms to find out exactly what was connected to each other, taking care not to duplicate entries.
Then doing up the math to keep the X,Y coordinates offset correctly as I move them all around the screen... Well, let's just say it was a fun several hours worth of code. I feel like I've just had a fresh code shower. Ho ho!
Conclusion: Very satisfying.
So here it is, Build 29. Coming up on the big three-oh! Recent noteable changes:
- Several sets of tutorial level revisions
- Lots of minor glitch fixes
- A dozen updates to player movement rates, gravity values, friction values, and scenario behaviours (eg: fixed the I'm-pressing-on-a-wall-and-can't-jump-high hard-to-reproduce glitch)
- A dozen updates to the level editor (see them all here), including molecule copying and whole-molecule moving.
No comments:
Post a Comment