• 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.
Showing developer posts only. Show all posts in this thread.

King

Part Time Game Designer
11 Badges
Dec 7, 2001
12.504
30
47
  • Crusader Kings II
  • Deus Vult
  • Europa Universalis III
  • Europa Universalis: Rome
  • Sengoku
  • Victoria 2
  • 500k Club
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis III: Collection
  • Hearts of Iron II: Beta
  • Victoria 2 Beta
Nothing definate at this time. All in all the multi-core plan works a little like this, let's create a game first and then see how much time we have over for things like multi-core support.
 

King

Part Time Game Designer
11 Badges
Dec 7, 2001
12.504
30
47
  • Crusader Kings II
  • Deus Vult
  • Europa Universalis III
  • Europa Universalis: Rome
  • Sengoku
  • Victoria 2
  • 500k Club
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis III: Collection
  • Hearts of Iron II: Beta
  • Victoria 2 Beta
I did some programming a long time ago, long before multi- cores, but I would imagine that to implement multi threading in a major way, you would need to decide on that, before you started coding, and that it might even effect your design choices.

there again perhaps we aleady have multi core support in our code but had to disable it due to problems and the only thing we need to do is find the time to try and fix these problems during development? There again what do I know?
 

King

Part Time Game Designer
11 Badges
Dec 7, 2001
12.504
30
47
  • Crusader Kings II
  • Deus Vult
  • Europa Universalis III
  • Europa Universalis: Rome
  • Sengoku
  • Victoria 2
  • 500k Club
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis III: Collection
  • Hearts of Iron II: Beta
  • Victoria 2 Beta
If it's using the same hog of an engine HOI3 uses then I'd say yes.

I'd actually prefer to wait till we have a working game before making such claims, there again I am a little stupid now amn't I?
 

Kallocain

Executive Producer
22 Badges
Aug 3, 2009
3.688
454
  • Divine Wind
  • Mount & Blade: Warband
  • Supreme Ruler 2020
  • Sword of the Stars
  • Sengoku
  • Rome Gold
  • Majesty 2 Collection
  • Magicka
  • The Kings Crusade
  • Legio
  • Lead and Gold
  • Heir to the Throne
  • Hearts of Iron III
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Victoria 2
  • 500k Club
  • Crusader Kings II: Holy Knight (pre-order)
  • Hearts of Iron: The Card Game
  • Rise of Prussia
  • Hearts of Iron IV Sign-up
Multicore support aint that hard :

Divide the game in to two :

Game server (all the calculation, database)
Game client (the interface)

Freeciv follow this modell, from a comersial company with full time staff I would have exspected even better multicore support, but dual core support like that should be a pice a cake for a developer like Johan.
Dividing the game like that should also make bug hunting easyer, as one can spot in which part the memory leak, crash what ever is in.
Also this makes MP support included for free at least that how the freeciv game server works.

It is not that easy, no. In theory, sure, but have you tried? We have hundreds of thousands of lines of code that have to be handled. We have to make sure that we do not get a lot of strange bugs that can easily occur when you do something like this. It's not like it's a yes/no situation though. We could have multi core support for some features and not for others. We'll see what works, and what there is time for.
 
Last edited:

Chaingun

Field Marshal
47 Badges
Jul 15, 2002
3.796
2.513
  • Knights of Honor
  • 500k Club
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Mount & Blade: Warband
  • Mount & Blade: With Fire and Sword
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Rights of Man
  • Steel Division: Normandy 44
  • War of the Vikings
  • Europa Universalis IV: Third Rome
  • BATTLETECH
  • Surviving Mars
  • Age of Wonders III
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
  • Prison Architect
  • Imperator: Rome - Magna Graecia
  • Crusader Kings III
  • Europa Universalis III Complete
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
  • 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
  • Crusader Kings II
  • Magicka
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Rome Gold
  • Supreme Ruler 2020
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
Multicore support aint that hard :

Divide the game in to two :

Game server (all the calculation, database)
Game client (the interface)

Freeciv follow this modell, from a comersial company with full time staff I would have exspected even better multicore support, but dual core support like that should be a pice a cake for a developer like Johan.
Dividing the game like that should also make bug hunting easyer, as one can spot in which part the memory leak, crash what ever is in.
Also this makes MP support included for free at least that how the freeciv game server works.

So you effecively describe a two thread model... Mind telling how you move from that to four cores? Furthermore, all the heavy game calculations is on your 'server' part so the client will not be displaying any updates until the 'server' is done. Nothing wrong with that (it does prevent interface lag), but it doesn't magically scale up either to utilize multi core CPUs. Unless you'll add that the game server should be run by multiple threads, in which we're back to the "how to break up heavily data dependent calculations"-problem.

delra said:
Eliminate this problem and there's a whole new huge market opening for you, people with computers too slow to run EA games.

I thought people with computers too slow to run EA games had single core computers? :p
 
Last edited:

podcat

Game Director
Paradox Staff
12 Badges
Jul 23, 2007
12.793
38.305
  • Europa Universalis IV
  • Hearts of Iron III
  • Semper Fi
  • 500k Club
  • Europa Universalis III: Collection
  • Europa Universalis IV: Pre-order
  • Hearts of Iron II: Beta
  • Europa Universalis: Rome Collectors Edition
  • Mount & Blade: Warband
  • Paradox Order
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: Together for Victory
Multicore support aint that hard :

Divide the game in to two :

Game server (all the calculation, database)
Game client (the interface)

Freeciv follow this modell, from a comersial company with full time staff I would have exspected even better multicore support, but dual core support like that should be a pice a cake for a developer like Johan.
Dividing the game like that should also make bug hunting easyer, as one can spot in which part the memory leak, crash what ever is in.
Also this makes MP support included for free at least that how the freeciv game server works.

its not as simple as you make it out to be. Good overall usage of multithreading that dont actually end up slower on a lot of users computers is a hard problem (threading parts and specific algorithms is much simpler).

here are two possible problems I can see with the approach you suggested.

- client interface thread is only a small fraction of the total cpu usage, and a lot of that is offloaded on the graphics card (so this is concurrent processing too), splitting like this gives no large benefit, and due to point two might be detrimental:
- a lot of the data will need to be accessed from both programs client/server so the memory use of the system will be much higher. requesting data across network will take time if we try and get around the memory usage. (which freeciv might do, turned based gamplay gets a lot more leeway here).

We do keep this stuff in mind when code is written. Performance is important and there are areas where multithreading can be very helpful but its not the perfect solution to every problem and it does give a lot of development overhead.

Personally I wouldn’t have thought it easy at all. I would have thought that single vs multithreading was a paradigmic choice like functional vs object oriented. However when I posted this:

King felt it worthy of ridicule. Maybe I should have kept my empathy / sympathy to myself.

its not an all or nothing issue and nowhere near as drastic as functional/oop swap but it is something you have to think about. Not all problems are solvable realistically in a multi-threaded way and some problems lend themselves really well to it. example:
bad problem: very inter-dependent supply calculation system
good problem: particle system simulation with lots of independent calculations
 
Last edited:

podcat

Game Director
Paradox Staff
12 Badges
Jul 23, 2007
12.793
38.305
  • Europa Universalis IV
  • Hearts of Iron III
  • Semper Fi
  • 500k Club
  • Europa Universalis III: Collection
  • Europa Universalis IV: Pre-order
  • Hearts of Iron II: Beta
  • Europa Universalis: Rome Collectors Edition
  • Mount & Blade: Warband
  • Paradox Order
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: Together for Victory
People get frustrated because they've got a couple of cores sitting around idle. Of course the Techies have realised that on a modern gamers desktop the computing power sitting idle on your graphics card far outweighs anything on the CPU. Hence I suspect it won't be long before people start complaining that Paradox games don't utilise DirectCompute.

there was a thread:)D) up requesting CUDA support a few weeks ago :p

massive threading CPUs will be here sooner or later yes. People are still looking at good solutions for games due to the heavy shared data problems they have. Most current games on PC I know about still seem to run gameplay single threaded and offload physics/graphics/animation etc simulation on multiple cores, e.g all stuff that have a lot less strict requirements on it (e.g you can cheat a lot) than say calculating if your farmers in england are rising up in revolt about the lack of good gin on the local market.
 
Last edited:

podcat

Game Director
Paradox Staff
12 Badges
Jul 23, 2007
12.793
38.305
  • Europa Universalis IV
  • Hearts of Iron III
  • Semper Fi
  • 500k Club
  • Europa Universalis III: Collection
  • Europa Universalis IV: Pre-order
  • Hearts of Iron II: Beta
  • Europa Universalis: Rome Collectors Edition
  • Mount & Blade: Warband
  • Paradox Order
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: Together for Victory
The unix modell of client-server program is proven and old technology that thousands of hobbyist programmers are able to implementent. Yes in its basic form it offers from my understand only dual core support, but there is nothing hindering multi core support for the game server part later one.
I suggest the unix modell not because it the newest, but knowing paradox I thought such and old and proven way of doing thing should be in reach even with limited resources. If there are better ways you can afford please do so.

the unix model works yes, but its solving different problem otehr than scalabilty really, namely: many cheap slim client computers + a big server (your normal computer student lab at university), also being able to easily supply many different possible interfaces (text based, windom manager 1/2/3 etc (blackbox is still best)) I noticed freeciv also has a whole bunch of different interfaces. So the actual problem of speedign up the heavy calculation remain.

What is the best way of doing multicore support :

Nr1 : Make a single tread program then later one port it to multi treaded
Nr2 : Design from the beginning the game to be multi treaded.

From the answer follows, no real multicor support for Victoria 2. To much work when you have written thousands line of code.

Lets just say we'll add as much as is needed for good performance.
 

podcat

Game Director
Paradox Staff
12 Badges
Jul 23, 2007
12.793
38.305
  • Europa Universalis IV
  • Hearts of Iron III
  • Semper Fi
  • 500k Club
  • Europa Universalis III: Collection
  • Europa Universalis IV: Pre-order
  • Hearts of Iron II: Beta
  • Europa Universalis: Rome Collectors Edition
  • Mount & Blade: Warband
  • Paradox Order
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: Together for Victory
Anyone else see where this ones going to go:

1 Paradox decides to build a completly new engine which is multi-core, CUDAed and has ABS and power steering.

2 "Oh dear we've got to throw away a lot of the old code and start implementation from scratch."

3 Years of moaning: "Why didn't vanilla EU4 1.0 at least have all the features that EU3 had after HTTT and its seventeen patches?


oh btw, we have a new tag-line for the game. Duke Victoria II: Forever
 

Chaingun

Field Marshal
47 Badges
Jul 15, 2002
3.796
2.513
  • Knights of Honor
  • 500k Club
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Mount & Blade: Warband
  • Mount & Blade: With Fire and Sword
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Rights of Man
  • Steel Division: Normandy 44
  • War of the Vikings
  • Europa Universalis IV: Third Rome
  • BATTLETECH
  • Surviving Mars
  • Age of Wonders III
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
  • Prison Architect
  • Imperator: Rome - Magna Graecia
  • Crusader Kings III
  • Europa Universalis III Complete
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
  • 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
  • Crusader Kings II
  • Magicka
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Rome Gold
  • Supreme Ruler 2020
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
I don't think you can say either for certain.

Yes AI depends a lot on speed of computation but any predictions from our side are likely to be off.

What he pointed out is that you can't execute a computation faster than its longest serial part. So that means that 1) we'll see diminishing returns on increasing number of cores (even if you have an infinite number of cores latency won't be better than the limit set by the longest serial operation), 2) AI may be improved through refined serial algorithms that might offset the opportunity cost of parallelizing existing algorithms.

We simply can't know here without seeing into engine internals... Actually, I doubt the dev team themselves can - thus parallelization is an uncertain investment and that's why they put it low on the list of priorities.