Friday, 30 November 2018

Control scheme

I'm rewriting keyboard input code for both Teemu and Kaduria. This is again one of those things where the lesson was not learned. The thing is that you want to decouple raw (static) keyboard commands/data from "game commands" so later it's possible to change keyboard commands. It's quite simple concept, but also a place for failure.

Rewriting the control scheme is not hard, but it takes anything between 10 to 20 hours (rough estimation) in this project, because keyboard commands are all over the place. SDL2 is not helping the situation, because it has some strange (I guess) features with foreign keyboard layouts, but when keyboard routines are decoupled from the actual game then it becomes much easier to fix those problems as well.

The icing on the cake is that routines in Teemu and Kaduria are very similar, but it's often not possible to copy-paste between these two projects so I'm like putting double the work in these which is always nice when you think about the massive amount of work these suckers require.

No comments:

Post a comment