Sunday, 17 March 2019

Banana Rogue

The license of Advanced Rogue tells you can't use name Advanced if you derive from it so the project name could be Banana Rogue and in the story you work in a banana plantation, but want to escape hard working conditions in nearby deadly dungeon which sounds much better option.

I found rnd() function from main.cpp and it really looks like main could need some cleaning up. There is some kind of "network" code which is going to be removed. Also, there are signal handlers in case the program crashes which makes the player die from bug. I think it's better remove those also, because if the game crashes it's better to make it possible to load the game from possible existing save game.

This project really needs a gui module and there is already io.cpp which has things like msg for message output, but it could have everything gui related in it. I think the game doesn't have a "level" structure but it has at least four WINDOW arrays (which work as layers) which I think are from missing curses library. They are simply char arrays if I'm interpreting the code correctly.

I found another 'when' keyword switch-case which has the first keyword 'case' but the rest are 'when'. It's quite baffling, because I can't even find any mentions of 'when' being a keyword in C.

Saturday, 16 March 2019

Confronting a vast cosmic mystery

It might be possible that the random Advanced Rogue source code that I downloaded from somewhere and started to work on could be obfuscated. One clue for this are the missing function declarations, but I've also seen a switch - case with two 'when' keywords. Or could it really be possible that it's written in some kind of special version of C?

Anyway, rather than trying to compile one file at a time (which is still not even possible) I've started to re-create header files for each file with functions it has. There are some functions that has to be replaced, but luckily more modern alternatives are possible without changing the call style. One of those is msg() which has a vararg style parameter list, but the syntax is different than it will be in the "modern" version and also I'm probably going to change the internal implementation to std::string, because it just looks like it's better that way.

The number of datatypes I've seen this far is reasonable, it's four: coord, object, thing and linked_list. The last one is a manual linked list as the name implies and it could be heterogeneous through void pointer magic, but I'm not sure yet. But it's using macros to allocate memory for objects. I'm not sure if it's useful to replace that with something safer, at least if it actually works.

Friday, 15 March 2019

Advanced Rogue

I was reading the source code of Nethack one day and noticed that I can also read source code better these days, mirroring my increased skills in programming. So I downloaded the source code of Advanced Rogue which I think was last updated in 1985. Rogue had quite a number of variants just like Angband later, but I've never played any of them.

The source code of ARogue seems to be quite small, but it's also old school C which means that weird way of writing function definitions and declarations. The plan is to rewrite the source code to C++ (not OOP, but keeping the procedural style) just for fun reasons and I've already on the way. Another "problem" I guess is curses which is an external library used in ARogue and it's not included, but can be replaced with SDL2 gui. It's possible that curses has also changed during all these years, so it's probably not going to work just like that. However I could even keep the old function names so in theory it's possible to replace SDL2 gui with curses, or whatever.

As a small mystery some functions are defined, but not declared in any of header files. Or in this case rogue.h which is I think one of the two header files the project has. Creating header files for functions defined in a .cpp file is another task in the list.

Other than that I think the majority of old C code should run in a modern C++ compiler, but we'll see it later. There are lots of pointer stuff in ARogue's source which can be a problem and also I'm going to replace memory management routines with C++ code.

Sunday, 21 October 2018

How to fork

For those who don't know "forking" is creating a new version of some open source project. But it's important to know also that this term is just a phrase or idiom which is something open source developers say when they don't want to listen to user feedback.

Forking is in theory possible, but it almost never works. Most of the open source projects are linux-based and this is actually a big obstacle for Windows developers. Often the problem is not in the main source code itself, but in required libraries which in worst case require compiling from the source. To remain sane it's best to be a linux user, but the irony is that only crazy people use linux. Those who think the government is watching them when they wrap their joyrod in tin foil while watching Alanah Pearce's cosplay videos for research purposes.

The second problem is that most open source projects are large. It's not easy to fork them just like that. You need to know how to program in the first place and then how to use some of the usual libraries like wxWidgets or whatever in the context of the project. The overall quality and structure of open source projects is poor, sometimes very bad, so it makes forking even harder when the source code is not that readable.

These two problems are the main reasons why we don't see forks. If it were easy we would see forks with projects like GIMP which is slow, buggy and badly designed. You wish someone would fix it, but nothing ever happens.

So why don't the developers listen to feedback and fix their projects? It's an interesting question which calls for wearing tin foil in whatever bodypart you want to. We do have many open source projects which are almost as good as commercial software, but never better. Big projects are run by foundations or similar quite shady groups of people and money is involved in the development in one way or another. Sometimes it feels like "they" don't want to make software better than commercial versions.

Forking is a smoke screen, it's a way to end the conversation about how to fix the project. I believe all bigger open source projects are monitored by people who don't want free alternatives to replace commercial software. They watch these projects and start to ruin them when they become too good. Just look at what happened to Blender 3D. They made the UI much worse and we still have to fight against that ridiculous right button select issue. Blender is run by a strange millionaire who is taking orders from no one, well other than his illuminati friends I guess.

Another strange thing indeed is that most of these so called free open source developers are millionaires. How did they get their money? Even Linus "Rolle" Torvalds is a multi-millionaire and he did what? He took some ancient unix source code and forked it to a new operating system. Where did his money come from? Who paid him to create an operating system which would never be a viable option for commercial systems, but would rather confuse everyone for empty promises.

I think the whole open source ideology was ruined by "them", the people who did not want it to succeed over commercial software. Let's hope that some day we will learn the truth and begin a new era of open source development.

Friday, 27 July 2018

Roguelike definition – what are we missing?

There is some debate about “the definition” of a roguelike. Some argue that a roguelike must meet a list of essential features, but even those features are different depending on who you ask. What I think we are missing is the feel of the genre. It’s easier to feel than you would think. When we see a platformer or a RPG we can feel it from couple of generic features. Platformers have platforms you jump on and role-playing games have a RPG system with character classes, stats etc.

I feel that the essential feature of a roguelike is a top-down tile map of the game world with turn-based tactical gameplay. The gameplay should also have some role-playing features, but to increase the feel it better have a complex role-playing system similar to Dungeons & Dragons system. When we look at a roguelike as subset of role-playing game it’s easier to get the proper feel about it. The difference between a regular RPG and roguelike is randomly generated game world and permadeath, although it’s possible for a RPG to have some random features and permadeath. In similar manner some roguelikes can have static locations and various ways to restore the character after death. Even the classical roguelike Nethack has ‘bones’ for giving back some items from a previous character.

ASCII graphics makes the game feel more like an old school roguelike, but it’s not a decisive feature. The reason roguelikes had ASCII graphics was mainly a technical limitation and in broad sense ASCII tiles are “graphics”, too. They are just a way to represent something. Some roguelikes implement both ASCII and tile modes which work interchangeably and make no difference to the gameplay itself.

It’s quite easy to feel when the game is not a roguelike. It may look like one, but it’s often missing the complexity and size of so called major roguelike. These games have their own genre title as roguelites, but in some cases it can be argued if they are simply adventure and/or (action) role-playing games with some roguelike features. Games like Spelunky are sometimes thought as roguelikes, but for me Spelunky feels a lot like platformer game, it just has randomly generated levels. Random generation is not a feature only for roguelikes, it can be used in all genres. What makes it a feature of a roguelike is the proper context.

The problem of a flexible interpretation has been a saturation of the genre with games that in fact are not roguelikes. Some developers use the genre name in marketing, because it’s easier to get visibility for your game when you have a clear genre for it. When even developers think their game is a roguelike the genre has regressed from major roguelikes as standard to something else. It’s “acceptable” to define your game as roguelike when you have one or more features of a roguelike taken out of context.

Let’s be honest. We can all feel when the game is a roguelike. It’s all that matters, for both developers and players.

Wednesday, 2 May 2018

Nethack 3.6.1 thoughts

I think this release was slightly underwhelming. They fixed couple of things and it took two years. On the other hand it's understandable when you look at the mess which is Nethack's source code. It's not easy to maintain I would guess. Even so I was expecting more gameplay changes, new stuff etc. but it looks like they "freeze" this version branch and the next one will have more changes so people who want to continue play 3.6.x can do that. There are people who believe some specific version to be the only real Nethack.

The way player character's name is highlighted when your HP is not full is a nice feature, it's something you'll notice right away. Other thing I noticed is that $ keyboard command doesn't work when picking up items, but I did comment out "Finnish keyboard" section in defaults.nh, maybe I should try to comment it again to see if it works. In Finnish keyboard $ is typed as AltGr + 4 and some other keyboard commands are also different. Also, the .exe was acting strange way when I started it the first time, it hanged for like five minutes and then Windows 10 smartscreen catched it, but I ran it anyway. It may be just the smartscreen, it's warning about everything.

Even I'm whining I actually like Nethack. It's really the only roguelike game I'm playing even I'm not a good Nethack player. I know what happens in the game later, I've seen gameplay videos and tried in wizard mode, but I probably like the beginning before Quest more than anything else. It's the way things start to go, sometimes you get very lucky and sometimes you get hardships. The first time I tried this version I managed to blow up my pet with a gas spore, and then turned into a werewolf. I also learned something new: when you kick a pile of gold it scatters around. I had to try that to pick up only gold, because $ key doesn't work.

One of the reasons why roguelikes are nice games is that you don't have to win. At least it's what I think about the genre. Those people who want to win will push it through by learning strategies you need to win this game, but I think when you don't learn them it can be just as fun.

Tuesday, 1 May 2018

GIMP 2.10.0 review

The first impression is positive (using Win10 version). It's faster than before and seems to use only small amount of cpu resources which is really great feature for a paint program. In comparison when you run something like that awful Windows 3D Paint it's way much demanding for the processor. Gimp is quite large software with 8000+ files so it's surprising how snappy and fast it feels.

It's designed mainly for image manipulation, but I think it's missing an opportunity to be more than that. I would not use it for serious art design only for the reason it has a context menu in right mouse button. And you can't configure it to anything else. For painting it would make much more sense to have a secondary color, eraser or something like that in the right button.

It also could have a "tiled" grid to show tile areas (when drawing tile graphics) with regular grid you could configure to pixel size. It does have a small preview for image, but that preview could be configured to show a small area in repeated mode to preview tile seams. Those are perfectly possible features to have, but I just know they will never do it. Another obvious but missing feature is any kind of shapes including a line (which is hidden in form of shift+pen).

Strangely Gimp does have a new brush engine which is quite nice so it's weird that they support painting that way. Also, another strange thing is that you can't put color editing on tabs, but there is a palette for selecting colors. When you need a new color you have to edit it on a pop-up window each color at a time. All this makes the software feel like it doesn't know what to do. Is it only a image editor or is it also a paint program?