Thursday, 17 June 2010

Events

I've started to use events in Teemu. Before I have had problems to work with events and I never liked them. Until I guess now. Events go well with data-driven approach, because you can load events elsewhere with data and then launch them later. I have kept things really simple and used an abstract base class, then couple of simple derived classes with only one function: Launch(); I started to think about events with long messages that should appear in certain point where you could then skip them without need to press space or enter. But events can be used in many other ways. I just hope I don't get too excited about them...

Monday, 14 June 2010

Teemu v1.2 development started

I'm going to aim for ARRP with Teemu 1.2. I have already added five features and fixed the only known fatal bug (when you try to swap items in ancient cave bottom it crashes if there is no item on the pedestal). There is so much time before ARRP that I may add some serious stuff. One of the ideas I have is break out from the static screen size levels and make some level themes huge. I think the island could be bigger. The nice thing is that most of the level themes probably scale really well to larger size, because I have been careful not to use any literal values. But of course it's going to require some work on display routines and actions like item throwing.

New version of Stile coming soon

I had an epic battle with cursors in Stile, but they should be ok now. New feature is a shadow brush which is the image of brush hovering to see where pixels are going to be painted. Also options and palette are both now saved when changed and there are new options for shadow brush and making the precise brush move one editor pixel at a time so you can also draw more.. precisely with it.

I don't actually need better features for Stile right now so when 0.81 is out I could really continue developing Teemu here at work. This time I could try to aim at ARRP (Annual Roguelike Release Party) and take the time to fix bugs and improve the source code, maybe even add some gameplay content.

Thursday, 3 June 2010

Tool refactored

Refactored CTool (renamed Drawing_Tool) and it's now the owner of brushes. Before that I placed brushes into editor window class. The problem was that Drawing_Tool had double data for such things as brush shape. Now when shape is in the Brush class itself and brush objects are inside the Drawing_Tool the double/copy data went away.

The dummy or shadow mouse of editor window is now also working, but it's still flickering which could be easy to fix. Actual drawing operations went to Drawing_Tool class as well. It added passing of some variables, but it's cleaner that way, because brush objects now contained in Drawing_Tool.

To restore the previous version's operations I only need to add brush size commands. I think icons could be better than using 1-6 keys for shortcut, but they could be both there.

Wednesday, 2 June 2010

It's alive

Spent three hours for getting the mouse hook of Stile work as it should. Removed hacky goto to mouse moving event and replaced with initial call to drawing routine, now separate from mouse hook. Damn it was hard. It's all mess of different types of mouse coordinates, but even here the data-driven shit helped a lot. The routine still has couple of annoying bugs, like jumpy mouse cursor when limiting to an area. In HSV selector I solved that by using a shadow mouse cursor, maybe I'll use that in hook also. I could possibly now merge the HSV selector to the mouse hook.