2013-03-25

Weekly update MS04x14

Bad news. I got sick and I still am sick. Because of that, I did only some minor things and just wrote more info about implementation for stuff I want to do next.

When this will happen? Problem is that now I have few things on my mind: my current job, book-keeping app and Dragontorc. And of course there is my wife, my dogs, dancing lessons and at the moment there is also that thing with balcony that I'd like to end as soon as possible. And I'd like to have some fun from time to time which is not obligatory but helps :) Out of those things Dragontorc unfortunatelly has lowest priority which means that if I have lots of things to do, they may occupy me too much and Dragontorc stops sometimes or just barely moves forward.

If there won't be any weekly updates, then it is because of such pause but I will try to do even something small every week. Just to keep things alive :)

2013-03-20

Weekly update MS04x13

Important thing was done and part of it was working at first attempt (I love when such thing happens, you write not too small piece of code, compile it and it just works as expected) and it was bunch of changes in rendering.

I now use BSP (which stand for binary space partition) to render sprites that intersect each other or to render objects going through doors. I already tested it on wizard going through door and it works fine - although result is almost not visible, on the other hand, without it, it was right in your eyes.

I hoped that I will have some graphics for doors but I don't :( And because of that, no screenshot this week, but in incoming updates I'd like to show how scene is rendered bit(map) after bit(map). I already have tool to do that and need to find nice example and turn it into gif.

For time being, I will keep gray background.

Ok, so what next?
1. Graphics for doors definitely.
2. More advanced door placement (to avoid placing them where they should not be).
3. Floor generation.
4. Generation of items on different planes.

Given more time, this should be task for couple of days maybe, but this may once again turn into weeks :( But step after step it is getting there.

2013-03-12

Weekly update MS04x12

Another busy week and this one might be not better.

There were couple of minor things related to room generation. I added temporary door generation, so at least there are some doors now visible. I also fixed, and I hope that it is final solution, pixel alignment, so objects inside room, room pieces and other elements are properly aligned now.

And final, probably post important thing, that was done last week is support for rendering masked objects. This is what I need to render objects going through doors (or that are on other side of door). Current solution is not optimized (but marked with TODO marker and description what should be done) and is quite simple. Render target is created that bases on graphics for door hole (source). All objects should be rendered then on that render target. Then alpha channel is copied from source (door hole) and finally result is rendered where hole should be rendered. Well, it will be so, as at the moment it was just tested without proper placement of objects and hole.

When I do rendering of door holes, I will add doors and I will focus on something that I hoped to avoid. To  be honest I also thought at some point that I will be able to avoid this door hole rendering but even without doors I noticed that wizard sometimes is rendered on wall although it should go through hole. And second problem seemed also like something that most users won't notice but I know that it will look bad unless I do something. I thought that I will find some easy, maybe even hacky solution for rendering objects inside room. For normal objects there is no problem but when it comes to door wings it starts to get trickier. I decided to stick with simplest solution and use BSP (binary space partition) to properly render objects behind and in front door wings.

And one screenshot to show progress. I used grey background to test alpha blending (well, not blending, as now it is used just for masking) and it resulted in quite nice look. Of course door hole look strange like that as shadow seems to leak out from them. You may also notice that right door hole is not aligned to wall (it is rendered 1 pixel left to where it is supposed to be). I want to fix it, but if I don't, I think that nothing bad will happen, as proper graphics should not have such visible issues). How I would fix it? Add info about alignment, in this case, this camera angle, it should be 2 pixels and all doors should have locations aligned using this value. But for now, I will leave it, as it is.


I hope that during next update, I will show you not only door holes, but fully working doors - but maybe without proper ordering method.

2013-03-05

Weekly update MS04x11

I did just some minor changes in the begining of the week. And I was occupied with other stuff during weekend :( But I plan to code at least one hour each day in the evening. I still sometimes go to bed around 1 or 2 am and get up around 7 am, so streamlining few things should not affect my health too much.

Other news. I started wiki, using  dokuwiki on my server, but mostly to check how does it work. I copied few bits from my internal documentation and just take a look at various xml files that define stuff and I realised that it already is not so small as I thought it is. I will try to write documentation, at least to have general ideas on wiki, but I know that at one point I will have to spend lots of time to document everything and create tutorials.

But now, let's go through room generation and do some travelling between further locations!