• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

jpd

Entil'Zha Anla'Shok
Moderator
41 Badges
Apr 19, 2001
8.030
1.757
  • Europa Universalis IV
  • Hearts of Iron IV: No Step Back
  • Hearts of Iron IV: By Blood Alone
  • Battle for Bosporus
  • Stellaris: Ancient Relics
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris - Path to Destruction bundle
  • Hearts of Iron II: Beta
  • Arsenal of Democracy
  • Hearts of Iron IV: Field Marshal
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
Is there any chance, at all, to consolidate the large modifier listings for a lot of events into a single trigger with additional parameters to replace the current modifiers? A lot of those seem to be a very consistent range check for stat values with an equally consistent multiplier attached.

I ask this, because the current event engine + actual events implemented seem to place a huge strain on my system, which in itself is 4 times better than the minimum requirements (Athlon 1.6 GHz, 512 MB Ram, GeForce 4/128MB, Creative Labs Audigy 2).

I've ditched the music playback (so no more MP3 decoding), I've ditched the tiles overlay (so no more double bitmap drawing each frame), I have no stuff in the background other than reference device drivers and ZoneAlarm. And yet, despite all this, the game is performing laggy as hell (pardon the expression).

Seeing all those complex event trigger conditions, those must use up a lot of CPU processing power. So, consolidating those very neat sequential trigger modifiers into a single trigger condition that executes the multiplier selection in machine code instead of the event processing interpreter should speed things up a lot. ;)

Jan Peter
 

unmerged(2456)

Pure Evil Genius
Mar 29, 2001
11.211
0
www.hero6.com
zonealarm may also be causing some of the lag. The referance drivers are probably not affecting performance in any way.

However a number of events still use outdated triggers that can be consolidated and made more optimized because new trigger conditions were added later, but the older events were never updated.
 

jpd

Entil'Zha Anla'Shok
Moderator
41 Badges
Apr 19, 2001
8.030
1.757
  • Europa Universalis IV
  • Hearts of Iron IV: No Step Back
  • Hearts of Iron IV: By Blood Alone
  • Battle for Bosporus
  • Stellaris: Ancient Relics
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris - Path to Destruction bundle
  • Hearts of Iron II: Beta
  • Arsenal of Democracy
  • Hearts of Iron IV: Field Marshal
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
Well, I'm not completely ignorant when it comes to system tweaking. And I have noticed that the lag always kicks in when the game advances to the next day (aka turn), thus when it evaluates all those triggers.

During that evaluation period, everything (including the mouse arrow) comes to a standstill. Only the sound effects continue to play (like the siege engine sound), but that's because my Audigy 2 is capable of buffering upto a couple of seconds worth of sound in it's local hardware buffers.

Jan Peter
 

unmerged(2456)

Pure Evil Genius
Mar 29, 2001
11.211
0
www.hero6.com
Well i say zonealarm may because i've had some issues with norton so its worth checking out. If it doesn't make a differance, then well, not much lost is there?
 

Ciçatrix

Discoverer of Mombot
65 Badges
Dec 1, 2004
2.554
0
  • Magicka 2
  • Victoria: Revolutions
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • 500k Club
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Cities: Skylines - Natural Disasters
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis 4: Emperor
  • Divine Wind
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Diplomacy
  • Europa Universalis III
  • Europa Universalis III Complete
  • Cities in Motion
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
  • Knights of Pen and Paper +1 Edition
  • Magicka
I also experience this, and my system has a 2,6 GHz processor, especially if you are playing on very fast, then it may seem like there is more lag than actual "playtime".
 

Grosshaus

Minister of Peace for Europe
42 Badges
May 14, 2003
10.504
76
Visit site
  • Crusader Kings II: Reapers Due
  • Cities: Skylines
  • Europa Universalis IV: Pre-order
  • Hearts of Iron II: Beta
  • Victoria 2 Beta
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Stellaris
  • 500k Club
  • Tyranny: Archon Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Stellaris: Distant Stars
  • Crusader Kings II: Holy Fury
  • Prison Architect
  • Stellaris: Ancient Relics
  • Crusader Kings III
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Europa Universalis III Complete
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Cities in Motion 2
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
  • Knights of Pen and Paper +1 Edition
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Semper Fi
  • Victoria 2
  • Victoria 2: A House Divided
I have Mobile AMD Athlon XP 1800+ with 752 RAM, haven´t experienced any problems. But I must admit that I don´t tend to play over above normal, my mousehand has grown too accustomed to turn-based games:)
 

unmerged(21937)

Your Industrial Friend
Nov 15, 2003
9.557
1
I have 600 MHz Duron, with 192 RAM, I have disabled ingame music, SFX and tiles and am able to run CK nicely on fast, unless there is big war around, when I have to drop to above normal. I routinely run Media Player in the background however, which continually takes up some resources. So I don't have any idea what you are talking about. :D

I don't think the many modifiers are problem with events, but rather some events that routinely go through whole character database or province database, most often needlessly. Fortunately such events can be either altered to be more efficient or removed if pointless when they are found.
 

jpd

Entil'Zha Anla'Shok
Moderator
41 Badges
Apr 19, 2001
8.030
1.757
  • Europa Universalis IV
  • Hearts of Iron IV: No Step Back
  • Hearts of Iron IV: By Blood Alone
  • Battle for Bosporus
  • Stellaris: Ancient Relics
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris - Path to Destruction bundle
  • Hearts of Iron II: Beta
  • Arsenal of Democracy
  • Hearts of Iron IV: Field Marshal
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
jordik said:
Most likely Zonealarm is slowing down your computer. Get rid of it, there are far better programs available.
1) ZoneAlarm is one of the best, if not the best software firewall to date. Any independant test will prove that.

2) The lag only happens if the game executes the next turn, aka when it moves from one day to the next. During the evaluation of all that must happen during a turn, of which processing the event triggers is a major part, everything stops for the duration. That has absolutely nothing to do with ZoneAlarm, drivers or other stuff in the background, but is simply the game engine refusing to release the CPU for any other task while it is executing all that needs to be executed for the transition to the next turn.

3) Setting the game to a slower pace produces less game turns per minute. And guess what, the moments of mouse move interruptions also goes down, with precisely the same amount. What more proof do you need ? ;)

And, since I own and play almost all Paradox titles on the same hardware, I can make a good comparison between them. CK is with Vicky in the top of CPU cycles hunger where it comes to turn evaluation time. With Vicky it's simply all the individual pops and army divisions that suck up all the CPU cycles. With CK it's all those large, elaborate event triggers+modifiers that's doing it. It has nothing to do with software that hooks into the IP protocol stack, which is all ZoneAlarm does.

Jan Peter
 

unmerged(6777)

Field Marshal
Dec 10, 2001
12.470
5
I am in the process of reviewing and revising all events (all triggers, modifiers adn aeffects of all 1000+ events) so this should help to some degree, but I suspect that there must be some other contributing factor if the lag you're experiencing is that extreme. I'm not saying the the underlying cause relates to daily cycles, but more that this process sholdn't be quite so extreme. One of my computers is a system that's considerably inferior to yours (it actually fails to meet the minimum game specs) and as long as I play at "normal" speed I have almost no appreciable lag. If you're getting lag at that speed, and we're both using identical game files, then logically there must be some other issue that is contributing to your problem (and I haven't disabled the sound or the tiles on that system!).
 

jpd

Entil'Zha Anla'Shok
Moderator
41 Badges
Apr 19, 2001
8.030
1.757
  • Europa Universalis IV
  • Hearts of Iron IV: No Step Back
  • Hearts of Iron IV: By Blood Alone
  • Battle for Bosporus
  • Stellaris: Ancient Relics
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris - Path to Destruction bundle
  • Hearts of Iron II: Beta
  • Arsenal of Democracy
  • Hearts of Iron IV: Field Marshal
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
Well, it isn't that the lag is extreme or so (like in the worst days of battlenet, with ping times exceeding 2000 ms ;)), but both map scrolling and mouse cursor movements are interrupted quite noticably (like 0.2 to 0.4 seconds each game turn).

The speed setting of the game is irrelevant, frankly, as this affects only the transition from turn to turn. Setting the game speed faster simply produces more of those moments per minute. The interruption itself remains of constant length. This is quite logical, as the speed setting does not affect turn calculations in any way. :)

As for my hardware. Well, that's based on a VIA KT266A chipset, which sums it all up, really. Except for the fact that I have made darn sure I am not affected by the AGP hickups of that particular chipset, by relying on NVidia's AGP driver instead on the VIA one. :)

Jan Peter
 

unmerged(6777)

Field Marshal
Dec 10, 2001
12.470
5
That's very odd, Jan.

From your description it sounds as though you're getting a daily "bump" that's on roughly the level that I usually experience only on the month roll-over (there are extra calculations that occur only when a new month begins). On my 350MHz laptop it's barely noticable (~0.1 sec "bump" per day only), and on my 2.7GHz desktop there is only a 0.1-0.2 sec month-end bump unless there are a vast number of regiments mobilized somewhat later in a long game when there are also a huge number of characters. Event optimization subroutines make me doubt that your problem relates as much to event processes as something else. Pehaps you could run a test for me...?
  • Go to your ...\ck\db folder.
  • Make a backup copy of the events.txt file.
  • Make a new events.txt file that is completely blank (or just comment out all the event file names)
  • Save this and start the game.
Now run a test game for a few years to see how this compares on a daiily roll-over to a game running with the event files enabled - or, even better, load a save game that you've just been playing with. Do you get any appreciable daily "bump" at all?
 

jpd

Entil'Zha Anla'Shok
Moderator
41 Badges
Apr 19, 2001
8.030
1.757
  • Europa Universalis IV
  • Hearts of Iron IV: No Step Back
  • Hearts of Iron IV: By Blood Alone
  • Battle for Bosporus
  • Stellaris: Ancient Relics
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris - Path to Destruction bundle
  • Hearts of Iron II: Beta
  • Arsenal of Democracy
  • Hearts of Iron IV: Field Marshal
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
Commented out all events, loaded up the save game of the game I was currently playing, and let it run for a number of days.

The daily bumps are now almost completely unnoticable. Map scrolls fluent right through the daily rollovers, as does the mouse arrow. ;)

So it's definately what I suspected. The evaluation of all the event trigger conditions .....

EDIT: Just re-enabled all the event files, loaded up the same save game and ran for the same couple of days. The daily delays are once again prominently there, ranging from anywhere between 0.2 and 0.4-0.5 seconds.

Jan Peter
 
Last edited:

unmerged(6777)

Field Marshal
Dec 10, 2001
12.470
5
hm...

Any chance you have something that's eating up a lot of RAM? That could cause the data searches to spill into virtual memory which would slow things dowm immensely. The odd thing is that I don't get your problems on my laptop, and that's a vastly inferior system to yours as far as processor speed goes, and I have the same amount of physical RAM as you do on that system. On my desktop I have 1GB RAM, but my processor is faster (but not that much faster).


Anyway, the next beta patch should at least improve things for you a bit since I've found a number of places where more efficient triggers can be coded. But I have some fear that it may not improve it enough in your instance...
 

jpd

Entil'Zha Anla'Shok
Moderator
41 Badges
Apr 19, 2001
8.030
1.757
  • Europa Universalis IV
  • Hearts of Iron IV: No Step Back
  • Hearts of Iron IV: By Blood Alone
  • Battle for Bosporus
  • Stellaris: Ancient Relics
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris - Path to Destruction bundle
  • Hearts of Iron II: Beta
  • Arsenal of Democracy
  • Hearts of Iron IV: Field Marshal
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
Yes. It's called Crusader Kings :D

But more seriously. No. This particular system is highly tuned and optimised, and unless I play Vicky with the full 120 MB tile overlay bitmap enabled, the swapfile remains fully dormant. ;)

Jan Peter
 

jpd

Entil'Zha Anla'Shok
Moderator
41 Badges
Apr 19, 2001
8.030
1.757
  • Europa Universalis IV
  • Hearts of Iron IV: No Step Back
  • Hearts of Iron IV: By Blood Alone
  • Battle for Bosporus
  • Stellaris: Ancient Relics
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris - Path to Destruction bundle
  • Hearts of Iron II: Beta
  • Arsenal of Democracy
  • Hearts of Iron IV: Field Marshal
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
A quick follow-up.

I've started the same game, with all events enabled (naturally :)) on my secondary rig, an Intel 440BX chipset with a Celeron 450 MHz installed, 384 MB RAM, a GeForce 2 MX and a Creative Soundblaster Live.

Same results as on my primary rig. Which is: zero bytes in the swapfile, and a daily speed bump. And, as it happens, the speed bump scales lineary with processor speed. In other words, the daily speed bump on this machine ranges anywhere from 1 to 2 seconds each day, which is roughly 4 times as long as on the Athlon. And the latter rig is roughly 4 times as fast.

So, this rules out any issues the VIA KT266A chipset might have caused, as the Intel 440 BX is the fastest and most stable chipset ever made.

EDIT: And to kill off any linguering thoughts about ZoneAlarm interfering: This secondary rig is a clean Windows installation with nothing added but the NVidia reference drivers, Creative sound drivers, and DirectX. Nothing else.

Jan Peter
 

unmerged(2456)

Pure Evil Genius
Mar 29, 2001
11.211
0
www.hero6.com
Before you posted this i was thinking it may be that when you optimized your system, you've disabled something that most programs don't need and thus can enhance your overall performance, but for some reason CK does and without this, its running real sluggish.