Sunday, 30 October 2022

Organizing class functions

I have a new style to organize class member functions. Previously I organized them more or less by "theme", but now I have changed that and it goes like this: first getters (all functions are in alphabetical order), then setters and last three parts are display, debug and save/load routines. I think for some people the order of functions doesn't matter, but in a large project it's nice to have some kind of rules for that, too. Makes it easier to understand the workings of the class. It's a matter of personal preference, but I think this kind of ordering works quite nicely.

My next focus is Teemu and I have returned to the project just by re-organizing classes and also checking out private/public interfaces, I often place functions to public even they could be in the private part.

I have also an update to my health problem. When I got my blood checked they found out that I have hypothyroidism or the low function of thyroid. So I have been getting thyroxin for that and it has been interesting. It's likely that I had the condition for years, because the difference in my health has been quite dramatic. But on the flipside it has caused insomnia, although the quality of my sleep has increased so much that it hardly matters. As a result of all this I have been able to put more work on my projects without suffering from brain fog I had before. Yet I have a feeling that it's not over, that there is something else wrong with my health. But I'm not worried about something I don't know, I have enough actual problems in my life.

Saturday, 1 October 2022

The idea I had from a dream

I saw a strange dream and realized it could be a game idea. Everyone and their dog has ideas, but this one is really good, I think. Obviously not going to tell what the idea is, but have a strong feeling this is going to be my next game project. I did already have a plan to create more traditional role-playing game rather than yet another roguelike and this is it, this is the idea for that game.

Teemu's level generation is more or less ready, after I guess 12 years of development. But it's only for the physical "topology" of levels. Game object generation is next on the todo list and then the game should be ready, that's how roguelike development works. I hope Teemu 1.3 is released even within this year, or early 2023.

I have health problems, but I don't yet know what it is. I'm trying to get into health care, but it has been weirdly difficult, because we have (I live in a small village, everyone from one knows what I'm talking about) a strange doctor (sadly, not Doctor Strange) who thinks diagnosing a patient is not that important. I know something is wrong, just have to find out what it is. If it's fatal I don't want my projects to end up in the hands of woke developers, let's get that out of the way first. I want roguelikes that have more features, not less.

Then we have the energy crisis, and we could even have a war. Fun times.

Wednesday, 3 August 2022

The project cycle

Lately my development "cycle" for each project has been exactly five days. I'm focusing on one project for five days and then I'm done. It's enough time to get some feature implemented and then sign off for a while. Seems to work quite well.

At the moment I'm working on 6 projects which may seem like too much, but I like it. They are all different, some of them are old roguelikes which are more or less "ready" as games, but I had an idea to make a modern version from them. The rest of the projects are Brick Atelier, Teemu and Kaduria.

In couple of months my current and long-time homepage provider is quitting so I need to figure out how to set up a new homepage. I think it'll become better than the current one, I try to find a "professional" provider so the pages will have better chance to work properly. Some people were complaining that they can't even visit my homepages for whatever reason.

Most of my projects are literally 95% ready so there will be releases "soon". I know I'm playing a long game with my releases, but that's how it is sometimes.

Tuesday, 19 October 2021

Abura Tan SM

This is an old roguelike project by Michael Blackney from 20 years ago. I refactored this in 2009 to SDL (1.0 version), but I think it's time to take a look at this again. It took couple of days to make changes for SDL2 which does have more differences than I remembered. Also for the join-macros I had to turn on "standard" macro property from Visual Studio and replace file finding with std::filesystem.

It does run, but I can't see anything. Possibly the font routine doesn't work properly, because if I replace the data with some random fill color you can see blocks of them on screen. The source code is the kind of C++ you never want to see. It's overly complex object-oriented style and has some annoying features like returning from each case label, leaving out breaks and the last return from end of the function. I think there are also user-made list and string classes which is always great fun.

As I remember it also has a bug which displays the level over the message area, but when the font routine is fixed we'll see if SDL2 fixes anything (the screen update works different way compared to SDL). But if I get this to run properly it might be an interesting project. This I'm going to upload to my Github which at the moment is empty. I need to use an external Git gui rather than Visual Studio, because I don't want git to mess up my projects. Git is awful to be honest.

Wednesday, 13 October 2021

The Object Class

I'm working on a new project which is going to be more like a traditional role-playing game. The nice thing about this is that I'm starting from zero and this time I'm able to think about how to implement things in a simple way. The programming language is still going to be C++, but I try to avoid complex classes and also use procedural style for "action" code.

I was reading about game objects and noticed an interesting comment in which the idea of generic "object" base class should be removed. With that you should consider different game objects as their own base classes - in this case movables, items and creatures. This idea is something I want to try, because it doesn't sound that bad and it will certainly remove some problems I've had with that type of implementation in both Teemu and Kaduria which are complexity and large amount of virtual functions.

If it does work I've been "wrong" about object base class for a long time. However object base class does work better (I guess) in situations where you need to write generic routines for game objects, because the virtual system can decide what to do with some type of object and you only need the base class for parameters etc. Then again, routines for creatures and items tend to be different, so it's interesting to see what happens.

Sunday, 12 September 2021

Banana Rogue 0.1

After about two years of work to refactor Advanced Rogue from C to C++ it finally compiles and runs. I did skip a step which is saving and loading function pointers of "daemons" (delayed actions), but it should not be that difficult to code later. The game does run, but... yeah, let's just say it has some rough edges to smooth out.

The SDL2 implementation doesn't replicate Curses perfectly so there are some problems like you can't see the enemies and item char is not removed from the screen when an item is picked up. The reason for that is quite complicated system of overlaid curses windows which in SDL2 act a bit different way. The game is so primitive that it doesn't have a level data buffer, it's simply using the screen to store level data.

However I find the game quite interesting, because it is so heavily concentrated on the RPG system and everything else is really simple. It's like the opposite of my projects and maybe some other projects as well, where the dungeon generation is overly important and the RPG system has got much less attention.

At this point I have to stop for a while, this is my gates of Moria where I take a while to contemplate this project. Obviously when I return it's time to clean it up and make it actually work which could be harder than it has been this far. My focus at the moment is Teemu 1.3 and somehow now it feels easier to work on a project that has much better code quality, because at least it's not holding you back.

Wednesday, 16 June 2021

Midsummer update

Banana Rogue: This project is doing well, I'm currently rewriting all linked list routines which is a big task, but far from impossible. As a bonus it's making save/load game much easier to implement. I like working on this project probably the most, because it's so bananas. The source code of Advanced Rogue is really old, but still manageable. I think it's way better than Nethack's source code.

Saladir: This project resembles Advanced Rogue, but the source code is quite bit cleaner. This also needs a new save/load and file routines etc. but this is on hold for now.

Teemu 1.3: Most of the hard work is done, but the bane of my existence or also called RPG system is still unfinished.

Brick Atelier: I have put some effort even to this project which is a tile editor. It's also going nicely, missing some key features which I'm working on (moving, scaling and rotating selection, brush pad etc.).

Ban from RogueTemple forums: I figured out I can read RogueTemple forums from my work (they even used some kind of IP banning to prevent that) and there was a thread concerning my permanent ban. In that Slash (moderator/owner of RT) says that I was not banned for SJW reasons... which is, well, a strange thing to say. As I said before, I was banned retroactively when the rules changed. I didn't break any new rules, there was no time to do that. Even better, I never had any problems before. I didn't get any shorter bans (well, at least that I can remember) and I was not warned about my messages. Some users didn't like me, because I was attacking their ideas about what a roguelike game is. If it makes me an asshole then I proudly want to be that. I know I can be abrasive, but in my mind I'm just passionate. I don't like people who try to make black appear white. It's not white, it's black. We all know what a roguelike game is, why even try to change it? Make your own game genre and call it whatever you want and stop trying to change the reality.

In a situation like this there is nothing you can do. Slash runs the forum, it's his call to ban anyone for any reason, but I didn't like how it happened. It was dirty and everyone should know it. Even if the ban would be removed I would never come back for what they did to me.