2013-01-28

Weekly update MS04x07

Well, it didn't turn out as I hoped it will. But on the other hand we spent lot of time together. Mostly watching all series of "Pitbull" (around 25 hours in total, but over three days).

Only thing that I did in code, was to tidy up loading global settings. Now they are loaded before everything else happens, which means that now resolution can be set with settings file and pixel size might be use as a value when reading stuff from file (for example instead of telling that something is 1.5 units wide, it can be specified that it is 32 pixels wide - it should really help if someone would decide to change size of pixel, for any reason - but of course if every value would be given pixel-based, then it won't matter).

I also had some thoughts about walls and have an idea that should make it easy to specify pieces for walls, doors, etc. I hope that I will do that during this week and I will be able to show some video or screenshots of how new render system looks like - but don't expect anything spectacular, I haven't done any graphics that will go into final game. Not yet.

2013-01-23

Weekly update MS04x06

Well, I did just one thing this week, but it was not so small one. I finally have proper render system and it works (gathers data abound objects in room and displays them in right order). I also have mouse input working.

I write this post on Wednesday of following week. I could do much during weekend and for half of this week as my wife's got sick (and both dogs too) and now I take care of them. And do some other stuff too - one that gives me some money and that has to be done at some point. I thought that while I have some time between going to one doctor, doing some housework, etc. I could use it to write Dragontorc or to do all the stuff that I have to do till end of January and then, when I'm done with it, I can go back to Dragontorc. I still have Thursday and Friday and Saturday and guess what more? Sunday! I know that I won't do much on Thursday as I need to finish the thing I am occupied with right now and I also have minor surgery on Thursday that may leave me in pain for few following hours (I had similar thing year and a half ago and painkillers helped but didn't obliterate pain).

Back to Dragontorc. Plan is to create descriptions of rooms and doors, some basic graphics and put that into render system and that is a little bit tricky, but I will explain it, when I will be presenting that stuff working.

2013-01-15

Weekly update MS04x05

I'm back!

I started to work on moving from GLFW to SDL and to create proper system handling classes and renderer. Before it was just calling GLFW functions directly, rendering everything by going through all objects. And because I switched to purely 2D graphics, I had to order all visible objects and that's why I came up with renderer that gathers all data - code still goes through all objects in a room, but instead of drawing them immediately, it just stores, what and where should be drawn. This also means that it is now possible to gather data and process next frame, while current one is being rendered on separate thread. With 2D graphics this may sound as overkill but:
  1. I didn't do that yet. It runs on one thread.
  2. I want to keep all code clean and rendering functionality should be with rendering stuff.
  3. Switching in future to different graphics (voxels, 3D models) should be less problematic.
  4. It is modular.
  5. I had to solve issue of holes in doors. I want users to be able to create custom/new graphics and to make it easier for them. And as it is 2D graphics, I need some ordering of objects and drawing objects that are partially beyond the door.
And as for switching from GLFW to SDL. SDL provides all modules I need (although some need extra stuff to be done), it also handles any size of graphics, not only of power of 2. And finally, system classes are held in one place and if I ever feel that I should use other solution, I will just have to do it in one place.

Only thing I did since beginning of year up to last Sunday were commenting out old functionality, compiling libraries I need (sdl, sdl-image) and creating base for system classes. My mistake was to try to use sdl2 and I managed to modify sdl-image to compile with it and then prepare vapi for such sdl-image (I named it sdl2-image) and then... I realised that I really don't want to prepare vapi for sdl2. It is enough that I have to modify vapi for sdl to add functions that I find missing (SDL_SoftStretch, SDL_DisplayFormatAlpha).

Don't worry, this week I will make greater progress. I still need to think about how to represent graphics for walls/doors, well, regions in general, but that's separate issue.