Archive for August, 2009

Judgement

Tuesday, August 18th, 2009

I guess the Terminator warned us this time would be coming. Today I committed some of the new features in Parsek to KDE server. You can find a link to the repo here. Give it a try and let me know if you have any problems. Quickly after starting, you will realize this is still very much a work in progress. I guess I underestimated the complexities of building a game client and have failed to deliver all the originally planned features. I see the work done for GSOC as big step in the evolution of Parsek and it will allow me to continue developing Parsek into a premier Thousand Parsec client. Once the coming soon features described below are ready, I will be uploading the GSOC changes to the Thousand Parsec git repositories as well.

Current Features
Users can now connect to game servers, select games, join, and later disconnect cleanly.
A status manager responds to events from the protocol library.
A corresponding status widget displays connection status, server information, and game information.
A clock displays the time until end of turn (EOT) events.
A logger widget provides debugging and error messages. The logger is a implemented with a filterable model.
Users can view the game universe with the object viewer. The object viewer, tied to an object model, provides basic information about selected objects.

Bugs and Quirks
There remains several unresolved bugs that still need work.
1) The object viewer does not display the last modified time in proper format.
2) The object viewer does not correctly read the object type.
3) The EOT clock could be formatted in hh:mm:ss instead of just seconds.

Undelivered Feature Status
Starmap: The starmap is still a work in progress. The starmap will be tied to the object model. Basic drawing is functioning but still need to implement game object coordinate readings.
Messages: The basic backbone for the message system will be similar to the logger. This will be added later this week. The protocol functionality for messages is not yet implemented, but Parsek will be ready for message support.
Orders: As mentioned during the midterm report, this feature was removed from the project scope. I will start working on this after the object system is fully functioning.

Coming Soon
There are somethings not included in the current build. I will be adding these features over the next few days after a little more testing and proper integration. This includes a more robust object model with support for object parameters including resources. The object viewer interface will also be further improved to provide a better user experience. The object model behind the object viewer will be expanded with abstract type implementation and also work with orders, players, designs, and resources. In addition, a player viewer will added shortly. This will provide a display of the game’s player and later allow the user to send a message or read information about selected players. The chat system will be integrated with the logger and both will allow for filtering and sorting.

The next major feature coming soon is an overhauled main interface. The default dock widget system is ugly and the advantages it provides are minimal. This is a game, not an IDE, so I see little need to provide a fully modifiable window. The new main interface will display the game widgets in an organized and effective manner while working with low resolution displays. The target is to have Parsek function well on 800×600 displays. There will also be a splash window at the start which will allow user to connect to games. The connection manager will also include an account manager. A simple custom button interface will replace the traditional application menu.

Future Visions
Future plans include completion of the message system and the order system. I also plan on configuring Parsek to watch for changes in real time and display updates asynchronously instead of downloading all objects at each EOT. I will spend time working on the protocol library to complete support of some the important features still missing. I will try to complete my failed efforts to get the protocol library functioning on Windows by providing supporting network implementation. After the interface overhaul, I hope to extend Parsek to provide support for 3D graphics.

Screenshots

Yaaaaa!

Saturday, August 8th, 2009

Parsek’s object tree is now functioning. There is still a lot of work to do to clean it up, make it look nice etc but the overall functionality is now there and works. I’ll be adding a seperate widget that popups when a selection is made in the tree and displays the object’s full information, instead of trying to embed it all in the tree’s columns.

Have a look at the screenshot! The tree hierachy matches tpclient-pywx with the exception that lone objects who’s parent are the galaxy (after they have left a system) are all listed at the bottom, instead of underneath their old parent system.

Parsek's Object View

Yay! So I’ll be adding more features to this as well as hopefully getting the starmap in place (now that I know the information from the data model is loaded correctly) in the next few days. Once all the bugs are fixed in the object tree, I’ll add it to the KDE svn branch.

Small Steps

Wednesday, August 5th, 2009

There’s been some progress over the last couple of days. I fixed a small issue with exception handling in Parsek. Turns out Qt disables exceptions by default and Parsek was crashing even though it was trying to catch exceptions from the protocol library. Parsek’s event handler now catches DisconnectedExceptions when reading or writing to the server, though it does not do anything with them yet. More importantly, downloading the universe’s objects is coming closer to functionality. The program correctly receives the objects from the universe, I was able to read and verify (using tpclient-pywx) the information in the object frames in the debugger. However, the Qt model is still broken and needs some work. The model view design in Qt is a little bit confusing but the QAbstractModel class is pretty sweet. When properly configured, you can just use any of the pre-created viewer widgets (QTreeView, QTableView, etc) to instantly display the data. Right now I’m having trouble getting the view to refresh as the information is loaded in from the server. The Boost + Qt integration here is getting a little hard to keep track of. I hope to have this resolved in the next couple of days and be able to post some screenshots of the object viewer. Thankfully there some good Qt examples out there for this type of thing…

Rough Week

Monday, August 3rd, 2009

Wow. The last week just fly blew. I can’t believe it has been a week since my last blog update. Let’s just say all things didn’t go as planned over the past week. Tuesday the 28th was actually my birthday so I took the day off to go to the amusement park to ride some roller coasters! The fun didn’t last very long past Tuesday however. For whatever reason, I started having problems with GDB and QtCreator. Whenever I would set a breakpoint, GDB would just crash. It got frustrating trying to continue without a functioning debugger. I’m the type of person who just writes code sloppily and then tries to compile+debug and clean up afterwards. Reinstalling QtCreator and the GDB packages didn’t stop the crashing. I got fed up and decided to try doing a clean install with Kubuntu instead of openSuse. Things just got worse from there. I mistakenly burned a copy of the x64 ISO which I then proceeded to install. After finally managing to get all the required packages installed, compiling would fail with Boost throwing up about 1500 lines of errors. For whatever reason, I just couldn’t get it to work. After realizing I had switched to x64, I figured it was perhaps a problem or incompatibility related to that. So again, I reinstalled Kubuntu, x86 this time. It managed to go a lot speedier the second time around. The whole situation with Boost is frustrating as well as the only supported packages available for Ubuntu are versions 1.35, which is horribly out of date. I could have built the needed Boost libraries from source, but unfortunately CMake wouldn’t properly find them and would instead only locate the /usr/include/ version that was forcibly installed with KDE! Updating KDE removed the Boost dependency and allowed me to install a new version of Boost. I managed to find more up to date packages on launchpad but it took a few tries and different versions to get it to work. In the end, I wasted about two days with this non-sense but it did end up compiling. The good news is however, I have a fresh install with the latest version of QtCreator (which resolves many debugger problems anyway) and my damn GDB doesn’t crash anymore. I think the lesson here is NOT to go damn messing with your development enviroment in the middle of crunch time. This has proven to be one of the more frustrating lessons in Linux. Installing software and packages can be extremely frustrating because of versioning and dependencies. Hopefully this new Ubuntu proposal makes it into the new versions and helps resolve some of these dilemmas. I really think this is one of the things holding Linux back from mainstream. … /end rant

Over the weekend I spent time cleaning up some code and doing a little refactoring. I’m also making some progress on object display but it is going slow. I’ll have more to report on this soon. There’s roughly 2 weeks left until the final deadline. I’m committed to having what was proposed at the midterm ready and in a functioning state. The revised proposal suggested the message system would be completed by the end of this week and the object system by the end of next week. I’ve suggested leaving the message system until next week as there still needs to be some code and functionality added to the protocol library before it will work. So the focus for this week is the starmap and object system as they are really partners in backend functionality (they retrieve their information from the server in the same way).