Sabbatical Log: November 24th
Posted: 2018/12/02 Filed under: code Comments Off on Sabbatical Log: November 24thThis blog series is running about a week behind my actual work, giving me time to clean things up. The date the actual work was done is in the title, horizontal lines indicate when I stopped writing and started coding.
Busy social day, so I’ll probably only get a little bit done on the new exit types. We’ll see.
I’ve got the basic infrastructure for going through a door setup.
A door is composed to two entities, a frame and the actual door, in a manner similar to a player being composed of three entities (feet, body, and head). As with the player’s feet, the door’s state is owned by just one of the entities (the actual door).
The door’s state is composed of just the target room and the tile coordinates to come out of. I’ve yet to actually implement the transition, but the idea is fade out while the player is still in the first room and fade back in once they are in the new room.
Door transitions are now complete.
The basic idea is quite similar to scrolling transitions, there’s a Step counter, a call from the FrameStateManager to get how much to fade, a new room loaded, and old entities released. I wouldn’t call it the cleanest code, but it works well enough – especially with a gin and tonic in hand.
Stair-style transitions should be almost identical, except a special animation will play. At the moment the animation system is disabled during an exit transition (you can see this by watching the flower fade in on the right in the gif above), so that’ll require some work. The various hitmaps also need some work, as you can see the “pushing” animation happens on the door frame and it’s quite easy to get stuck on the door’s edges.
Tomorrow is the last day of the holiday weekends, so I don’t know how much coding time I’ll get – but I should be able to make some progress.