DevHobby

A quick update, just to break the silence

I’ve posted a new Windows build, and am currently trying to get the client to work fully with the python-ogre deb on Ubuntu. As expected, getting python-ogre to work on Mac is quite a chore, I’m almost there, got everything compiled but running the demos gives me a “wrapper” error, and I’ll probably have to understand how the code generation in python-ogre works to figure it out.

Configuration options

This is the last week of GSOC, the date in which our evaluations begin is tomorrow. It’s been a pretty short and exciting trip, sometimes I’m still amazed that I have the chance to work on this at all. On to the additions!

A checkbox for “saving details” was added to the login screen. When checked, the username, password, last server connected to and some other preferences are saved in the user’s home directory, so that reinstalling the client will not affect the preferences. The password text is masked now, and saved to disk in hexadecimal format. Pretty primitive, but the idea is just to prevent casual lookers from getting the password.

Interface additions

I adjusted my priorities a little this week, due to the sudden realisation that GSOC is drawing to a close.

Firstly, I added a logo to the main menu.
The logo was taken from the Thousand Parsec website and put into a CEGUI ImageSet, which is the combination of an image file and an xml file which defines the pixel locations of all images within the set. Right now, it is rather empty:

Sounds and Battle

This week I took a look at introducing sound into the client. I found OgreAL a snap to use, it’s API is modelled after the built-in Ogre managers such as material and resource manager, so not only was it familiar but also cleanly designed. Unfortunately, technical problems (crashes without any indication of the error - my favourite!) arose when I tried running the code, which I attributed to driver issues, as switching to “generic software” audio drivers - done by passing in a parameter during creation - solved the problem. This parameter is not available for Python-Ogre 1.1 which uses an older OgreAL API.

So all I had left to do were the sound effects.

Ship designs and order queues

After chatting with mithro this week, I found that the ship designer in the pywx client was an old part of the code (untouched in a year), and that ship design was not considered a priority (since only MTSec supports it). What I did instead was a viewer for ship designs in the game:

This week in TP

This week, I finally figured out how to do proper camera rotation in 3d. The actual code turned out to be simple. At first, I wanted to use spherical coordinates to position the camera, as I had success with using polar coordinates for the radial menus. By storing the vertical and horizontal angles and treating radius as the zoom distance, I could convert them into 3d coordinates by applying some formulas. This worked only for rotations along the Z-axis (meaning that the world was “rolling”, done by moving the mouse left and right). However, for rotations along the X-axis (pitch) it would refuse to rotate properly - upon reaching the horizon angle it would “bounce” back again.

Interface comparison

This post is mostly a screenshot comparison of the two different interfaces of the original wxWidgets client (tpclient-pywx) and the OGRE client (tpclient-pyogre). Okay, maybe they are not so different… but it would be interesting to see the layouts in different environments anyway.

First off, we have the bread and butter of any 4x strategy game… the map. The pywx client shows each system and which objects are in that system, indicated by the circle surrounding it.

Interface comparison

This post is mostly a screenshot comparison of the two different interfaces of the original wxWidgets client (tpclient-pywx) and the OGRE client (tpclient-pyogre). Okay, maybe they are not so different… but it would be interesting to see the layouts in different environments anyway.

First off, we have the bread and butter of any 4x strategy game… the map. The pywx client shows each system and which objects are in that system, indicated by the circle surrounding it.

Organization: Thousand Parsec Original: Source

Interface comparison

This post is mostly a screenshot comparison of the two different interfaces of the original wxWidgets client (tpclient-pywx) and the OGRE client (tpclient-pyogre). Okay, maybe they are not so different… but it would be interesting to see the layouts in different environments anyway.

First off, we have the bread and butter of any 4x strategy game… the map. The pywx client shows each system and which objects are in that system, indicated by the circle surrounding it.

Organization: Thousand Parsec Original: Source

Animated camera

This week, added some animation to the camera movement to make it more smooth. When zooming in or out, it will move gradually instead of instant ‘steps’ like before. In addition, there will be animated panning when a system is double-clicked on the system list, or when pressing ‘c’ to center on the selected object, or when pressing “goto” in the message window. Since it will move in steps every frame, it is somewhat slow when the frame rate is low. This could be solved by having calculating the step size based on the frame rate. A harder problem is how to rotate a camera in a spherical manner around an object, which is probably a staple of most 3d games.

I also added some movement for the ships which will occur after a turn update. This allows you to roughly see where they are going, particularly for enemy fleets.

I guess this week’s changes are mostly animation based, so it’s a little hard to take screenshots.

Some additional minor fixes

Some interface changes

This week, I have added some additional elements to the user interface in order to make it more user-friendly.


The first would be the turn counter in the top-left hand corner, which is handy for knowing how long the game has been progressing for someone who is joining in half-way, and for knowing the current ‘phase’ in rulesets like Reach for The Stars, where there are three phases and certain orders are possible depending on the phase. However, it does not actually show the phase - the user will currently have to calculate it on his own.

Progress bar and preferences

This week, I added a progress bar which will show the status of connecting and downloading objects from the server.


Progress bar and preferences

This week, I added a progress bar which will show the status of connecting and downloading objects from the server.


Icon view

For this week, I’ve been trying to implement a view where all the objects appear as icons when the user is zoomed out. The advantages of having an icon view are that the objects tend to get harder to spot when far, as well as harder to click on. Also, it’s a good way to increase the frame rate when viewing many systems at once. At first, I tried making icons with letters on them, where an ‘F’ would represent a fleet, a ‘P’ would represent a planet and so on. However, the letters turned out to be too hard to read, so I went for pictures instead.

Icon view

For this week, I’ve been trying to implement a view where all the objects appear as icons when the user is zoomed out. The advantages of having an icon view are that the objects tend to get harder to spot when far, as well as harder to click on. Also, it’s a good way to increase the frame rate when viewing many systems at once. At first, I tried making icons with letters on them, where an ‘F’ would represent a fleet, a ‘P’ would represent a planet and so on. However, the letters turned out to be too hard to read, so I went for pictures instead.

Just playing around

Today, I decided to take a little break from coding and explore some of the other projects in the Thousand Parsec universe.

Quite a few of the GSOC projects (the two AI projects and the server configuration project) focus on allowing TP to be played by a single player. This is very exciting and I’m already envisioning creating a coffee-break ruleset similar to strange adventures in infinite space. :)

Organization: Thousand Parsec Original: Source

Just playing around

Today, I decided to take a little break from coding and explore some of the other projects in the Thousand Parsec universe.

Quite a few of the GSOC projects (the two AI projects and the server configuration project) focus on allowing TP to be played by a single player. This is very exciting and I’m already envisioning creating a coffee-break ruleset similar to strange adventures in infinite space. :)

Status Report

This one is a little late, but anyway here is a recap of what I did last week.

Fixed the goto button for the messages window thanks to lots of help from mithro and greywhind in irc. Now clicking on it will cycle through all the objects specified in the message. Still not too ideal though. There was also a suggestion to make the message window into a two-pane reader similar to e-mail clients like Thunderbird. I really like the idea and it’s definitely on my list of goals.

Fixed the move order in TP’s Reach for the Stars (RFTS) ruleset. The problem was that move orders are implemented differently in Minisec and RFTS, one uses absolute coordinates while the other uses object ids. Order parameters are something I will be talking more about later.

Status Report

This one is a little late, but anyway here is a recap of what I did last week.

Fixed the goto button for the messages window thanks to lots of help from mithro and greywhind in irc. Now clicking on it will cycle through all the objects specified in the message. Still not too ideal though. There was also a suggestion to make the message window into a two-pane reader similar to e-mail clients like Thunderbird. I really like the idea and it’s definitely on my list of goals.

Fixed the move order in TP’s Reach for the Stars (RFTS) ruleset. The problem was that move orders are implemented differently in Minisec and RFTS, one uses absolute coordinates while the other uses object ids. Order parameters are something I will be talking more about later.

Sending orders via a menu

My focus this week is on sending orders with the tp client, so that I can actually play with it.

After some discussion with mithro and greywhind, we felt that having a radial menu would be a good fit for the client. I have only implemented a few orders, as shown below.