Thursday, 26 January 2012

Framework classes

There are now 15 classes in the framework. Still, I want to extend the framework to higher level classes. Some of my goals are GUI itself and a generic Message class to output roguelike style messages. The current one in Kaduria is a real mess, it's very big and confusing so I have to think hard to create a better one.


This is the current list of classes and enums. Tar_Ball is a serialization class with binary/text data format. I'm quite proud of it actually. One of the problems I have to tackle is how class instances should be created. This far instances like Keyboard and Random_Generator are global, because there is only need for a single instance. It's not modular, but I don't know a better solution. Although Random_Generator could have several instances in classes where random numbers are needed, but the seeding should then happen somewhere else. Classes that are global usually can't be used as local instances, because they load stuff or are otherwise heavy to initialize.

Monday, 23 January 2012

Framework

Thought it would be a good idea to create a generic framework for the next project which is that 7DRL I was talking about in the previous entry. I have programmed some modular classes during these years which I have used in my projects. You can view some of them in Teemu's source code, especially in 'classes' subdirectory. What I want to do is make them even better and for that I'm using GCC which is more anal about purity of C++. I will also compile the code with Visual C++, because it's my main development tool.

Building a framework or a library of useful generic classes is wise. It reduces the amount of time spent in setup of a new project and improves code quality since usually those classes have experienced a good amount of testing. What I also would like to achieve is a number of higher level classes that could be used as a base for each new project. For example this far each GUI class has been specific for that project, but I'm hoping to create a generic GUI class which then can be extended with new features.

Saturday, 21 January 2012

Plans for the next 7DRL

I have an idea that could be implemented as 7DRL. While working on Kaduria (and Teemu) I have possibly started to think that a tile should own everything it has. In practice this means that each tile should have container list for items, flags for different stuff etc. For some people this is the way to do things anyway, but it's new to me, because this far a map has been just a collection of tiles, a simple 2D matrix. But when you think a tile as an object that can hold and own stuff it begins to look more and more a good idea. It makes many things easier, but could possibly make others harder.

Another thing I want to try is game objects without inheritance. Just one class for all game object types. It should be easier to do now when I have more knowledge about data-driven style.

If the "tile based" approach works really well there may be a brief refactoring session in Kaduria...

Saturday, 19 November 2011

Skyward Sword

The european release day was yesterday and of course I had pre-ordered Zelda: Skyward Sword like three months earlier. I'm not a die hard fan of Zelda series, but I do have a habit of getting new Zelda. My initial reaction was disappointment. Really, they took Ocarina's engine and added some kind of DOF filter to it. It's just like old days: moving around is dangerous, because Link shoots from 0 to 100 in 0.01 seconds. Even the camera sucks like it did in Ocarina of Time. Characters consists of like 20 polygons. All this in 2011. I guess some people like retro, but I'm not one of them.

Then there is the old school game design like dialogs you can't skip and it's typed one letter at a time, slowly. People talk a lot and they repeat their bullshit a lot. I could live with retro graphics, but game design like this. Fuck.

So is there anything good in this game? Well the animation of the sword is impressive. You can feel the weight of the sword. Handling the sword is cool in places where you have to cut stuff, but I haven't yet learned to use the sword in combat. I'm just swinging around like mad. Maybe it's just me. I also like the stamina meter, even it's just a small detail. It makes things like hanging on the ledge much more interesting and "realistic".

After a well slept night my anger has settled and I feel that I can play this game. There are small positive things like level design and maybe even character design (those funny characters) that makes it worth it to take beating from the poor aspects of this game.

Thursday, 17 November 2011

Teemu continues again

My new plan is complete Teemu 1.3 before 2012. It gives me something to focus on and it's something I can finish in relatively short time, since Kaduria is not going anywhere soon. Some planned features of Teemu 1.3 will be removed from the to do list for 1.3, but not the important ones.

Filco Tenkeyless has been working great, no bugs or whatever. Now I don't understand how I was able to use keyboards like Labtec Ultra Flat. I guess it's difficult to spot if something is wrong with the keyboard. It's possible to write with any kind of keyboard, but writing with Filco is just easier.

Sunday, 16 October 2011

Filco Majestouch 2 Tenkeyless

It's a new keyboard day. I don't know how long this model has been available, but it's without keypad section and it's Fin/Swe layout. It was 130 euros and the keypad (also Filco) 60 euros so it was quite an investment. However I feel now that getting tenkeyless version was really good idea. It's narrow without sacrificing the standard keytronic layout. Narrow is good, because then the mouse is closer to the body and your arm doesn't twist that much to the side. When you work with computer like I do things like this matter.


After so many years of tightly packed keyboard layouts I keep hitting Ctrl when I try to press left arrow and also I noticed that I press + from the keypad which isn't there anymore so I need to learn press it from the keyboard. This model is "brown cherry" (tactile). It's doesn't produce a clicking sound like blue one, but it does sound like "clank" when you press the key all the way down. It could be described as more noisy than a regular keyboard, but it's not too noisy.

The quality is an interesting question, because it doesn't really feel a lot different than old keytronics. But I guess keytronics were good. Keys are tall and wobbly, but easy to press down. The keyboard is small, but it's quite heavy and with those feet thingies extended it stays in the place and doesn't move even when typing hard.

Funny enough, I've run into one "bug". It happened when I was programming: suddenly the keyboard flushed about 30 space bars or so, like there was some kind of buffer problem. I think it might have something to do with the USB->PS/2 adapter which doesn't fit tightly in the slot. I haven't been able to reproduce that bug, but even if it does happen again I don't have the heart to complain. These guys are serious about giving great alternatives to your typical keyboards with these kind of special models.

I didn't even know how much I did miss the standard layout and feel of tall keys. Now it's time to kick ass with this keyboard and get some programming done.

Saturday, 1 October 2011

Random thoughts

Working with Level class I've managed to narrow down from 21 functions to 15 in two days. The biggest issue with Level is how to determine what objects (mainly creature and item types) are created in a level of some theme. Previously I had static lists, but that's not very clever and it tends to create quite similar levels what comes to objects.

An idea I had with creatures is give each creature a difficulty point. That would allow to set a max level for each level theme and create monsters to that limit by determining how many difficulty points are used. If you create a harder monster you get less monsters. That way a balance in difficulty is maintained. Need also some kind of way to determine where the monster wants to be usually. It should be just a generic rule to allow most of the creatures to created everywhere, excluding quest creatures.

There are still special set of objects created in some level themes, but I've tried to keep that number low. One of the main goals in this version is increase the randomness which is pushing Teemu towards the realm of a roguelike game.