The online racing simulator
Dual & Quad Cores Support
1
(36 posts, started )
Dual & Quad Cores Support
hi people

was just wondering if there's any chance that LFS supports multi CPU management in the future ? should the whole game be totally reprogramed ? or only some modification would be needed to make it compatible with multi CPU's ?

the point is , LFS will be more realistic with some more calculations i guess , maybe it would push even further the physics in term of realism..am i totally wrong here ?
#2 - Jakg
The game would almost need to be completely re-written, but i'd really like this (Quad core power!), the problem is that while Scaview works away trying to busy my 4x 2.8 GHz Cores, the player with the old 1500 Single Core Sempron will get screwed.

LFS is a niche, it can't afford to alienate players with not-so-good PC's

TBH i'm not sure chucking CPU cycles at the physics engine will help, it's aparently all the "little things" it needs
Maybe it's possible to make it simple.
For exemple using one core for your car's physics and data sent to your GPU and using other cores to calculate other player's or AI's Physics.
It doesn't seem so complicated but maybe i'm utterly wrong here!
I do see advantages of LFS using a single ocore though. If I'm trying to record FRAPS, I can set LFS to use core 1 and FRAPS to use core 2. This means I get absolutely no slowdown when recording at normal speed. If I record at 0.125 speed and speed it up 8X, I can get nearly 500 solid FPS for a movie. Not bad.

However, I would really prefer having dual core support for LFS, maybe bring a new patch out that lets you choose whether to use a single core for the game or dual core, pleasing both worlds.
or maybee "virtualize" your bs and run lfs on that virtual machine.
Of corse, the virtualizer has to be SMT approved (simultaneus multithreading).
If theat can be done, we could let lfs be as it is, and scale it up to whatever machine availabe.

regards
It *is* complicated because you have to decouple the graphics and physics engine. That is far from being a simple task, and while multicore support surely is the way of the future, I don't think LFS will implement it anytime soon, nor am I sure that it will benefit much from it. The physics calculations right now actually take up relatively little CPU time - the graphics stuff is what causes most stress on the CPU. You'd actually have to split up the GFX process to multiple cores to make 100% use of the available power.

PS: Jakg, I know you're proud of it, but could you please try to keep the "look, I have a quad core setup, woop woop" rate below 50% of your posts. Thanks.
#7 - Gunn
From an older thread: (October 2006)

Quote from Scawen :It can't be done very quickly. It would need the graphics and physics to be decoupled and run on separate threads. The method for doing this properly also brings certain other benefits, due to the interpolation between frames possibilities. In other words, the required changes lead on to other things, which should be done at the same time.

It would be about a months work, as a rough guess. I expect to do this some time, as multiple cores seem to be the way of the future. Actually I'm expecting to do this in a future version, after S2, when we could use the extra CPU time to do some things in higher resolution on more powerful computers, while maintaining physical compatibility with slower computers.

Quote from Jakg :4x 2.8 GHz Cores

why would u need it if 1 core has 2,8 GHZ?
im runng LFS on a 1,9 GHZ single core just fine.
#9 - Jakg
My point was that if this happened, and Scawen was trying to cram the latest Quad Cores with sums to do, it would utterly kill a single core...
yeah, as the quoted reply from scawen already says it prolly wont come into S2 anyways.
are there such weak dual cores that u need 2 cores to run the game properly?
Quote from [RCG]Boosted :are there such weak dual cores that u need 2 cores to run the game properly?

That makes no sense at all.
I run on a Core 2 Duo 1.6 Ghz, and LFS only runs on around only 1.2 Ghz any time. It's the crappy mobile graphics card thats screwing my fps.
no...WONDER my cousins centrino laptop is better than my Turion dual core....bastard.

+1....it really needs to be compatible, im only getting about 60 fps on single player, and about, 10? on full grid, maybe that could be a bit above 30, all the time, so i can race on the CTRA servers without a pile up

thanks

you should be able to download 2 different things, LFS single Core, LFS multi Core
Multi threading needs to be handled at the OS level. We can't expect people to reprogram stuff every time more cores become available.
Harjun, the bottleneck of most laptops isn't the CPU, its the GRAPHICS CARD. You have done nothing but screw up and damage your laptop trying to overclock it, and we both run 1.6 Ghz processors. Like I said, mine runs at 1.2 Ghz on LFS at any given time, but the fps swings up and down.
#16 - Jakg
Quote from harjun :no...WONDER my cousins centrino laptop is better than my Turion dual core....bastard.

No, it's not.

No-one is doubting that LFS being multi-threaded is a bad thing, just that it's gonna take a while.

TBH if Scawen said it would take a month i'd like him to chuck it in with Patch Y, even if that means moving Patch Y on a month, but it's not my call.
Quote from Jakg :

TBH if Scawen said it would take a month i'd like him to chuck it in with Patch Y, even if that means moving Patch Y on a week, but it's not my call.

Sooo...he does month's job, and the patch gets delayed a week? I'm not fallowing you here.
#18 - Jakg
i meant Scawen should make a multi-threaded time machine to go back and fix my post
Quote from geeman1 :That makes no sense at all.

whats so hard to understand?
ofc i meant "are there such weak dual core cpu's" if u want to be picky
Quote :i meant Scawen should make a multi-threaded time machine to go back and fix my post

If he could do that he could have LFS all nicely wrapped up and ready for us by yesterday.
Surley the longer they leave it to decouple everything the more hard work its going to become and the longer its going to take?

I surpose its what everyone would be happy with, do they spend 3-4 months getting LFS surporting Dual Cores or get some extra features included.

I personally think it would be better to add it sooner even if it brings no advantage now, As I am sure it will make things easier in the long run.

Ian
Not really. Scawen's a smart cookie; he's probably got a really nice codebase with good code seperation. Unlike some of the "dire pronouncements" made, its not a case of a complete code rewrite, but multithreaded applications (doesn't matter if its even one processor) does have additional considerations that take more work to support and then to rigorously test.

Most games tend to work on a single game loop that listens and processes OS messages, rendering the current graphics frame, does physics and AI calcuations, polls network, and polls controllers (not necessarily in that order). In fact the min. sleep in the LFS options is probably inside the game loop; essentially it means that the current thread (i.e. the LFS app) does not use up any processor time slices for X amout of time which allows other applications, the OS, etc. to process messages, etc. Anyways, a decent, high-level overview (with code) of a game loop can be found http://www.mvps.org/directx/ar ... writing_the_game_loop.htm. And in LFS case, you are also dealing with a constant rate physics heartbeat which adds a bit of a wrinkle to the game loop.

Back to the topic of multi-threaded support in games, here's a quote snippet from Tim Sweeny (of Unreal fame; he and John Carmack are very good at what they do... plenty of others could be mentioned in the same breath too) has to say:

Quote :AnandTech: The new Unreal Engine 3 is designed for multi-threading, and will make good use of dual core CPUs available when games on the new engine come out. What parts of the game will benefit/be improved, thanks to multiprocessing? What will be the parts that will benefit the most?

Tim Sweeney: For multithreading optimizations, we're focusing on physics, animation updates, the renderer's scene traversal loop, sound updates, and content streaming.We are not attempting to multithread systems that are highly sequential and object-oriented, such as the gameplay.

Implementing a multithreaded system requires two to three times the development and testing effort of implementing a comparable non-multithreaded system, so it's vital that developers focus on self-contained systems that offer the highest effort-to-reward ratio.

If Epic Games finds this difficult, and they have a very good and large staff, hopefully it impresses on folks the non-trivial nature of the task with Scawen being pretty much the sole programmer on the LFS codebase.

Here's another article http://www.gamasutra.com/featu ... 060906/monkkonen_01.shtml that's a good discussion on the pro's and con's of several different types of multi-threaded approaches with regards to games (and actually any type of interactive application).

Quote from Ian_Bassi :Surley the longer they leave it to decouple everything the more hard work its going to become and the longer its going to take?

Well Epic (and 2k with Bioshock) did really good with the multi-threading, after playing Bioshock on a Dual-Core machine, it ran lovely and looked just as good (DX9). Other multi-threaded games I've played didn't do it all so well.
not sure s2 needs dual core support, probably runs fine on a pentium 3 and geforce 3, I get 250fps at 1920x1200 res in this game
Quote from harjun :+1....it really needs to be compatible, im only getting about 60 fps on single player, and about, 10? on full grid

If you overclock it mate, you could get 100fps and 4ghz CPU.

Quote from doox00 :not sure s2 needs dual core support, probably runs fine on a pentium 3 and geforce 3, I get 250fps at 1920x1200 res in this game

But I bet your graphics look as rough as a badgers arse.
1

Dual & Quad Cores Support
(36 posts, started )
FGED GREDG RDFGDR GSFDG