Performance issues in HUGE galaxy

I have a P4 1.8 with 512 MB pc800 RDRAM. I found the time dely between moves in a huge galaxy, near the end-game of the game way too long: averaging almost 2 min after my last ship moves and befor the planet improvement screen appears. I started a small galaxy game: 4x4 grid. No delay and I even turn on watch ships. I dont think this delay was a problem in the os/2 version, on my 486/100 cpu. Will the final version have better performance? The wait wouldnt be so bad if the game doesnt lock up until the planet improvement screen appears. alt-tab doesnt even work.
:sniff!:
186 views 2 replies
Reply #1 Top
'I found the time dely between moves in a huge galaxy, near the end-game of the game way too long: averaging almost 2 min after my last ship moves and befor the planet improvement screen appears.'
'Will the final version have better performance?'

It can take a while to move 300 ships, even with all the 'watch' settings off. Most turn-based strategy games, by nessessity, have a noticable delay at end of turn.

That having been said, the debug code is almost certainly slowing things down. There should be an improvement of some sort.

'The wait wouldnt be so bad if the game doesnt lock up until the planet improvement screen appears. alt-tab doesnt even work.'

Most mouse and keyboard controls that would make sense in out-of-turn use work here.

Alt-Tab also works fine, but the game appears to pause when it's not in the foreground.
Reply #2 Top
Yea, the problem is fairly straight forward but the solution not quite as straight forward.

On the OS/2 version the "path finding" worked as follows:

Ship tries to go forward a space. If blocked, tries to go left, if blocked still tries to go right. if blocked it sits there.

The new one has real path finding (very good path finding actually) but it comes at a cost.

So we have to come up with some heuristic algorithms for this. We will solve it.

I am currently in favor of a heuristic solution that basically involves "teleporting" units X spaces when they can't be seen. No path finding at all then. The only downside is that it precludes the AI from doing any sort of "blockade" (bunch of ships in a big line blocking them) but I think it would be a reasonable trade off (you could still blockade them, they just couldn't blockade each other). And realistically, I wasn't planning on us creating an AI algorithm where they purposely try to block each other's ships like that anyway.