User avatar
Nikel
Posts: 2547
Joined: Sun Apr 20, 2008 8:38 pm

Multi core support and other things

Sun Apr 20, 2008 8:53 pm

Hello everybody. I am new here.

Browsing the forum the last days, and I must say this a very nice community :hat:

I have some questions about Napoleon's Campaigns, perhaps some have been answered already, sorry


The game takes a lot of time to load, is this normal? I have a Core 2 duo laptop, 2 GHz T7300 processor, 5400 rpm HD, 2 GB od RAM. My OS is Windows Vista Ultimate x64.

Talking about Core 2 duo. While playing I have noticed that only 1 of the cores is used and at 100% all the time. I understand that the processor is used while the AI is doing its job, but all the time at 100%... Is this a bug? Is multiple core support under schedule? The problem is that my laptop gets very hot after some time playing! :p leure:


Regards

User avatar
Pocus
Posts: 25369
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Mon Apr 21, 2008 1:13 pm

The CPU is also used to display the graphics and in DirectX it means a lot of computing everything second, constantly. I have numerous games myself, and the CPU is also used most of the time to 100% constantly... This is a normal behavior.
There is a little tweak for laptops though, if you open your game directory then NCP\settings, add this line to the file display.opt

CPUThrottling = 1

This will have the effect of reducing the refresh rate of the game as soon as you don't move the mouse for some seconds, like when you are thinking of what to do.

Napoleon's load time is because of the big map, made of thousands hand-drawn images. It is only in the hand of the video card and a fast unfragmented HD.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
Nikel
Posts: 2547
Joined: Sun Apr 20, 2008 8:38 pm

Mon Apr 21, 2008 4:05 pm

Thanks for the answer ;)

About loading time, then all the map is loaded on startup? If so, perhaps it would be a good idea to add the option of choosing this way or just the scenario you are playing. I mean that if you are playing Peninsular War it is not needed to load Russia map. So the main menu displayed before loading the map? From what I have read, you are developing a game where whole world or most of it will be rendered? Then loading all the map on startup would be a problem, I think.


About CPU and 1 of the cores used at 100% all the time, I thought that it was a bug, perhaps related with a 64 bits OS. Then multicore support is a must, each core at 50% should be fine. Any idea about adding this feature in the future?

I will add this option CPUThrottling = 1 to see what happens, thanks.

User avatar
Pocus
Posts: 25369
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Mon Apr 21, 2008 4:27 pm

Actually in NCP (Napoleon Campaigns) we don't load the map at startup, but only a portion of it, once you have choosen the scenario ... unless you have removed the option 'Limit map to scenario' (exact spelling is out of my mind right now). So it is optimized as you say. We are well aware of the possible problems for our next game and are working on that.

Multi core support is also something we are thinking about :)
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
Nikel
Posts: 2547
Joined: Sun Apr 20, 2008 8:38 pm

Mon Apr 21, 2008 5:31 pm

Oh, I understood the huge loading time was related with the map, well, you said that :siffle: ;)


Ok, this is my detailed loading time, please tell me if you think it is OK in a PC like mine. Aproximate time in seconds:


From double click to when loading engine appears.....11

Loading engine 1-3.....22

Till texures loading, Nobilis logo.....4

Loading textures 1-100%.....46

Loading data 1-3.....23


Total startup loading time 1:46


Peninsular War loading time, with 2 intermediate fast clicks.....15



Limit map loading is checked, so this is not the problem.

Most of the time is needed for textures loading, so if they are not the map textures, what textures are they? I am using max textures settings, the default option. I have tried with textures initialized checked and un checked, but without effect

My screen resolution is 1920 x 1200 :niark: The laptop graphic card is NVIDIA GeForce 8600M GT, memory 256 MB

User avatar
Pocus
Posts: 25369
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Mon Apr 21, 2008 5:45 pm

All the interface and many units I guess.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

ncsu90
Conscript
Posts: 8
Joined: Sat Apr 28, 2007 5:21 pm

Load time, multi core, etc...

Mon Apr 21, 2008 6:50 pm

After profiling the game (ACW for this post, I know its a NCP thread) with the Intel thread profiler. I see the lengthy load times are primarily due to fundamental design decisions in the software's architecture. The game's resources are highly skewed towards being easily modded (lots of little files) versus being "machine" friendly. The design also leans towards front loading resources versus streaming in a background process. This implementation is easier from a developer's point of view, since less thread management is involved and thus inherently makes the platform more stable.

I like the architecture design decisions that were made, since the game engine will be easier to manage and extend, because the file based graphics system is easier to understand (which means easier to debug, which means faster and more reliable patches). The architecture, while inefficient from a hardware point of view, will scale well as new CPUs and faster drives (SSD drives especially) show up. However, with 1000s of image files in the 300KB range, drives formatted with a small block size will suffer badly from fragmentation. Therefore I would recommend defragging your drive after installing if you want to speed up load times. Finally laptops suffer more during loading, since they have slower drives that desktops.

I am curious if installing to an external 7200RPM USB drive would help compared to the 4200 to 5400RPM internal laptop drives.

Under any circumstance I find the initial load time to be manageable, and I prefer it to having latency during game play.

Finally one note to the devs, I don't recommend directly supporting multi-core with this generation of vendor tools/libs on Windows. I have hit several different issues with the multi-core on Windows between AMD and Intel (primarily in cache sharing/performance with threads moving between cores). My personal recommendation is to write apps using standard multithreading techniques until better compiler and OS support shows up and let the OS manage the threads.


Daniel

User avatar
Pocus
Posts: 25369
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Tue Apr 22, 2008 2:19 pm

Thanks for your input ncsu90. Its true that a lot of little files can impact severely some machines (mostly as you say the ones without fast HD and/or fragmented machines), this is a design decision as you see, for ease of modding.
As for images, they are all preloaded, except regions bitmaps, which are preloaded if the option is enabled in-game (it is by default), with a tweak for NCP where only the ones pertaining to the scenario are.
For the rest of images, they can be prevented to be preloaded by adding an entry Preload = 0 in their corresponding .ini file, but it is not deemed very necessary by us.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

Return to “NCP Technical support / Aide technique”

Who is online

Users browsing this forum: No registered users and 1 guest