JLP’s Blog

A blog about computers, science and some other things

Archive for the 'Programming' Category

The fine art of making computers do what you want

Thousand Parsec GSoC 2008 Blogs

Posted by JLP on 23rd April 2008

Thousand Parsec logoA couple of days have passed since eight students found out they will be hacking on Thousand Parsec as part of Google Summer of Code 2008. All have come to Thousand Parsec IRC channel to say Hi in and all of them posted their introductions to Thousand Parsec Development mailing list. Each and every student now also has a spot on the web where they will blog about their experiences and progress.

I’ve created a Thousand Parsec Blog on Blogger which links to all the blogs of our students. The page will also serve as the blog for everyone who would like to write about Thousand Parsec but doesn’t feel like setting up his or her own blog just for that. So, if you are interested to see what we at Thousand Parsec are up to this summer, this is the place to start. Of course we will also make sure that feeds from our blogs are aggregated on Planet SoC. You will then be able to see all GSoC posts from our blogs in one place and add the feed to your favourite feed reader.

Tags: , , , , , , , , , , , , , , ,

Posted in Computers, GSoC, Games, Programming, Software, Thousand Parsec | No Comments »

GSoC 2008 projects for Thousand Parsec

Posted by JLP on 22nd April 2008

Thousand Parsec logoA couple of hours ago Google published the final list of 1125 students who will be working on free and open source projects as part of Google Summer of Code 2008 program. This year 8 students will work with us at Thousand Parsec project. This is twice the number of students we had last year. Here’s what they will be working on this summer:

You can be sure that all of us, students and mentors, will do our very best to complete these projects successfully. Exciting months for open source 4X games are ahead of us. I hope you look forward to the results as much as we at Thousand Parsec do.

Tags: , , , , , , , , , , , , , , ,

Posted in Computers, Fun, GSoC, Games, Programming, Thousand Parsec | 1 Comment »

Parsek, 4X game client for KDE 4, now in SVN

Posted by JLP on 7th April 2008

Parsek LogoParsek is a KDE 4 client for turn-based strategy games where your goal is to build a space empire. These games are known as (from four primary goals: eXplore, eXpand, eXploit and eXterminate). Specifically, Parsek is a client for games created using Thousand Parsec framework.

I’ve started working on Parsek a little more then a year ago. It was one of my ways of learning Qt and KDE programming. Unfortunately I didn’t have much time to work on Parsek since then. Well yesterday I’ve imported Parsek into KDE’s Subversion repository, into playground/games/parsek.

Parsek can’t be used to actually play games yet. It can connect to the server, download properties of objects in a Universe and display objects in a simple tree and it can download the messages and display them in a simple table. Two of the main things to be done before Parsek is usable is to make it possible to view and add orders to objects and to display a nice map of the Universe. Anyways, here is how Parsek currently looks like:

Parsek screenshot - small

If you find this interesting and would like to help in any way, you are more than welcome. The basic instructions on how to compile Parsek are on its Wiki page.

Yesterday I have also been browsing through the history of posts on Planet KDE and I found a post about lack of user research by Celeste Paul. She also put together a user research template which I will try to fill out as soon as possible and will then put it into Wiki and in plain text form also into the Parsek’s source code folder.

Tags: , , , , , , ,

Posted in Computers, Games, KDE, Programming, Thousand Parsec | 1 Comment »

Thousand Parsec accepted into Google Summer of Code 2008!

Posted by JLP on 18th March 2008

Thousand Parsec logoGoogle has just published the list of accepted mentoring organizations for Google Summer of Code 2008 and it is great to see that Thousand Parsec has made it once again. We must be doing something right :)

So, if you are into turn-based 4X space strategy games and would like to help in game development, this is your chance. Take a look at our Google Summer of Code and Ideas for Programmers pages and get involved. There is even US$ 4500 to encourage you to take that step into the world of open source software programming.

Interested students now have about a week to get to know us better. You can chat with us on IRC (Freenode network, #tp channel) or write to our development mailing list. After that, starting from March 24 and ending April 7, student applications must be submitted. I’m looking forward to be a mentor again.

UPDATE: Student application deadline has been extended to Monday, April 7th.

Tags: , , , , , , , , , , , , , , ,

Posted in Computers, GSoC, Games, Programming, Software, Thousand Parsec | No Comments »

The Book of Qt 4 – a short review

Posted by JLP on 22nd August 2007

The Book of Qt 4Alternative operating systems like and are getting more and more popular these days. That’s why cross platform technologies and programming are also increasingly popular and important. One of such technologies is a C++ GUI programming library and framework called . Today I’ve just finished reading a book about it, The Book of Qt 4 – The Art of Building Qt Applications. This is my short review of it.

The author of the book is Daniel Molkentin, who is one of the main developers at the KDE project. KDE is an entire desktop environment based on Qt. On more than 400 pages Daniel did a great job of presenting basic concepts and components behind Qt 4. Compared to another Qt book I’ve got, C++ GUI Programming with Qt 4, the introduction to Qt in this book is more smooth and friendlier to readers who are just starting to learn Qt. Examples are simpler and there is a separate example for every topic. So you don’t need to complete something from the beginning of the book to try another thing from the end. It is also nice that there are step by step instructions on how to use Qt’s graphical tool to design the main application window and dialogs. With 48 and 44 pages two of the longest chapters describe model/view programming using Interview framework and Qt’s powerful painting system called Arthur. Like the rest of the chapters these two are also presented in a way that doesn’t overload the reader with too much information. For complete list of topics covered check out the table of contents.

At the end I can say that this is a great book for anyone getting started with Qt 4 programming. By learning Qt 4 you will be able to reach more users, program faster and enjoy more while doing it. Not to mention you will be ready to start developing for , which will be released in a few months and is destined to be one of the most exciting desktop environments ever.

Tags: , , , , , , , , , , , , , ,

Posted in Books, Computers, KDE, Linux, Programming, Software | No Comments »

Getting a Trolltech Qtopia Greenphone mobile phone

Posted by JLP on 14th August 2007

Qtopia LogoI just got an e-mail with some great news. It looks like I am among the lucky ones who are selected to receive a grant under the Qtopia Greenphone Innovation Grant program. This means that I will soon get a full Greenphone mobile phone SDK, with the phone itself, connector cables and development tools. Greenphone is one of those mobile phones of the new generation which are based on an open platform. Another well known example from the new generation is OpenMoko. Apple iPhone on the other hand still belongs to the old closed platform generation.

And why will I get Greenphone? Well it looks like judges from Trolltech found my proposal for a new mobile phone application interesting. In this rather short time (submission deadline is October 31) I will try to create a free and open source mobile phone client for playing turn-based 4X space strategy games which are based on servers and the protocol of Thousand Parsec project. A C++ library for the protocol is already available and I hope I’ll be able to reuse it as much as possible. If all goes well most of the work will involve the user interface and use of the C++ protocol library. The work will also be of use with my other project, which is to create a game client for KDE 4 desktop, which heavily uses Qt toolkit and framework, which is very similar to Qtopia used on the mobile phone and other mobile devices.

Can’t wait until postman brings me the package. In the meantime I should start reading more about Qtopia development. I also need to come up with a name for the game and the way a user would interact with it. Any suggestions are welcome.

Tags: , , , , , , , , , ,

Posted in Games, Hardware, Linux, Programming, Software, Thousand Parsec | 3 Comments »

Trolltech Qt 4.3 released

Posted by JLP on 4th June 2007

Trolltech Qt 4 LogoJust in time for summer people from Trolltech have released a new version of my favourite framework for cross-platform programming. For me the most interesting novelties in are much improved OpenGL support (I’ve just started learning basics) and integration of QtScript (based on 3, like 1.5). Main Window is also enhanced quite a bit with new styles, more advanced tabs, titlebars and animated toolbars. For more details check out Qt and Qtopia Core 4.3 Release Announcement, What’s New in Qt 4.3 and list of changes in Qt/Qtopia 4.3.0. By the way, this version is also the one which the upcoming desktop will be based on.

Download Qt 4.3 for Linux/X11, Mac and Windows

Tags: , , , , , , , , , , ,

Posted in Computers, Programming, Software | No Comments »

Thousand Parsec is part of Google Summer of Code 2007

Posted by JLP on 16th March 2007

Thousand Parsec logoWhen I woke up yesterday morning a message from Tim Ansell was waiting for me on . It was some extremely great news about open source game project Thousand Parsec, which I joined a couple of months ago. Google has just published the list of mentoring organisations for Google Summer of Code 2007. What is so great about it is that Thousand Parsec was one of the selected organisations. This also means that I get to be one of the mentors.

I must say this has surprised me a bit. Thouand Parsec is quite a small project, not that well known and space strategy games are unfortunately not as popular today as they were a few years ago. Who knows, maybe the foundation of existing code base, our plans for the future or some other part from the project description convinced Google to choose Thousand Parsec. Whatever the reason, this is our chance to get some fresh new developers, to get the project to the next level and make it more known and appealing to gamers. We have to make the most out of this chance.

So, if you are a student and would like to work on a task for a vibrant free and open source game project, I encourage you to take a look at Thousand Parsec : Google Summer of Code 2007. Here you will find some instructions and ideas for a project on which you can work during the summer. I’m sure it will be fun, you will learn something new and if you finish your project you will even get 4500$. Our community is waiting for you! And don’t forget that the deadline for submission of student applications is 26th of March.

Update: The deadline for student applications has been changed to 26th of March, So you now have about 4 days left to join the fun.

Tags: , , , , , , , , , , , ,

Posted in Computers, Fun, GSoC, Games, Programming, Software, Thousand Parsec | No Comments »

Thousand Parsec AI Programming Competition

Posted by JLP on 20th January 2007

Thousand Parsec logoAs I’ve written before, Thousand Parsec is a free and open source project aiming to create space empire building strategy games similar to and . We are currently running an AI programming competition. So, if you know the fine craft of writing code and would like to take a shot at game programming, be sure to check out the official competition page and join us. Who knows, you might even win one of the cool prizes. The preferred source code languages for submissions are C++, Python and Ruby. But you can use any language of your choice. The deadline for submissions is 31st of March 2007.

Update: The deadline date was wrong. You have one month of extra time than previously reported.

Tags: , , , , , , , , , ,

Posted in Computers, Games, Programming, Software, Thousand Parsec | No Comments »

C++ GUI Programming with Qt 4 book is here

Posted by JLP on 19th August 2006

C++ GUI Programming with Qt 4After a couple of weeks of travelling across the Atlantic ocean the book C++ GUI Programming with Qt 4 was finally delivered into my hands this morning. Quite a nice timing actually. Today the first development snapshot of KDE4 was released. will be based on Qt 4.2, so this book will also be of great benefit for learning programming for KDE 4. Another nice thing is that authors of the book have added a short chapter about embedded programming with Qtopia (a special version of Qt for embedded devices). This is nice because more and more mobile phones and devices are nowadays running on . A couple of days ago Trolltech introduced the world’s first fully open and programmable mobile development device Qtopia Greenphone. It attracted a lot of interest from developers all over the world. So I guess it will only be beneficial in the future to also have some knowledge about programming in Qtopia. Now I only have to read and learn. When I finish (won’t be that soon) I will write a review of the book.

Tags: , , , , , , , , , ,

Posted in Books, Computers, Hardware, Linux, Programming, Software | 22 Comments »

New code for Physiks engine

Posted by JLP on 10th August 2006

A couple of hours ago Harish Kukeja submitted quite a lot of new source code for Physiks into SVN repository at . The basic features of the physics simulation framework should mostly be functional now and I’ll have to take some time later to take a look at the new code more closely. Probably I will also have to brush up my knowledge of the C++ that is related to this code. If I’ll have enough free time, I may try to write some simple application to test the current state of physics engine and see how it feels using it. Maybe I could also start working on a web page for the project. It would also be nice to come up with an icon that represents something (someone) that immediately makes you think about physics. But first I have to catch Harish on Jabber so we discuss about this idea.

Tags: , , , , , , , , ,

Posted in Computers, Education, Linux, Physics, Programming, Science, Software | No Comments »

A little cosmetic fix for KMix

Posted by JLP on 6th August 2006

KDE LogoA few minutes ago I committed a fix for a little cosmetic bug in KMix, that irritated me a bit every time I opened the mixer window. If you had relative volume values enabled and the volume was at 100% then the number 100 in the was cut of a bit at the end. I first tried with altering the code which used the function boundingRect from QFontMetrics and functions to get width, margin and other properties from QLabel. I didn’t succeed with these so I simply removed the entire QFontMetrics voodoo and used a nice function sizeHint like this:
QLabel *number = new QLabel( "100", this );
number->setMinimumWidth( number->sizeHint().width() );

The function sizeHint, gets just the right size for the widget so that it fits its content and now all looks just fine. In addition to this I also made the frame of the label thinner by one pixel and I think it looks a bit nicer now. You can see the old mixer window on the left and the new one on the right:

KMix

Tags: , , , , , , ,

Posted in Computers, KDE, Linux, Programming, Software | No Comments »

Physiks (ex KPhysics)

Posted by JLP on 10th July 2006

KDE LogoWhile updating my local copy of source code from KDE SVN repository and reading the latest issue of KDE Commit Digest (I’ve translated the interface into Slovenian language) I noticed that Harish Kukreja has imported Physiks into the repository. The original name for this Google Summer of Code project was KPhysics (you can read a bit more about it in my previous post), but since many new KDE applications have dropped the K prefix KPhysics was renamed to Physiks. Now I have its code on my hard drive and I will keep my eye on the development so that after the SoC is over I can start to help as quickly as possible and help make Physiks a great tool for physics teachers who will use it to show virtual physical experiments to students.

Tags: , , , , , , , , ,

Posted in Computers, Education, KDE, Linux, Physics, Programming, Science, Software | 1 Comment »

Learning Assembly Language

Posted by JLP on 5th March 2006

In addition to learning C++ and Qt I also started to learn assembly language. I spend much of my free time reading the book Professional Assembly Language. You learn quite a bit about how processors work and how to use them at a very low level. It is also great that the authors use open source Linux tools like assembler GAS and debugger GDB. I have everything installed and ready so it is just perfect. What I miss in the book is more info about additional features available in AMD64 architecture. For that I will have to check out the documentation provided by AMD.

And why did I decide to start learning assembly language in the first place? There is a popular collection of Slovenian dictionaries from Amebis, but no application for Linux exists. So I decided to try to find out how the Windows application ASP32 opens the files. If I manage to do that I could then try to write a Linux program to do the same thing. Even if I fail the knowledge of assembly language will remain and you never know when it will come in handy. May it be just for a better understanding of compilers or knowing how to better optimize some demanding function.

Posted in Computers, Personal, Programming | 10 Comments »