Older blog entries for chakie (starting at number 263)

A slow weekend, nothing much done on Civil, but I intend to get some stuff done today. The source has been neglected for a while and with a few months distance to it I can see some things I want to clean up. The graphics could be separated a bit better in "setup dialog graphics" and "in-game graphics". Those two share very little apart from some mouse pointers, so they should IMHO be separated.

Sourcewise I started looking a bit at the new server that has to be created. It'll be brutally simple and just contain the main game engine and a minimal amount of extra code to provide for the necessary networking system to be set up.

I'd also like to clean up the setup dialogs a little bit to make them clearer from a UI perspective. The data that is shown on each dialog isn't always that clear and the player can be a bit confused at times. This may also have to wait for a while until I have the main game up and running again.

I've been thinking a bit about the RTS engine, and come to the conclusion that it doesn't need to be as "realtime" as many other engines. One second in the game propably simulates 1-10 seconds real time, and there isn't too much that happens on a strategic scale in 10 seconds. Thus the engine can propably do its updates only about once a second and the players can see units perform actions at a maximum of once per second. Having the engine calculate updates once a second also takes away some of the effect of network lag. One player always has to connect to the other player's computer to play, and thus is at a network latency disadvantage compared to the player that has the server locally. But if the server performs updates once a second it has some time to receive the orders from the remote player too. Of course, if the order misses the current calculation turn it will be mercilessly delayed for one second. If this is very bad, I don't know.

I started doing the conversion of Civil from turnbased to realtime based. Nothing major yet, just some browsing around the code and getting familiar with it again after a few months pause. Did some basic coding which just guarantees that the current CVS version is broken. :)

I think this will be a good thing, and it shouldn't actually be that big a change code wise. I hope...

I decided to start working a bit on Civil again. It needs some loving to get to a stable 1.0 release. Actually, I have some more or less grand plans for it, which mean some pretty fundamental changes. Again. :)

After careful thought I've come to the conclusion that keeping Civil as a turnbased game as it is now is after all a bit too complex and makes the gameplay a bit on the slow side. So I'll start looking at changing it back to a realtime-ish engine. It all started out as a realtime engine a few years back, but got converted to turnbased at some point. TB as we do it does add some unnecessary complexity making the code larger and harder to maintain. I'm very proud of the code, it is easy to work with, but there is a lot of it.

The changes would roughly be:

  • introduce an external server where both players connect to. This server keeps all the game logic and determines what happens and when
  • the game UI:s (map etc) the players see are just dumb "terminals". The players give orders which are submitted to the server for processing.
  • the server sends out data for everything that happens, such as movements, formation changes, combat etc.
  • time would move in an accelerated fashion, with maybe 10x speed.
  • I think this makes for a funnier game after all... :)

This makes the clients a lot simpler, still keeping roughly the same amount of code for the actual logic, this time just moved out into a separate process. Having both players connect to the server makes them equal from the server's point of view, which is good.

Of course, this change does introduce the problem of networking again. Somehow I don't think it will be such a big problem after all, as this is a much slower game compared to a FPS game or even other RTS games. It doesn't really matter too much if a few packets are a second late. I'll use TCP anyway, so data won't get lost.

Civil has over the years been such a fun project that I can't stand to see it go without any attention. It deserves to get done properly.

Work has been suprisingly fun, although I still feel I have so much to learn. This whole embedded Linux thing is a whole new world for me, I've never really don anything like that before. Been playing with various embedded evaluation boards and tried to set up suitable environments for development.

mikehearn: indeed, now I found it. I stand corrected. :) It is apparently not always a visible option, so I must've always searched for it when it was not selectable. The previewing makes Evolution more sluggish than it needs to be, as just scrolling among messages with the cursor keys meant that it had to render every single message.

Been doing some work on a KDE style installer. The basic idea works pretty well, I can install any style that normally would be installable with tar zxf style.tar.gz && cd style && ./configure && make install. It's actually far too simple, so it must be severely broken somehow. The UI is currently a minimal proof of concept thing that only lets you browse a file or enter an URL, an "Install" button and a log window. I'm about to clean that up a bit and add a screen for generic options so that the user can affect some parts of the installation. Luckily making UI:s in Qt/KDE is so dead simple.

At work I got a new nice Linux machine, which unfortunately is based on RedHat 9. I tested Gnome on that machine, but it failed miserably to impress me in any way, so I now use KDE instead. Unfortunately the KDE version is of course ancient and IMHO badly configured (as always with RedHat). I've tried to use Evolution to access our Exchange server, but it's darn buggy and slow (even on a 2.8GHz Xeon with 1GB memory...), and I can't configure it to behave the way I like (is there really no way to get rid of the preview pane?), so I rather use Outlook on the old laptop I have. It's much snappier even though it's 2GHz slower with half the memory. :/

I have a new job, at Nokia. The place is nice, the people great and what we're doing is exciting. It's a long time since I last enjoyed working... I'm at the Home Communications division, meaning that I don't directly deal with mobile phones. Instead I have to dig deep into DVB stuff, which is a nice change from the Java I've been doing for 3.5 years. Unfortunately I can't really say too much more about the job so far...

Released version 0.82 of Civil today! An important milestone, as the it has suffered a bit from lack of time. I hope to be able to push forward and release 1.0 sooner or later.

This version sees the addition of the new setup dialogs (screenshots should be up soon), much improved LOS code and the normal array of bugfixes and small feature additions. This version is also the first one that allows different battles from the same era to be simulated, and eventually older battles too. We're actually building up a pretty generic wargame engine that suits wars that have infantry, cavalry (fast moving infantry) and artillery (or archers). I'd like to add some battles from the Napoleonic wars and eventually some medieval battles as well as something from the Shogun era. Oh well, those are just plans for the future.

nymia: I hope you don't code UI code manually? You do use Designer to get all the gory layout and boring widget fiddling right?

When I started out with Qt somwhere along the 0.9x versions there was nothing that could help you do dialogs, and creating larger dislogs was a major pain. Then came DlgEdit and Qt Architect and now we have Qt Designer. I like Designer a lot, it really makes creating dialogs easy and fun. Of course, it won't do the actual logic for the dialogs for you, but hey, you can't get everything. :)

Morons

mglazer: well, I think those celebs have pretty good ideas. Of course anyone can put up such a site and mock those who dare state their unhapppiness with the war and Bush. I read some comments to some of the celebs I've heard of, and man, did those comments sound dumb. Maybe you should try to work actively to improve the conditions of the non-adult (down to 13 year old) prisoners of war that you so kindly host at Guantanamo...

Coding

Nothing useful...

254 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!