FTC_Rostic Posted January 8 Posted January 8 I created a AI intense mission for multiplayer event. It has 216 AI aircrafts. To test what AI do, I was running dedicated server on my PC. To observer whats going on in a mission and how AI behaive I connected as a client from SAME PC. At some point I realized the my game is runngin butter smooth with average 117 FPS, what I never experienced in CloD in single player campaigns. So, I did a quick test. I made a copy of multiplayer mission to single player missions folder. Assigned player to one of aircrafts and started the this single player mission. You know what? All magic gone, performance was a total crap, with average 26 FPS! Funny thing, that all the game logic, AI processing and graphics rendering happening on same PC in both cases. But only one, where AI processing and game world logic running in separate application, gains significant performance boost! I think TFS should move all internal game logic and AI processing to separate threads, finally making game multithreaded. There are definitely some benefits in getting extra FPS in single player campaigns. 4
LLv34_Flanker Posted January 8 Posted January 8 S! Everything that helps with performance is good👍Question is how hard and feasible is this for TFS to implement to the game.
FTC_Rostic Posted January 8 Author Posted January 8 1 hour ago, LLv34_Flanker said: S! Everything that helps with performance is good👍Question is how hard and feasible is this for TFS to implement to the game. Well, I do not know. But that is not very simple. Dedicated server has it's differences in compare to single player. To name a few: Player multiplayer bubble, limiting access to all assets in mission (to switch aircraft in the middle of mission). Did you know that in CloD if you were damaged, you can leave damaged aircraft and take control over AI controlled aircraft to continue mission and have uninterrupted fun? Or jump to AAA and start shooting aircrafts. Or jump in to tank (not all of them can be player controlled) and take part in ground battle (though, tank game play visuals are quite ugly). Need to solve problem of synchronization data between multiple threads without lost of performance. Simple stupid usage of system semaphores may reduce performance. With different apps like in my example it happens because data flow goes through socket (that is already in sync to server). But as I mentioned server does not provide access to all the data on the server. This means for SP completely different system have to be created from scratch to implement all single player capabilities. So, that is not that simple as just run dedicated server code internally and connect player to it, so he will not notice that he is in fact playing multiplayer game without other players But benefits of having AI processing in different thread or threads are possibility to write more complicated AI logic that will make them more clever and human like, and of course boost FPS in AI intense single player missions... and, basically, to get all the benefits DCS got when they switched to multy-threaded engine.
BOO Posted January 8 Posted January 8 That would be something. In DCS I ran dedicated a server on the same PC for a few years to get around the single thread issue. Huge differences in performance especially where the mission was heavy on AI flags and triggers. If it were to be done it does need to be easy to use. A stright forward launch option click. I dont think CloD can afford to have another obsticle in the way of getting in the game and flying.
Hiuuz Posted January 8 Posted January 8 If you find an experienced coder guy who has the will to join TFS, I think Buzz wouldn't say to him: ship is full. 1
PO_Baldrick Posted January 8 Posted January 8 A few thoughts. It would seem a big project. It took years for DCS, no idea how many man hours but a lot of elapsed time and that was with their own code. Not that a big project should be dismissed, if the resource can be found but managing expectations, rewriting a game engine that was created by others to enable multi-threading could take a very long time. For what I use DCS - quick missions and pretty lightweight stuff for decent VR performance - multithreading seems to have little effect. I even recently upgraded my CPU to get one with more cores yet the benefits seem similar for the non MT stuff too. I am sure there will be scenarios as described above which would benefit but for what the majority of users use CLIFFS for (and of course I am guessing) I am not sure the benefits would be that noticeable? As it stands I find CLIFFS performs better than DCS MT in VR. 1
Hiuuz Posted January 8 Posted January 8 (edited) Hmm. My first thought is: more complex airplane engines/systems simulation, damage models and ballistic calculations. 😎 Honestly, I don't know at the moment how these works in CloD but I can imagine how complex could be to calculate every single bullet position flying in the air, or a bullet hit your aileron control rod or miss it with two centimeters 😁 Edited January 8 by Hiuuz
Mysticpuma Posted January 8 Posted January 8 2 hours ago, Hiuuz said: Hmm. My first thought is: more complex airplane engines/systems simulation, damage models and ballistic calculations. 😎 Honestly, I don't know at the moment how these works in CloD but I can imagine how complex could be to calculate every single bullet position flying in the air, or a bullet hit your aileron control rod or miss it with two centimeters 😁 At the moment, the effects system gets overwhelmed trying to calculate where all the shrapnel is going and everything just vanishes....so maybe multi-threading would help? 1
FTC_Rostic Posted January 9 Author Posted January 9 13 hours ago, Mysticpuma said: At the moment, the effects system gets overwhelmed trying to calculate where all the shrapnel is going and everything just vanishes....so maybe multi-threading would help? I think that is very different bug. I has something to do with amount of specific sort of effect game trying to display on the screen. It is applicable to: Clouds rendering Aircraft external glass rendering Bombs explosions rendering Searchlight light rendering god knows what else And that effect depends only on the NUMBER of effects to be displayed on the screen. If you recreate that situation, with a lots of bombs exploding during long period of time inside of relatively small area, and make camera moving left to right and back you will notice that explosions effects will appear and disappear dependent on how much of that area is on the screen. 1
Team Fusion Buzzsaw Posted January 11 Team Fusion Posted January 11 Of course we have considered re-working the way the game engine assigns tasks to the different cores and using multi-threading. We started discussing this in 2017 as soon as we received the code. It is definitely on our list of 'to do's'. But the amount of work required to complete such a re-write is considerable... which is why it has not been attempted yet. Reworking or improvements to other elements in the code have had to take priority. By the way, CLIFFS is far superior to most games out there in its ability to handle multiple AI. 3 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now