Rotating While Falling
Tried changing out the shader for the toon treatment. I'll keep it in mind, but probably won't use it if I can figure out a decent lighting solution.
Got player-prompted rotations working! And in a very Entity-System way -- when the player presses [z] or [x] to rotate, I attach an `:anim` component to `floor`. What about debounce or the player changing their mind? Simple! If an `:anim` is already attached, I don't do anything! This way, the user doesn't have to consider their keypresses, but they will be naturally locked out during the rotation.
I added a new general purpose `sys-anim` handler that will process these when they show up. Right now, it's rather the opposite of "elegant", but it mostly works. Basically, it drops a compound value in `:anim` describing the desired rate (units per second), start, end and a helper function to apply the computed value. And it works very nicely -- except that I'm adding a bunch of fractional numbers and some misalignments creep in. You can see the tiny angle differences in the last screenshot attached to this post. So need to figure out how to snap to the final value.
Another problem -- building bricks are generally good for 90 degrees only. If a falling brick is traveling while player is rotating the board, it could be misaligned. Simple-ish fix -- if `floor` has `:anim` component, gravity is suspended!
Also changed to use actual gravitational constant now.
Boy, I'm tired!
Get Square Meal
Square Meal
Blocks a fallin'...
More posts
- Radical RethinkMay 25, 2024
- Some Assembly Required...May 24, 2024
- Stacking Up...May 21, 2024
- First LightMay 20, 2024
- Setting the StageMay 19, 2024
- Choosing a WeaponMay 18, 2024
Leave a comment
Log in with itch.io to leave a comment.