2013-10-20

Dragontorc MS4

Although few things I'd like to change, I decided to close MS4.

In this milestone I created new rendering system (using SDL surfaces), room interior generation (more on that later) and simple travel system.

All graphics is temporary - programmer's art. And looks awful :)


As I decided to switch to C++, it may take some time until I convert everything to C++. And I have no idea how long this will take. And...

I'd like to try something else for some short time, experiment a little bit with procedural generation. I am not that happy with what I have now for room generation and as I'd like to make it proper and to use procedural generation for much more things, I will try something else (to not fall into same mistakes) and I will be updating here to show results.

2013-10-15

Weekly update MS04x35

I couldn't do too much during last week (weekend was "lost") but I still did few things that I am really happy about. Of course those were related to porting to c++ as I was sucked in by creating basic systems to be able to port whole code to c++. But boy, it was fun!

I have arrays and lists. I have some concurrency mechanisms, own thread management (threads without affinity masks set up), own immediate job queue system - I have immediate jobs queue and I want to add async job queue and a helper class that will support multiple queues with priorities. I'd like to make it work on as many cores as possible with basic separation into:
  • main thread (responsible for adding tasks for other threads, that will also do single threaded immediate jobs and all other immediate jobs)
  • rendering thread (will only do rendering and maybe some immediate jobs and/or background loading)
  • background tasks thread (will do background tasks and will load things in background, and do immediate jobs if nothing else to do)
  • immediate jobs threads
With such approach, I will have one thread doing rendering. One thread for single threaded immediate jobs (all physical activity that can't happen at the same time as other systems). One thread reserved for background tasks (it shouldn't happen very often and loading should go there, but on more cores I could have more background task threads and separate background loading thread(s)) and all other threads for immediate jobs (AI/logic, animation system, particles). And I want to pack everything together, so at any time there won't be any idle thread. I need to come up with list of jobs (basing on what I wrote above) and priorities for all threads.

And of course I want to make it possible to run on single thread too, as it will be easier to debug stuff and some computers may have just one core.

When creating code in vala I was already thinking about parallelization and I made clear separations in as many places as possible. With vala I could still do same things but it would be slower (in execution), it would be much harder to debug and I would have to add mechanisms that vala doesn't support by default and would introduce some mess into the code (there's no easy way to do pooled objects, not as easy as in c++).

For now I would still like to do missing bits (async job queue, job execution class) but I am switching back to vala to add things that are missing for this milestone.

2013-10-08

Weekly update MS04x34

The plan was to finish MS04 and then start porting to C++ but on the weekend with few hours to spare I started to implement some stuff (and reuse those that I've already written few years ago) that I will need for C++ version. Then of course I will spent at least few weeks to port everything. But you have to believe me how much difference there is between writing code in notepad++ and in Visual Studio. And to debug it. And now I even have stuff to detect memory leaks which should be handy to keep an eye on what's going on in the code. I could spend lots of money to have proper Visual Studio (not Express Edition) and Visual Assist X but now I can live without them. Although I tend to try to open file with alt+shift+O, go to definition with alt+G and try to do few other things that are so obvious and natural to me now. When I think of writing code, compiling at command line and wait for it to compile few minutes... No. And of course with some fundamental changes in C++ I may wait a lot too, but just minor changes should be quick.

I still want to do few things (implement pool, list, xml loading) and that should be enough for now and I'll get back to Dragontorc - now, with my recent hook I renamed it, but as I am still not sure about new name, I will keep on calling this game Dragontorc - have no worries, there is still wizard, servant, items and magic. 

2013-09-24

Weekly update MS04x33

Or rather lack of updates. There are lots of things happening at the moment and while Dragontorc is on top of activities that I don't have (or really want) to do, this means, that for last 3 weeks I haven't done almost anything except things that I had to do. Well, few times I watched something on TV. Once it was polish edition of "Whose line is it anyway" which was quite good and I also watched something else that I don't remember. Oh, and I played Tau Ceti for 5 minutes. Those were extra things that I really didn't have to do neither I really wanted :)

But back to Dragontorc. I am considering quitting my current job at some time in future (not until current project is finished) to focus on Dragontorc (and probably something based on it, as I won't make much money on remake of forgotten game. probably). First, I'd like to save some money to make it possible for my family to live for at least one year without any worries.

2013-09-02

Weekly update MS04x32

Even if I have crunch, I decided to do something every day. And I did. But stopped at weekend and during this week I have to focus on refitting kitchen (because we want to do this before baby comes to the world). Anyway it was a little bit crazy, 10-11 hours at work, couple of other things happening and then working on Dragontorc 1 to 3 hours until 2 or 3 o'clock in the morning, but I did some very important improvements to room generation. There are now priorities for links/connectors so it is easier to decide how bigger spaces are filled with pieces. There are attractor anchors that should help with placement of doors and some pieces on the grid. Why?

I was looking at original Dragontorc and trying to figure out how forest and stone henges were done and then I realised that every graphic piece has same width, but while pieces in my game can be liked that, doors are added on top of the pieces in any place so with my current system I was not able to generate forests or stone henges similar to original ones. But then I thought that I can place doors only in certain points - in the centre of existing pieces. And to not have trees on pathways, I can place trees afterwards as additional decoration. That I had in my plans, to have additional pieces as final decoration - pictures on walls, pegs sticking out, bushes, etc. I also did some improvements for displaying pieces and started to add forest, but I still need to test decoration pieces for floor and ceiling. This can be great to have vertical doors placed above skins laying on floor, holes in floor aling with cracks.

Probably without crunch and when refitting is over I should be able to speed up things. And word about crunch. I agree that it is exhausting but when I read that some game devs resigned from work after they had to crunch for less than a month for 10 hours during weekdays, I have no idea what to think about them. I crunched many times. Sometimes it was 10 hours a day Monday to Friday for week or two. Sometimes it was Easter spent at work (except for Sunday). Sometimes it was 30 hours straight. Sometimes it was more than 12 hours a day Monday to Friday and 10 hours on Saturday for 3 or more months (and then game didn't sell all that great but wasn't flop either). Sometimes it was because someone miscalculated how much time we need or things were changing but to hell with that. Crunch happens. If I will be going to release my own game and I will want to have that final push to polish things out, I will crunch. And crunch bonds team. But if it is possible, people should not crunch, because many times it is due to fact that someone made wrong decisions. But sometimes it is better to crunch for two weeks once in 3 or 4 months than to have one long big crunch period.

Alright, now let's get back to Dragontroc. What I have and what I miss? I have forest without proper trees. I have travel without moving obstacles. And that's what I still want to do. And I will do it as quickly as I will be able.

2013-08-27

Weekly update MS04x31

I'm back!

I was thinking a lot about what I want to do in the game and how. And I came up with story lines/scenarios and dialogs. Yes, I'd like to add some (rather simple) dialogs to enhance story in game or rather, how players experience the game.

And just after coming back I did a little bit for travel system. Simple travelling is almost done. I only need to add option to harm player (although I'd like to avoid that, leave travel as just travel that takes some time but is only a break between segments of game) and some obstacles. I'll leave other bits that I want to have in simple travel for later.

What's next besides that? I want to add few things for room generation to make it possible to generate forests. And that should be last thing for this Milestone. Afterwards I will port it to C++ to allow faster iteration and debugging (and make it more portable).

Other plan is to do at least a little bit of work every single day.

Okay, let's do this!

2013-08-09

Weekly update MS04x30

I decided to push a little and for three days I was working on Dragontorc for 2-3 hours starting at midnight. I'd rather not do that, especially that I had to wake up in the morning and be at work at 8-9 o'clock, but I really wanted to push travel system forwards. And I did. And it took more time than actually needed due to lack of debugger. Catching random crashes with logging tool, when each compile takes so long is annoying me more and more. And I can't wait when I finish this milestone and I start porting to C++. Yes, this will mean that for some time there will be no new things. But this will eventually speed up development greatly.

And when I took a look and my MS plan, I realised that main features of game are planned for 8 milestones. Which means that with his MS complete I will be half way through! And systems that are left are not so time taking as those in MS3 and MS4. There of course will be still actual game left to do, but that should be a little bit more relaxing.

I am writing this on Friday, as tomorrow we are going to wedding and on Monday to seaside. Travelling for few hours. And as we will be travelling, here you have screenshot of Maroc.


We'll be there for two weeks and as I will have very limited Internet access (on my phone), I won't be posting anything here for two weeks.

See you.