KoffeinFlummi / AGM

Authentic Gameplay Modification for A3 | THIS PROJECT IS NO LONGER BEING WORKED ON. ALL ISSUES AND PULL REQUESTS WILL BE IGNORED.
Other
125 stars 84 forks source link

AGM top down attacks do not use perFrame execution, guidance will be broken in use #1897

Closed jaynus closed 9 years ago

jaynus commented 9 years ago

https://github.com/KoffeinFlummi/AGM/blob/master/AGM_TopDownAttack/functions/fn_topDownAttack.sqf

The code spawns separately into scheduled execution space local to the client; this will break in just about any use besides single player testing. This should be handled via PFH execution and compensate for accTime/frame delays.

nicolasbadano commented 9 years ago

The code spawns separately into scheduled execution space local to the client; t

True

this will break in just about any use besides single player testing.

Not true. That certainly can happen if fps are low enough, but they are usually not. Keep in mind PFH will break under those conditions too.

Contrary to popular belief, not even native ballistics are computed by the engine every frame. On mods, things like wind drift has being handled on scheduled threads since the days of ACE and have little problems.

jaynus commented 9 years ago

You are incorrect. I wrote guidance in ACE2, and also contributed to most of the guidance and laser designation for it. I integrated the PFH handling for most of ACE's missile guidance.

You are also incorrect about wind drift, guidance and other things in ACE being calculated via scheduled space and having "very little problems". The majority are event-triggered, which execute in a single frame, or handled via the PFH schedulers when time-critical; such as guidance, ballistics, UI handling, etc. These had major problems until 4 years ago when they were moved into PFH handling prior to BI providing the functionality.

This code executes in scheduled 'spawn' environment, so it will execute per the script scheduler, which will have horrible effects in any sort of 20+ player scenario. This is compounded by the use of sleep in this code as well, which will yield for much longer than your designated time.

nicolasbadano commented 9 years ago

Sorry; obviously I must be wrong. I guess the last time I checked the ACE code was a looong time ago. We are aware that the scheduler doesn't really sleep the designated time so, FWIW, we usually compute the actual waited time using something like this:

_time = time;
sleep 0.05;
_deltaTime = time - _time;

Switching to PFH is certainly doable. However, I actually haven't seen issues related to this firsthand. Has anybody else encontered problems with this?

nicolasbadano commented 9 years ago

BTW, you obviously have a great deal of experience; any contribution to AGM would be welcome, either with code or expertice.

commy2 commented 9 years ago

I am aware of the issues sheduled environments scripts have and am currently changing all UI stuff in the BWA3 mod to onDraw / onEachFrame. Our UHT Tiger helicopter, which may have some advanced missile guidance scripts could be used to recycle some code for AGM then.

jaynus commented 9 years ago

http://acre.idi-systems.com/jvon-alpha/missileguidance_examples_broken.zip

You can see these different examples and flight profiles in action on my youtube channel: https://www.youtube.com/channel/UCcmawFiEi9q7WjHkf0k1QJg

Here are some incomplete examples of some guidance and trajectory management. This also includes some new laser designation code.

Note, this is incomplete and by no means should be put straight into AGM. but this should give you some working building blocks of more realistic guidance using PFH; as well as laser designation and sensor head guidance.

I've included my beginning of my own Javelin/Titan guidance. That is how I came across AGM's implementation, I needed the new optics classes. It is incomplete at the moment but mostly there.

I'm still developing and testing this at the moment @ UO; once I have some more finalized versions of these i'll provide to AGM for use. (they will also be used independently at UO, as well as the fact this is development for ACE3)

jonpas commented 9 years ago

Sounds like ACE3 devs + AGM devs = Arma 3 Revolution!

jaynus commented 9 years ago

I would honestly recommend a merging of AGM, CSE, RHS and ACE. AGM/CSE are rewriting (and in some places, much better) systems which were part of the core ACE experience. Alternatively, the ACE team has 50+ years of combined Arma engine modding experience. I honestly think all 3 combined would instantly be on-par with ACE2; but I don't see it as a possibility until later this year. All these mod teams exist because $$$.

nicolasbadano commented 9 years ago

@jaynus, I agree with you, and I would bet that most of the guys on AGM do too. That's why we chose to support AGM, which is open sourced under GPL. That guarantees that no one will need to rewrite this features from scratch ever again unless they want too; anyone is free to copy/paste any of the code as long as they publish the modified version under the same license.

That is our vision; code that outlives Arma 3 and even us. Anyone is welcome to participate with us, fork our repo or release their own AGM derivatives.

We sincerely believe in this approach, and we would love others to embrace it too. The final outcome would benefit all, even if it's not called AGM at the end of the day.

commy2 commented 9 years ago

I would honestly recommend a merging of AGM, CSE, RHS and ACE.

I totally agree.

and in some places, much better systems which were part of the core ACE experience

Thank you. Thats a huge compliment.

All these mod teams exist because $$$.

AGM wasn't started for the (potential) cash. We started it, because A3 was lacking ACE, which made playing A2 worthwhile for me in the first place.

bux commented 9 years ago

I would honestly recommend a merging of AGM, CSE, RHS and ACE

I could not agree with you more.

jonpas commented 9 years ago

Totally agreed. Just thinking about what this would mean for whole Armaverse, something never seen before and it would really show what Arma community is capable of and the teamwork/collaboration involved. And on top of that all open-source, revolution in modding if you ask me.

KoffeinFlummi commented 9 years ago

I would honestly recommend a merging of AGM, CSE, RHS and ACE. AGM/CSE are rewriting (and in some places, much better) systems which were part of the core ACE experience. Alternatively, the ACE team has 50+ years of combined Arma engine modding experience. I honestly think all 3 combined would instantly be on-par with ACE2; but I don't see it as a possibility until later this year. All these mod teams exist because $$$.

I would agree as well, with the exception of maybe RHS. I like the fact that mechanics are seperate from content. The community commy and I play in portray German forces, so we can simply load AGM - which is a 20 MB (!) download - and the BWMod, while someone playing as - say - Spanish forces can download that mod etc.

That was actually the reason AGM got started in the first place. We added some mechanics to the BWMod and then realized that content and mechanics should stay seperate, and split that stuff (at the start just the fire control system, speed limiter and the night vision adjustment) into another mod.

I believe that by going open-source, you can ensure the longevity of your project in a way even the best teams can't. If all of us die in a fire, someone can still pull up this repo when Arma 4 comes along and port everything. So while I would fully support a merger of whatever state ACE 3 is in and AGM, I would not be willing to do so at the cost of sacrificing this core principle. Regarding MANW, I don't really care. If that would really be the main hurdle, I would abandon it in a heartbeat.

nicolasbadano commented 9 years ago

AGM wasn't started for the (potential) cash. We started it, because A3 was lacking ACE, which made playing A2 worthwhile for me in the first place.

And that's the same reason we, the collaborators, joined.

I believe that by going open-source, you can ensure the longevity of your project in a way even the best teams can't. If all of us die in a fire, someone can still pull up this repo when Arma 4 comes along and port everything.

True; I wouldn't want to die in a fire though.

Regarding MANW, I don't really care. If that would really be the main hurdle, I would abandon it in a heartbeat.

Sure.

NicSchni commented 9 years ago

A merge of these mods would be the best thing ever happening to Arma IMO.

KoffeinFlummi commented 9 years ago

@jaynus If you're interested in further pursuing this, feel free to add me on Skype (same name as on here).

commy2 commented 9 years ago

Closed. OP knows why.