![]() |
Quote:
I will not continue this discussion so please don't paste more text you don't understand from wikikpedia/tomshardware. Why did I really feed this troll? I usually manage to restrain myself from that. PS. Send me you linked in profile in a PM and I will send you mine if you promise to not post it further. I really like to be able to participate in forums like this without using my real name as I don't want to mix my private interests with my business profile.... |
Offtopic:
Although multicore and multithreaded cpu's are relatively new, multiprocessing dates back to the mid-fifties. Already in 2000 I had a dual Pentium II machine running NT4.0, Linux and Solaris (not at the same time, mind you). They all made use of both CPU's. It's remarkable that it has taken such a long time to come up with the idea of multicore/threading and that programming them still is a problem. A fine example of early custom chip (multi)processing was the Amiga, where already in 1985 the chips Agnus, Paula and Denise did work for the 68K CPU to produce graphics, sound, control I/O and memory access. Agnus essentially being the first ever successful GPU and DMAC and sometimes even controlling the CPU and being able to manipulate graphics without using CPU cycles. Programmers didn't even need to use the multitasking kernel. Had programmers and hardware designers of the x86 platform taken a closer look at the way the Amiga solutions were implemented, these things would've been easier a long time ago. |
Quote:
|
Quote:
|
Quote:
Btw never done any web programming, but its sad you cant hold up a argument vs a 18 year old... |
Quote:
|
Quote:
|
I havent coded in like 20 years, but mazex is spot on. People who think creating a game engine that can make proper use of 2/4/8 or more threads is easy need to do some reading. There is a reason most software today barely scales beyond 2 threads. Heliocon, maybe you should just try it.
What I am curious about is the physx claim, that it would be useless for flightsims. I dont know about the API, maybe that is useless, but calculating the physics (rather than PhysX) does seem something that could benefit greatly from GPGPU (CUDA or OpenCL). |
Quote:
Well, I did write a long example with pseudo code and all in my second post in this thread but deleted it as it was to long winded. I realize that you actually think you are right and then naturally think that I'm just talking bull so let's try to sort this out then. I think that the problem is that you have maybe confused threads and cores in some way. When you write a Windows program it will run in a process and if you do no not create more threads yourself in the code it will just run on a single thread. That thread in it's turn can only run on one CPU or Core (and the OS assigns that if you don't mess with that yourself which really should not be done) . So a game that does not create additional threads will run on one core... It will do calls to the OS that will use other threads for that but generally it will just load one core itself. Then to use the other cores you have to create new threads from your code and start them yourself in the code. The OS can then let them run on one of the other cores or CPU:s if available or chop the time on the CPU between the threads if you have only one CPU/Core. OK - so the threads run in the same process but one of the problems is that if they are going to access shared memory (variables like the state of the me 109 in front of you) they may try to update the same shared memory (like an array of detected enemies that is a private variable in the CFighterPlane object) and that's a no no. Therfore you have to make sure that the thread that is going to update that shared variable get's exclusive access to the variable while updating it - which is essential if you are going to write thread safe code (handled by identifying these critical sections and make sure to exclusive access that memory while updating it so no other thread does that at the same time). The problem is also that both the AI thread (if you create a thread for that in your code and the OS then assigns that thread to run on a core.) and the code for the Collision detection might want to update the number of enemies detected by that specific enemy plane object as the collision detection code has just "killed" that same enemy plane that crashed into a mountain in classic IL2 way ;) The AI code is then on the same time trying to update the object that got "killed" to try to avoid the mountain. What happens then? Those problems are really hard to debug in multi threaded code as opposed to traditional single threaded code that can be debugged line for line but the in the multi threaded code your breakpoint at the part of the code that detected the collision will stop but what is the state of the other thread? Those problems are hard to solve and if your AI thread is milling along updating the "inputs" for the AI planes the render loop has to know that as it updates the actual meshes loaded to the GPU each loop in the main game loop. Not trying to push you down but trying to explain - OK? /Mazex |
Quote:
Also physx (which I never mentioned btw as someone implied I did) is mainly geared to particles and cloth/hair etc. It would certainly work for stuff like clouds and smoke that interact with planes passing through, but I dont know of its effects on flight models. CUDA is meh. |
All times are GMT. The time now is 09:32 PM. |
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.