Thursday, 27 October 2022

Messages redesign

Messages system is giving me a lot of trouble, because the plan for it was not great. It does "work" in that you can output messages, but it's such a mess. I only realized this after writing a debug routine to view messages in a test environment. The issue here is again complexity, as in every difficult part in a roguelike project. You need all kinds of stuff for messages, who is doing and what, is the place near or far, can the player see the event etc. With rigid planning this would have been prevented, but also you need to know special cases which can be difficult to predict.

So what are the options. Maybe a complete redesign is not that smart, because in theory it works, but I think I need to make it more generic so that message data is working for different object types. The "classic" example is you vs. enemy: "You hit the orc." and "The orc hits you." You need only one message id if you can use "you", "the orc" and "hit/hits" properly in each case.

For some reason messages have always been a difficult part and the reason is probably just not planning it hard enough. I would really like to use as generic routine as possible, so there are no checks for visibility etc. in the calling routines, because it will increase the size of source code a lot. Also, the usual mistake to make is just go with the routine even if you have a feeling it will not work properly and then you have a bunch of confusing message entries in the data.

Tuesday, 4 January 2022

The plan for 2022

The "plan" for this year is the complete design of gui. As boring as it sounds, it's still a part of the game and I've had a lot of trouble with it as well. It mostly follows the rest of development which has been the inability to choose, in this case what to display and how. But as long as I focus on actual stuff rather than source code level implementation it's going to get done some way or another.

I sincerely hope the gui isn't going to take this year so I can also do some other stuff like dungeon generation (town type levels are still just a dream) and the RPG system. If there is some kind of change in this year it's the knowledge of my shortcoming in focusing on something. I am more aware that it's a real problem and it may even be something like ADHD even though I have not been diagnosed and I'm not willing to get a diagnosis for that type of stuff anyway. What I need to do is to follow through and get things finished, no matter how much they would suck at first.