pondělí 11. května 2009

Tomix - First level ready

During this weekend I planned to finish the first version of first level of our puzzle game. I had kinda slacking mood (caused partially by this great blog), but I forced myself to overcome it and in the end I was able to finish the first level as planned. There are still no graphics so I'm reusing arrows from Heartbeat, but the basic "engine" is ready. There is still a lot of work to do but being able to actually play the level is really motivational.

I handed it over to Mitsuki to try the game logic and she quickly found a solution - although not the one I had originally envisioned :) But it was possible because of a bug in checking of the final position so in the next version it won't count. But at first glance it seems that the idea is viable and I have a lot of great feedback for the game from Mitsuki. We only have to stay focused on the fact that we create puzzle game, because some ideas would lead us to completely different genre :)

So now Mitsuki will start working on the graphics to incorporate to the game. In the evening I also checked some sites with free game development resources so we could re-use something already created, but my search did not finish yet. But I have a few good sources I want to check so expect another post covering those I think are most useful.

For the next work I hope to finally start work on the editor. I kinda didn't get to that yet, but I already know how to serialize objects in Python :) And it has not that high priority for me - worst case we can easily define the levels in source code.

I also checked some libraries to create menus in pygame but unfortunately none of them seem appropriate to what I want to do so I'll probably have to write my own solution. KezMenu looks fine but it can't center the text and unfortunately it's GPL'd - and I did not decide on the license to code yet, so I may not be able to use that. Well, we'll see.

sobota 2. května 2009

Device identification problem during boot

Since installing xubuntu last autumn, it sometimes happened to me that my machine required several restarts to boot up. I have identified the problem but being linux n00b I was unable to find some solution to it for some time.

The problem was following:
I have two harddiscs in my computer - one is old IDE disc and the other is new SATA II disc. The Linux system is installed on the new disc which is usually identified as /dev/sda (where /dev/sda5 is the root partition). The other disc is usually on /dev/sdb. What sometimes happened was that the devices where identified the other way round - IDE being /dev/sda and SATA being /dev/sdb. After that the computer of course did not boot and ended in some sort of fallback console (sorry, I forgot the mode's name).

Sadly, asking administrators at work did not help me (most probably because I was not able to describe the problem correctly - the only thing I found out was that the IDE disc should be /dev/hd something and not /dev/sd something - very helpful).

Before some time I found what I thought will lead to solution, but I was hesitant to change the fstab because I didn't want to break it any more than it was :) What I needed was to identify the mount points by partition label instead of device (see http://tldp.org/HOWTO/html_single/Partition/#labels).

Today, I finally got to fixing it (at least, it appears to be fixed now :)). The whole process involved:
  • installing GParted which unfortunately did not help me with setting the partition labels and thus was not that useful (it provided me with nice overview of the partitions :))
  • setting label to ext3 partitions using tune2fs (e.g. tune2fs -L pubsw /dev/hdb1 sets label pubsw to par
  • setting labels to NTFS partitions using ntfslabel (part of ntfsprogs package)
  • modifying fstab to use the labels (see http://tldp.org/HOWTO/html_single/Partition/#labels for example fstab)
To sum it up - if you have this problem with identifying devices during boot up, use labels to identify them in fstab. This seems like a good idea generally because as I understand it the device identification can change when switching hardware (imagine adding shiny new HDD to your computer and not being able to boot up as the result - ouch!)

In the end the changes where really not that hard and if I knew a little about Linux I could've fixed this long time ago. But I'm a little smarter now and maybe after some time I will know Linux as good as Windows. Most probably after Windows 7 comes out - because last version I had is Windows XP, I will know very little about both Windows and Linux.