Wednesday, 25 December 2019

Thinking everything

I'm in a middle of checking out gear use in Teemu. At first my plan was to remove items from inventory when they are in use, but then I went back to "Nethack" style where the item tells what use it's in. The difference is that you can do stuff like throw away your weapon and then you need to check out if it was part of a wardrobe etc. It's not as complicated as it seems, because you "only" need to check this in routines that discard items or change armour etc.

This falls in a category of "thinking everything" which sometimes is a part of roguelike programming. Rather than trying to understand how the code works you practically have to try out everything and see what happens. In Teemu it's even possible to eat away your armour. Creating a system like this can be both fun and a bit challenging, but I think it fits better in the style of this game.

Friday, 25 October 2019

Roguelike games in 2019

During the long span of development of my both roguelike projects I've been waiting for some great roguelike to appear, but it has not happened yet. It is a bit weird if you ask me, even there are many reasons why we don't have more roguelikes.

I think the numero uno reason is that they are difficult to create. I should know it, and I actually do. Even to have any kind of hope to release a major roguelike you need to grow up as a programmer if you already are not a good one. You need consistent planning and results that don't break up later.

But surely there are plenty of good programmers in indie scene? Well, my opinion is no. Open source and indie developers are in fact often even worse than professional programmers, who in most cases don't waste their time to roguelike game development anyway.

Another important reason is money. It is possible to make nice amount of money from game development, but it's easier to do with game genres that require way less time and work. Most game types are much easier to create compared to roguelikes or even traditional role-playing games (which are also quite hard). Some people are developing commercial roguelites which are light-weight roguelikes, because there is a market sector for them, but obviously they are not roguelikes.

Even after all these things I'm still puzzled about the small number of modern roguelike games, because I surely am one of the guys who would like to play a good roguelike game. There is ADOM, but it's a boring game with way too much grinding. DCSS is difficult and the developers seem to make it worse all the time which is quite hilarious, but then again it was never their own project as far as I know. The mindblowing thing is that we have games like Nethack as a great legacy, but building on top of that it would be possible to create far better roguelikes.

Sunday, 20 October 2019

Code metrics tools for C++

This issue makes me somewhat annoyed when I think about it. Visual Studio doesn't have code metrics for "unmanaged" code which is C and C++ in particular. The reason must be that Microsoft doesn't really care about C++. They have to keep it for the vast amount of programs still written in C++ including game development, but there is less effort to include tools like metrics.

As far as I have searched there isn't a simple, free metrics plugin for Visual Studio, so there is that, too. There are some external metrics tools, but they seem like total overkill for what I'm looking for. I just would like to know how many lines of code the project has without running some external program. Visual Studio already knows how many lines an individual file has and how many classes etc. are in the project. It would be quite simple to collect that information and display it.

Programming a code metrics tool isn't impossible, but it takes some time and parsing C++ can be difficult sometimes, if you want to extract anything else than physical lines of code. I have written a parser that can find classes from a C++ file, so it would be a start. Maybe if I already didn't have tons of more important projects to do.

How about writing a plugin for Visual Studio? I don't know anything about it. How it's done etc. It can't be too easy, otherwise there would be a plugin to display C++ metrics I guess. Then again, maybe this is a non-issue in a sense that why would you want to know about the metrics of the project?

Saturday, 21 September 2019

New workflow

I made a small change in my workflow and it seems to work like magic. First I moved all "note:" comments I had written in the source code (to find them "later") into a list of issues, so now the two most important lists are issues and bugs. Then I began to put a date in a fixed item to keep track of development pace. An actual example of a fixed bug from Teemu's bug list:

127. Sidestats drawing is not dynamic, has static locations (changed to offsets) [21.9.2019]

For some reason, doing it this way, is making me really focus on a single problem like a bug or issue. And when these issues were comments in the source code it was difficult to figure out what to do next. I guess in a list they make a bit more sense, because you can pick them in some kind of order. I try to fix major issues and bugs first, then less important. Also, keeping track of development pace by date on a fix gives a sense of progress, however small. If you can fix at least one thing per day it's still going to lead into something eventually. It seems like my pace is about 5 items per day which is quite nice, because there aren't really that many of them. Of course, the number of bugs and issues is growing when you test the game, but that's to be expected.

Friday, 5 July 2019

Dragonet

Taking off some time from my other projects and starting a new one. With this I'm going to follow different rules than before. It's a traditional RPG rather than a roguelike, but it's going to have some random things. The actual idea is in the implementation with these rules:

1. Completely class-based without public data (only public interface).
2. Inheritance first design.
3. Everything is programmed as a function to a required gameplay feature.
4. External data with parsed dynamic instances.

I think rule 1 is going to be broken in some places, but not inside classes. Mostly in global instances I guess. I think 3 will be an interesting one, because it's the opposite I've done this far. I've always added features without planning them that much and maybe it's one of the reasons I've spent a lot of time wondering how to put everything together.

Saturday, 29 June 2019

Class design tool

I learned today that there is a class design tool in Visual Studio which took some years to figure out. It's not a built-in part of VS2019 but should be. Seeing the class hierarchy in visual level shows "problems" in inheritance very clearly. Although the class hierarchy can be anything you want, but often a tree-like hierarchy is better, from simple to more complex classes.

There are huge stacks of single use classes in both Kaduria and Teemu which looks kind of funny. I think with this new tool it's easier to fix class hierarchy and it's going to be my short term life goal for sure.

I don't yet know what to do with Teemu's github adventure. I actually hate github and source control, because as we saw anything can happen. I feel it's also unneccessarily complex system, but that's typical in the linux/open source scene. Everything is super complex and obfuscated for no clear reason.

Tuesday, 28 May 2019

Realtek LAN problem solved

Remember the Asus Prime H370 Plus' Realtek Lan unable to connect to internet? The actual problem was that not even Asus knows the lan chip in their motherboard is Intel I219V, not a Realtek. The installation program in original driver CD has the proper driver and I found out that just by trying it, even they often have outdated drivers. The new computer doesn't have a CD drive, but my old has, so I copied everything from there to usb stick.

I've been thinking to create just one blog for my ramblings, but maybe later. The new plan for Teemu and other projects is that Teemu is going in github, but maybe not Kaduria, at least not yet. Not in the development stage. It makes more sense, because Teemu has always been "open" source (the source code is available).

The new PC is nice and fast, but it still does have couple of problems. Since the case fans are DC type (three pin) they for some reason can't be set less than 800-900rpm so they are quite loud. The processor is running average 30C temp, so it's cold and I guess doesn't need case fans to run that fast. So I need to get quality PWM case fans. Another stranger thing is that when I turn on power from switch outlet the lights in the keyboard lit and they stay on (caps and scroll lock lights) until computer is turned on, then they start to work as usual. It may be even some kind of grounding issue, but I have no idea what it is. Related problems when googled are opposite, when people turn off the computer the keyboard lights stay on. But in this case the computer is not even turned on, just the power.