Friday, 18 April 2014

Environmental awareness

In July 2011 I wrote about environment actions. They are still there, unfinished... but it's like that with large scale projects. Today I was looking at the thing again and decided to add an environment type to all objects as a general way to tell where the object is.

The object can sit on ground like it was another sunny day, but it can also be in number of other environments like lava, pit and even at the middle of air. Complexity requires generalization with another type of class on top of terrain types (or main types in this case, another generalization).

The way I try to tackle this is first make sure objects always know where they are. It's a good start. Then actions (the same actions left from July 2011) describes what happens when the environment changes. I think it's a plan that might work.

Monday, 14 April 2014

@ work again

First day at work, my job is an office assistant (computers mainly). It's annoying. I can't put it any other way. Well yeah, it's only 6 hours a day, 5 days a week, but it still sucks. When I get older I feel like everything that takes my time from game development is bullshit.

The biggest problem is that even at my age I still have too many problems related to my life. You think they could have disappeared by now, but no, they don't go anywhere until you make them go away. I haven't been successful in that and I always think it is somehow reflecting to what I have achieved as a game developer. You need to get rid of distractions before you can concentrate on what you do the best.

Maybe there is something good in this situation, because I feel an urge to find something better. Maybe another, better job? I wish it would be that easy.

Tuesday, 1 April 2014

Delayed events

The re-ordering (still under work) of Creature class has been a success. It has made things more clear and I have also improved parts that have been unfinished for a long time. I regret that I left Creature class alone for quite a long time, but then again when you go back you often see things new way and know better how to proceed.

Currently I'm trying to think how to implement events. I don't want to use them more than I have to, because they can be tricky. Most events will be for traps I guess but there is one for lighting a fuse of dynamite. Of course there are problems. The event is including data about the object, but it's not synchronized in all cases.

Let's say you lit the fuse of dynamite. There will be a delayed explosion event at the location of the dynamite. However the dynamite can get lost in case you put it into a container and move the container itself. The location of items inside it are not updated, because it would be too heavy for even modern computers to handle. Just imagine if all items of all monsters would update their location when monsters move.

There are couple of solutions. You could include the container's id in the event (using its location) or simply search the item from containers if it's not on ground when the explosion happens to synchronize the location. Whatever the solution, I think there must be a two-way notification from event to object and also object to event, because the object can be destroyed before it explodes or something else happens to it.

Friday, 28 March 2014

Clarity

When I went through Monster class I suddenly realized it's a mess. Somehow you look at the source code and it's just not good. It's slightly depressing and also quite odd, because how didn't I see that earlier?

I'm going to re-order class functions and try to create a better arrangement from small functions to the high level functions for AI and actions. I guess it's not a surprise that Monster class is difficult, because it's a part of the player class, too. The way how inheritance (from Monster to Player) is done in this case is not the best, but when I was programming it I couldn't think of any better solution either and I still can't. I guess you should isolate the basic functions for both creatures and the player, without any reference or difference to the player.

I seem to run out of hours per day which is annoying. There is so much more to do each day. They say that when you get older it feels like time is running faster. I think they are right.

Thursday, 27 March 2014

Keyboard commands

I started to look at how keyboard command help is displayed. In most roguelikes you get a long list of commands in black and white ascii display. I decided to try something different. Rather than having one continuous list of commands I placed them on categories and this is a part of the command window:

I think it's much easier to find commands now, compared to the plain list. I guess 'fire projectile' could be an action command, but those can be changed later.

Wednesday, 26 March 2014

Farm Simulator 2016

Simulating plant life is interesting, but sadly quite complex subject to handle. I'm currently revisiting plant game object class and trying to improve it in moderate steps, not trying too hard to create a complete system, but build firm roots for it.

Sometimes I have jokingly called Kaduria a farm simulator which it's of course going to be. What could be more interesting that watch grass and other plants grow?

Even I have now Mac Mini as my music studio computer I think it's somewhat unstable and unpredictable kind of computer. No matter how much people complain about Win7 it's actually super stable once you get it to run steadily. I think only problem with PC/Windows is the way Windows penetrates hard drive all the time, making HD the part of PC most likely to break in a long run.

Mavericks (I think it's the name of latest MacOSX or whatever) has crashed already twice, something that almost never happens to Win7 itself. I think OSX's unix background gives it some kind of ancient feel if you know what I mean.

Saturday, 8 March 2014

Level themes - static or random?

One of the huge tasks in Kaduria are various level themes. As I mentioned earlier I gave up on trying to create a single engine to produce all level themes. I couldn't do it, it was out of my reach and also quite difficult to admit, since I'm such a genius.

But problems don't stop there. You still have to create themes that have the distinctive look, yet try to be as random as possible to increase replay value. It's a difficut task and I'm having problems even trying to create all themes in somewhat static form (always including some key elements).

This is a problem that gets harder if you want it. I could just let it go and create static themes and possibly even remove permadeath from the game. That way the player could complete each game and never have to run the first levels again and again. But removing permadeath would change the gameplay to more traditional RPG rather than roguelike, where permadeath is an essential feature, possibly even the most important of the key features.

Another possibility is create only few static themes and much more random type themes, or maybe select from couple of themes to get more variation in static themes as well.