Thursday, 14 October 2010

Gui programming part 3

Another long day at work. I have added an option to adjust the editor pixel size between 3-7, but that's all. Usually when I get some feature done I'm already adding a new one to the list. Bugs seem to work the same way. Next major thing before anything else is get rid of two fonts and create one font, better than both current fonts. That should make some gui stuff easier to create.

I don't know yet how to handle the hovering help system, because at the moment events are check only when there is some action (mouse moving, clicks, keyboard) so you can't hover on gui elements to get a popup window. I'm aware that help system would make it easier to learn how to use Brick Atelier. It's obvious to the developer, but painful to other people trying to figure out how the program works.

Thursday, 7 October 2010

Gui programming part 2

Refactored the map editor of Brick Atelier, though it's missing implementation of some drawing tools. If I want to get them working I need to create another layer and a mouse hook just like in main editor. I guess it's not that hard and it's nice to have circle and box drawing routines for map editing.

It was easy to add the icon set for map editor tools and I'm glad I wrote a (more) modular icon set class earlier, because I was already thinking about icon sets for other than the main editor.

I'm programming Brick Atelier mainly at work which is kind of strange, but I have some spare time to spend and I'm just slowly programming stuff and trying to make the time fly faster. It certainly does. I don't know any other activity that makes time go faster than programming. Well, maybe it's the same for things that require concentration.

Monday, 4 October 2010

Gui programming

One thing that makes development of Brick Atelier (former Stile) hard is not only the low level gui programming but the fact that the way I programmed the "engine" was really not that clever. It's not impossible to fix the problems, but I found out it takes some work.

For example I had defined consts for zoomed pixel size and of course used them everywhere. Now I want to be able to adjust the pixel size (it's the way to make the app window smaller or bigger for different resolutions) with an option. Replacing consts with a getter for external classes is not that hard, but it's also quite risky code, because of initialization order stuff. So I need to pass the pixel size to both brush classes (which could be combined by the way), but they are allocated in Drawing_Tool class and that class could be refactored out. So making changes like this may sometimes require a lot more work than just simple replacing stuff.

This constantly reminds me about the importance of planning. When I start the next project, whatever it is, I'm going to plan it well.

Wednesday, 29 September 2010

Brick Atelier

Now when Teemu 1.21 is released I can take a look at my sprite editor Stile. I changed the name to Brick Atelier which I think is better, since there already is sTile and Stile is a boring name. I had to redo some stuff since I lost the original Brick Atelier version, but nothing major (I hope) was lost. Just the Brick Atelier logo for info screen.

There are some stuff I want in next version (0.83), mainly some kind of contrast/brightness (maybe even color) adjusting for selected tiles and tile import from another .wst file. Those I guess are the main features.

I think SDL could be a wrong library for this kind of software, because it has been quite hard to do GUI stuff from scratch and I still don't have a portable file browser (using Windows browser inside SDL which is some kind of hack). I just don't know if the current features could be done with some external GUI (and maintain the speed).

Friday, 24 September 2010

TEROS

After failed searching free and simple role-playing system for Teemu I started to plan one myself. It's called Teemu Roleplaying System (TEROS) and it's based on seven basic attributes with initials APEWASH. Plus alcohol as regaining health and stamina. The basic idea is make both attacking and parrying attacks consume stamina which then affects to overall performance. The way armour works is also a bit different than usual. I wish the initial system actually works, but if not it's always possible to tweak something to gain more balanced system.

TEROS will most probably be in the next major version (1.3) with more items and monsters.

Thursday, 23 September 2010

Playtesting Teemu v1.21 day 2

After fixes I still found one bug, but it's not fatal. You can enter the border exit with > by standing on it.

I think there is no need for more food now when the spawning is actually working. The cellar seems to be little crowded sometimes, maybe less monsters there.

When developing a roguelike there are going to be balancing issues. For instance how to determine the amount of total food items and how to distribute them in levels so that the food clock doesn't become too difficult or too easy? A scientific way could be count how many turns a level takes to solve and calculate the food consumption per level, then planning food distribution based on that data. Or you could just playtest the game to see what happens.

However it's difficult to determine the amount of turns per level, because the number of enemies is changing etc. Even the random placement of objects gives different results. When you design a static (non-random) world balancing is much easier, because you can make detailed plans how to distribute items and monsters.

One way to solve this is look at the player's food situation and create more food items when entering a new level, but it could then become too easy if the player realizes that it's going to happen.

Wednesday, 22 September 2010

Playtesting Teemu v1.21

New data-driven stairs connection system is mostly working. There is one problem area I need to fix and then it's ready. I was wondering if I could put at least some new content in 1.21. Maybe a low nutrition food item that's easy to find, because I find myself drinking rum to stay alive. Now when there are changing number of cave levels the treasure chest creation must be refactored, but that should be easy. Creating the stairs system was a bit hard, but the great thing is that now I can use it in Kaduria too.