Showing posts with label games. Show all posts
Showing posts with label games. Show all posts

Monday, May 12, 2008

Rendering of stars and fleets

One design issue I've run into is how to display planets and fleets in relation to star systems. Thousand Parsec uses incredibly large distances when positioning the stars in order to give a sense of scale to the game. In order to fit everything reasonably close together for the player, I've scaled down these distances. It works decently for star systems, but when it comes down to individual planets, they appear right on top of their parent systems due to scaling.

There are a few approaches I could try to solve this problem

1. The tpclient-wx approach

The flagship client of Thousand Parsec draws both fleets and planets as dots in a circle around their star systems. This would involve ignoring their individual locations and drawing them in an arbitrary position around the star.

2. The GalCiv 2 approachGalactic Civilisations 2 draws planets and fleets in a semi-realistic manner. What I mean is, planets are out of proportion and now that I think of it, it appears that all the planets have an equal distance from the sun. So this is not really a different approach from the above, the only difference is that fleets can move around the system (not supported in TP).

Image credit: GalCiv 2 site

3. The MOO2 approach
Master of Orion 2 draws star systems and fleets on the map - no planets. To view planets, one has to click on the system which brings up a window showing the individual planets. Very elegant in my opinion.

Here is another shot of how systems are drawn in relation to fleets.

Image credit: Mobygames

4. Another method would be some kind of dynamic map which changes in detail as you zoom in and out (Homeworld style).

I guess this post has really been a thinly veiled excuse to post some nice screenshots from other games. :) Now back to work!

Monday, May 5, 2008

TPServer update

There was an update of tpserver to 0.5, which is a big update and includes the Reach For the Stars ruleset. RFTS offers a more substantial ruleset for thousand parsec and is based on the actual game. Sadly, I missed out on playing this game before, but no more! I wonder if there will be a MOO or Spaceward Ho! ruleset too. :)

I was trying to compile the server on my system, when I started to get errors all over the place. Then I went back to try compiling 0.4.1 and failed too, so I knew I had probably had some issues with my system configuration.

Later while chatting with the devs, I found that the cause was due to me running gcc 4.3 while the devs were using 4.2.3. With the handy porting guide, I compiled the server successfully but found that all I needed to do was to add some #include statements. If only all my problems would be this easy.

Friday, March 28, 2008

Well, it's been the end of a really busy week for me. I've submitted 5 assignments this week, and I don't think I've had a decent nights rest yet. At least I had some fun fooling around with the Thousand Parsec source code and Python-Ogre. One of the devs suggested that for a good GSOC application, I should write a basic 3d client to accomplish the first two of my milestones. Well, I did do something like that. First, I ported the old pyogre client over, then I made it lose some of it's functionality. :) What I mean is, the starmap looks really empty, with only two objects: The Universe and the Milky Way. Heres hoping I can make it look more like the original this weekend. If so, at least I will have something to contribute even if I don't get the nod.

Mechanical process of porting:
  1. Change import statements to direct to python-ogre modules instead of pyogre.
  2. Fix the errors that crop up. For instance, pyogre uses a lot of attributes, whereas python-ogre provides set/get methods.
  3. New OIS system for input, no more ogre.EventProcessor
  4. CEGUI works about the same, just remember to use the set/get methods instead of direct attributes. It won't work and there won't be an error to tell you what went wrong.
  5. When things run, but don't look right... I'm still working on this.
In other news, tpclient-wx just had a new point release, with lots of UI improvements, such as a cleaner toolbar and more display options.

Saturday, March 22, 2008

First Post!

I'm starting this blog to write about my hobbies, specifically software development. The other blog is more for complaints about my life, so I decided to split the two.

Firstly, this is partly, or maybe wholly, motivated by my attempt to enter the Google Summer of Code, where I'm going to be applying for a student position in Thousand Parsec, a game-framework for making 4x space strategy games. Having a blog would be useful for making weekly updates about my progress, you see.

One curious thing about Thousand Parsec is that I've not even heard about it before, and judging from the responses of other student applicants, it looks like I'm not alone. I've been depending on blogs like TIGSource to keep myself abreast of the indie scene, but perhaps the fact that it is not an actual game makes it fall into obscurity. Or maybe... I'm not spending enough time on the Internet?

Well, it's on the Big and Famous Google's page now, and hopefully my duty will be to promote it even more by creating a new client that looks good and is easy to use, similar to Galactic Civilizations super high-tech looking interface or Master of Orions's classic feel that still keeps me coming back due to it's charming artwork.