Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by Prodavec

  1. Prodavec

    Server mission, map folder

    Create Mod folder and use it. What's problem?
  2. Drag function uses attachTo in DZ For some reason "#beclient players" command doesn't work reliable now.
  3. Prodavec

    Frustrated with many errors...

    A2 is able to run even on 8600GT and Pentium M processor with 20-40 FPS on low settings. It's like A3 on gamescom on the top rig.
  4. I know reasons for using so much disk space... It's just not comfortable for me (Just my opinion, no offense) and there is no option to automaticaly delete .pack dir after update. And that's not solution to speed up update because SU will convert my mods to SU-mods on the next update process. If you update ACE that becames the hell. This is the key thing - "WE" You - the developer Me - the software user If you should to develop the program for the shortest time and get the money for you job - it's really good solution. Minimum time - maximum money. Something like "Rapid Application Development" by the Borland. Maximum security - minimum time for service and deploying. Basicaly there's no performance goals on that platform. Software developer doesn't care corporate end-user's hardware and corporate end-user doesn't care hardware because it bought by the company. In case of home user the situation is a bit different: in most cases the PC has been bought by user's money and there's no projects which demand critical development time. I'm really ready to wait 1-2-3 months but want to get high performance app with fast start (one mouse click - app is opened and ready on "OnLeftMouseButtonUp" event :)) and low resources consumption in the updating process. Commit charge >250 MB with 60-100% CPU usage and ~20-50% kernel mode is not good for "addon downloader". I'll prefer to use rsync directly via command or something like Total Commander (or any other fast native FTP client) if addons are on FTP server. Thanks a lot.
  5. Trying to not use it. SU eats a lot of CPU and memory resources, starts slow like windows 95 (It's not joke, win7/8 loads faster than SU!), uses a lot of disk space for it simple job (including .pack dir). No idea why .NET was used for non-commercial app with no time limits.
  6. Prodavec

    Delete Empty Vehicles

    nearEntities works much faster and saves perfomance. Also you may use same technique like in Warfare BE: use managed list of all dynamicaly created vehicles.
  7. vectorDir Hmm? returning value [x, z, y] if [0, 1, 0] - objects points to the N it uses normalized vector (vector with magnitude = 1, easily convertable to angles between object's vectors and axises) to determine direction in Oxz plane N (z) ^ | | W - - + - - > E (x) | O | S Ox - W->E axis Oz - S->N axis
  8. You may also code server .rpt parser (ie .so or daemon) or even some script language such php/python. Script (SQF VM) writes to .RPT (onPlayerConnected event) and parser reads .rpt for some key strings like <TEAMSTATUS>...some data...</TEAMSTATUS>.
  9. Well, I play online games since 96 year. Quake/CS/CoD/BF had/has a bunch of players in their communities and generally abusive admins which tried to use admin hax... sorry... tools (I forget, admins do not hack, they just do their job :)) they were a rare exception from the rule. Also, big online allows to change the server and forget. There's low online in ArmA because basically it is a game for mature players and that's a problem. When you kicked/banned/abused by kiddy in CoD/BF is not the same in ArmA with low online. You just have no choice. Yeah, you may swap tha server but some of them, have no players, run some buggy map, require to follow rules like you're playing not a game but court simulator or just high ping. Look at the forum, here's people which complain about players even... admins! It's very bad for "mature" community, because in "non-mature" communities posts/threads like that would be just funny joke with no actual complaining because it's just a game.
  10. As I said above I found simple solution - do not buy BIS products anymore or buy cheapest (lightweighted) game versions when it's possible. I advise to friends to do as. It's not BI mistake, but specific community issue. Just a bussiness.
  11. player setPos [-18594, 25833, 369]; You will be teleported to that position. Coordinates: [x, z, y] y - your altitude above sea level.
  12. It is still possible to mass spawn weapons in WeaponHolder and use addWeaponCargoGlobal / addMagazineCargoGlobal. No way to determine maintenance of a crate via createvehicle.log.
  13. 1. It is not coded using .NET Shitwork, has small memory usage and CPU time - COOL! 2. It saves settings locally in settings.ini with text format - COOL 3. It has compact and fast UI - COOL Thanks a lot. PS I guess there's a problem. It binds the port 2302 which used by the game server by default. Is it possible to use different UDP port?
  14. Well, I want to use "native" engine method to get vector magnitude by using DISTANCE command for perfomance reasons. _vector distance [0, 0, 0]; but for some reasons DISTANCE works strange for me in that case. It returns something random if called few times in a row. For example: [2, 2, 2] distance [0, 0, 0]; you will get values between 3.4 and 3.5. +/- 0.1 m is very bad when using DISTANCE to calculate tiny vectors and small angles between them. Classic way works pretty fine: sqrt (2^2 + 2^2 + 2^2); RESULT: 3.4641 But it impacts on perfomance more than DISTANCE comamnd because contains more operations executed in not "native" environment. Any suggestions gents?
  15. Prodavec

    Vector magnitude

    Got following results on my machine and test map with constant conditions: 1 million iterations [0, 0, 0] distance _vector; // 55s sqrt ((_vector select 0)^2 + (_vector select 1)^2 + (_vector select 2)^2); // 97s ([0,0,0] distance [(_vector select 0)*1000, (_vector select 1)*1000, (_vector select 2)*1000]) / 1000; // 136s (ASLToATL [0, 20000, 0]) distance (ASLToATL [(_vector select 0), 20000 + (_vector select 1), (_vector select 2)]); // 130s PS _vector is predefined as _vector = [2, 2, 2] outside of the testing loop. UPDATE Yeah! Recalculated.
  16. Prodavec

    Vector magnitude

    Did you test it? I mean perfomance of 3x select, 3x multiplying, 1x dividing, 1x distance VS 3x exponents, 3x addition, 1x sqrt?
  17. Prodavec

    Vector magnitude

    It is realy dependent from the weather lol. Just tested. 0 setOvercast 1; 0 setRain 1; [2, 2, 2] distance [0, 0, 0] Distance varies between ~3.33 and ~3.61
  18. Prodavec

    Vector magnitude

    Also for some reasons it is not constant (even it's mystical map distance and on the LAND) and differs like SaMatra described. Looks like the water waves are the border of the world. So no way to calculate vector magnitude by single command? :( Got it. That's weird. It is called the crutches.
  19. FSM code affects on FPS because it is executed in non-scheduled environmentd but condition check may be delayed.
  20. Does it mean the player should be detected on multiple servers with restricted scripts or multiple BE records of the one server at random time (for ex. Monday, Tuesday, Friday, Sunday, next week...)? Anyway it means it's possible. Just need to compose few false reports at random time and few random servers, for example at my servers and servers of my friend which administrates some other server(s). Right? Basically I thought it is FULLY automated process with no intervention of the admin(s).
  21. That simple question. I need fastest and reliable method to copy a big arrays. I have a problem with that and/or need some explanation of the engine behaviour. For example we have a code: _someBigArray = [item1, item2, item3, ..., itemN]; // A bunch of elements // do something with an array, for example for "_i" from 0 to ((count _someBigArray)-1) step 1 do { if (!alive (_someBigArray select _i)) then { // some code _someBigArray set [_i, objNull]; // mark items for delete with objNull }; }; _someBigArray = _someBigArray - [objNull]; // remove items, marked with objNull _someOtherBigArray = _someBigArray; // Copy one array to another one And you'll get problem on the system with very low FPS (1-5): the second array named _someOtherBigArray will consist objNull elements! But objNull's were deleted with binary subtraction! Low FPS is very important condition to get this results. That is strange for me, because looks unreliable, like _someBigArray = _someBigArray - [objNull]; was executed in separate thread and scheduler begins to execute next line while binary substraction was not completed. I tried manual copying: _someOtherBigArray = []; for "_i" from 0 to ((count _someBigArray)-1) step 1 do { _someOtherBigArray set [_i, _someBigArray select _i]; }; and it works fine, reliable and I never get objNulls in new array. But this method is not optimal because it loads scheduler with additional work. What am I doing wrong and what should I do to correctly copy a big arrays in low-fps evironment? PS http://community.bistudio.com/wiki/Code_Optimisation#Removing_elements_from_an_array ARRAYX set [0, objnull]; ARRAYX = ARRAYX - [objnull]; This code will be buggy on low FPS ARRAYX set [0, objNull]; ARRAYX set [1, objNull]; ARRAYX set [2, objNull]; ARRAYX set [3, objNull]; ARRAYX set [23, objNull]; ARRAYX set [32, objNull]; ARRAYX set [55, objNull]; ARRAYX set [NN, objNull]; // NN - something other ARRAYX = ARRAYX - [objNull]; ARRAYY = ARRAYX;
  22. Well, you're right. I guess for loop is needed for maximum possible perfomance when you're working with large array (or you need a lot of iterations). Oh... this is additional expression to execute. I'm very aware of perfomance, because... you know ArmA is lagging most of the time. A lot of people still playing with 20-40 FPS (just check last videos with A3 demonstrating on VERY powerfull PC. Even developers play with lags!), that is not so much especialy in CQB. Or they need to reduce video settings to get 60-100 FPS but graphics becames crappy. I very often hear: "I got new rig with 32 GB RAM, 690 GTX in SLI and i7 3570 processor but ArmA, the game of the 2009 year still lags. WTF?!?!? *going mad*" lol. So I have to make ideal code :)
  23. Understand. I see perfomances difference betweent forEach and FOR loop and I guess it is better to use FOR loop if it's possible even counter is not used. But forEach loop has advances (just tested): you'll never get Zero Divisor message: { // a bunch of code here and we're running low-end machine with low FPS // _x is unit // some one was killed and allUnits array has been decreased... we still working inside of loop with no problems } forEach allUnits; for "_i" from 0 to ((count allUnits)-1) step 1 do { _unit = allUnits select _i; // some one was killed and we get decreased allUnits, but FOR doesn't "know" about this. Loop condition doesn't evaluate second time. // we getting Error Zero Divisor }; Got some perfomance results: // forEach with _forEachIndex instead of COUNT command { _array2 set [_forEachIndex, _x]; } forEach _array1; // RESULTS // With no RESIZE: 56.6719 / 56.3047 / 56.2109 // With RESIZE: 57.6094 / 57.0625 / 56.7656
  24. Muzzleflash Thanks a lot! That info should be in wiki :) Deadfast I did few tests: _msg = "BEGINING BENCHMARK..."; hint _msg; player groupChat _msg; diag_log _msg; // Prepare (here is static part) // ------------------- _array1 = []; // define _array1 _array2 = []; // define _array2 for "_i" from 0 to 10000 step 1 do { _array1 set [_i, random 10]; // Fill _array1 with random data, total 10000 items }; _size = count _array1; // size of _array1 _array2 resize _size; // make resize _array2 to prevent resizing in each iteration _k = 0; // counter // ------------------- _t1 = diag_tickTime; // The Test // ------------------- for "_i" from 0 to 100 step 1 do { // forEach speed test /* { } forEach _array1; */ // RESULTS: 3.24219 / 3.13281 / 3.13281 // forEach + SET with COUNT command /* { _array2 set [count _array2, _x]; } forEach _array1; */ // RESULTS // With no RESIZE: 66.6172 / 65.2266 / 65.3594 // With RESIZE: 65.7344 / 66.5781 / 65.2344 // forEach + SET with counter increased manualy /* { _array2 set [_k, _x]; _k = _k + 1; } forEach _array1; */ // RESULTS // With no RESIZE: 84.75 / 85.2188 / 84.4609 // With RESIZE: 85.5703 / 84.7266 / 85.75 // FOR speed test /* for "_n" from 0 to (_size-1) step 1 do { }; */ // RESULTS: 2.64063 / 2.63281 / 2.64063 // FOR + SET with internal FOR's counter which increased automatically /* for "_n" from 0 to (_size-1) step 1 do { _array2 set [_n, _array1 select _n]; }; */ // RESULTS // With no RESIZE: 53.5 / 53.0703 / 53.3594 // With RESIZE: 53.6406 / 53.6641 / 53.3047 // + Unary Operator (the fastest way!) /* _array2 =+ _array1; */ // RESULTS: 0.710938 / 0.757813 / 0.734375 }; // ------------------- _t2 = diag_tickTime; _msg = format ["EXECUTION TIME: %1", (_t2 - _t1)]; hint _msg; player groupChat _msg; diag_log _msg; As you can see RESIZE doesn't influence on the perfomance in my test or influences very-very little (within an error). So if I want to copy an array I have to use + unary operator: _array2 =+ _array1; instead of simple = or SET If I will have to do some processing I'd prefer to use FOR "<counter>" instead of other methods, because it's fastest way. Right? Got it! That's why you don't see the change. _array1 = [1, 2, 3]; _array2 = _array1; _array1 set [0, 4]; hint str _array2; Getting [4,2,3] as I expected. But I still don't understand, you says: Now we have #ARR_B, it doesn't contain objNulls anymore. I do: _someOtherBigArray = _someBigArray; because it's two pointers which refer on the same array. But for some reason on extremely low FPS I'm getting something like that: _someBigArray ---> #ARR_A: [1, 2, 3, objNull, 5, objNull, 7, 8, 9, objNull]; _someBigArray = _someBigArray - [objNull]; // remove objNulls _someBigArray ---> #ARR_B: [1, 2, 3, 5, 7, 8, 9]; _someOtherBigArray = _someBigArray; and theoreticaly we should get second pointer to the same array: _someOtherBigArray ---> #ARR_B: [1, 2, 3, 5, 7, 8, 9]; _someBigArray and _someOtherBigArray refers to #ARR_B. It's easy to understand and it works until we have enough FPS. Actually I'm getting this when FPS 0.5-2: _someOtherBigArray ---> #ARR_C: [1, 2, 3, objNull, 5, 7, 8, 9]; WTF? It looks like it's hybrid array of A and B but MUST be #ARR_B with no objNull inside! I currently cant create new reference because of this: _someBigArray = _someBigArray - [objNull]; // #ARR_A to #ARR_B but with no objNulls _someOtherBigArray = _someBigArray; // new pointer to #ARR_B _someOtherBigArray will consist objNulls. Hm? Found the roots of the problem. Topic may be closed. Thanks Muzzleflash for explaining how references work. while {true} do { _someBigArray = [...]; for .... do { //... _someBigArray = _someBigArray - [objNull]; }; _someOtherBigArray = _someBigArray; sleep N; }; _someOtherBigArray will get [objNulls] inside of it at the next iteration of WHILE. Goddamit. :)