snkman 351 Posted January 17, 2007 Hi Guy's, well i make a mission and i noticed something strange.... Here's the Problem: If i Play with a West Soldier ( I just place one West solder into my Mission and run with him through the area ) The screen just stops for 1 or 0,30 sec. ant this every 20 sec. If i now place a East solder into the mission and i run with him through the area everything works just wonderfull... I really dont know the problem but i think it has something to do with Urban Patrole Script 1.2 Beta. Now i have 8 Sectors: I always use this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> [this,"MarkerName","HIDEMARKER","NOTRIGGER","NOWAIT","RANDOMDN"] exec "Scripts\ups.sqs"; this setSkill (Random 0.30); Less Sectors to Patrole, less laggy i noticed? But maybee i'm wrong... But the strange thing is, if i Play exactly the same Mission with a East Soldier i got no lag...? Someone else ever had the same problems? Share this post Link to post Share on other sites
kronzky 5 Posted January 17, 2007 Send me a copy of your mission and I'll look into it. (email is in the readme) Haven't got a clue though, why the script would cause something like this (I ran it it with over 100 units, and didn't experience those kinds of issues)... Share this post Link to post Share on other sites
snkman 351 Posted January 17, 2007 Okay i send the Mission to your E - Mail. I hope you can find something cuz i tryed everything i could the last few days.... Thank you very much Kronzky Share this post Link to post Share on other sites
kronzky 5 Posted January 17, 2007 Quote[/b] ]If i Play with a West Soldier ( I just place one West solder into my Mission and run with him through the area )The screen just stops for 1 or 0,30 sec. ant this every 20 sec. If i now place a East solder into the mission and i run with him through the area everything works just wonderfull... LOL... "just one West soldier..." You got nearly 500 units in your mission, 400 of which are moved simultaneously via 75 instances of my script! (Plus about another dozen scripts that loop continuously.) And you are surprised about a little lag every few seconds??? BTW - The delay doesn't happen if you're an East soldiers, since then the AI doesn't test for enemy encounters (after all, you're one of them, so it skips a bunch of tests). I just tested the mission with my new beta version, which was totally rewritten and re-optimized in SQF, and that doesn't seem to create this lag. But then again, it pops up all kinds of other weird errors, so it could be that it doesn't actually move all the units it's supposed to (I didn't have time to look into it that closely.) Update: I just realized there was a syntax error in the way I had called the SQF file, and after I fixed that, and got rid of the errors, it turned out that the performance of the SQF script is actually much worse than the SQS version! Even though, because of the better structure, if should have to execute less code. (But that's what I always suspected when people were talking about how much "faster" SQF is. Faster perhaps, but a what cost?! It's probably faster if it's the only process in a "sterile" test environment, but once it has to play nice with other processes, then all of a sudden we have a problem...) So, don't bother with the SQF version for now - it'll only make it worse for you. But the main problem is just that your mission is too complex... Don't move all the units all the time. Only initiate them when the player is around, and then stop'em again once he's gone. I have a pretty decent system, but even that seriously buckled under the load when I first started the mission. I doubt very many people would be able to properly run that mission. So you need to do some serious optimizing... But thanks for sending me the mission anyway. It's a good stress test for my new version... Share this post Link to post Share on other sites
snkman 351 Posted January 17, 2007 Hi Kronzky Thank you very much for checking my Mission. Well i was thinking about something like that becouse if i was deleting many units the lag was gone. Okay of course i like to test it with your new beta Is this the link? http://kronzky.info/ups/ups-f.zip becouse it's v. 1.5.0 and the other was 1.2.0? Maybe there will be a way one time to add as many Unit's as you like. Now 1. i will test my mission with your new 1.5.0 beta and if it don't work i will start optimizing the mission. About my mission: Your welcome! A pleasure to support you. So far thank you for the help and KEEP ON CODEING!! Thanks!!! B.t.w. In the new Beta: RANDOMDN and NOWAIT are not supported any longer? is this right? <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">// ****************************************************************************************** *************** // Optional call arguments that work in this version (see readme for details) // // HIDEMARKER = hides area marker // NOTRIGGER = no message when area is cleared // RANDOM = places unit at a random position within the area marker // MIN/MAX = creates a random number of "clones" of the unit // ROT = rotational angle of marker (will become obsolete with next ArmA patch) // NOAI = turns off improved AI behaviour // NAMED = unit is named (for external control of script) // // ****************************************************************************************** *************** Share this post Link to post Share on other sites
kronzky 5 Posted January 17, 2007 Quote[/b] ]B.t.w. In the new Beta: RANDOMDN and NOWAIT are not supported? is this right? Nah, they're both supported. (I just forgot to update the header comment.) What's not supported so far are the local functions (like "TRACK" & "INTEL"). Since the next ArmA patch will have some new functions to deal with markers in a MP-environment I was still waiting for that to come out. Also, keep in mind - this is a very early beta version. It is FAR from finished, and is really just there for a few brave souls to test it (to get a general idea of how well the SQF conversion performs, and how the MP-compatibility is holding up in real life). Don't use it in a mission that you want to publish! An official version 2.0 (which will then replace the current, stable version) should be out soon after the next ArmA patch (whenever that will be). Share this post Link to post Share on other sites
Falken 0 Posted January 21, 2007 Strange thing is that I have made a mission (unreleased, currently in testing on the private server I play on), which uses over 120 instances of your script with over 400 units. Even on my terribly underpowered PC it ran pretty OK. Share this post Link to post Share on other sites
kronzky 5 Posted January 21, 2007 Interesting! AND nice to hear... Are you using the "NOAI" switch perhaps? Because that makes a huge difference if you have lots of units moving around. Send me a copy some day when it's finished! I'm always interested in seeing my script in action, in a real, complex mission. (That way I can find out more about how people use it, and where it might need improvements.) Share this post Link to post Share on other sites
snkman 351 Posted January 25, 2007 Hi Kronzky, Well i just have to say YOU ARE MY HERO!!!!!!! I changed everything in my mission to support UPS 1.6.2 And...... NOTHING!!!! No lag's anymore Really pretty good work Kronzky. Thank you for the AWESOME Script! Share this post Link to post Share on other sites