Jump to content
Sign in to follow this  
fabrizio_t

bDetect | bullet detection framework

Recommended Posts

Did a quick test to split into a server/SP and a MP Client specific version.

Server excludes to add player-EH's, the players EH are processed by client.

This works.

To investigate:

A- Use "CBA_fnc_addEventHandler" and "CBA_fnc_globalEvent" on dedi server to have bDetect pick up client sent data.

B - Using "[-1, { some code _this }, params ] call CBA_fnc_globalExecute" trigger required effect on dedi server.

(Not sure what is prefered to limit system and network overhead)

Share this post


Link to post
Share on other sites

@Ollem,

made some tests to assure bDetect v0.68 does not break anything, regarding SP.

Feels like it's ok. Did you notice badly brokenstuff in SP or MP?

If not i would eventually release it as v0.69 - production release, including the "uphill" fix by tpw.

---------- Post added at 14:53 ---------- Previous post was at 14:51 ----------

Did a quick test to split into a server/SP and a MP Client specific version.

Server excludes to add player-EH's, the players EH are processed by client.

This works.

To investigate:

A- Use "CBA_fnc_addEventHandler" and "CBA_fnc_globalEvent" on dedi server to have bDetect pick up client sent data.

B - Using "[-1, { some code _this }, params ] call CBA_fnc_globalExecute" trigger required effect on dedi server.

(Not sure what is prefered to limit system and network overhead)

Looking forward to your results.

Edited by fabrizio_T

Share this post


Link to post
Share on other sites
To investigate:

A- Use "CBA_fnc_addEventHandler" and "CBA_fnc_globalEvent" on dedi server to have bDetect pick up client sent data.

B - Using "[-1, { some code _this }, params ] call CBA_fnc_globalExecute" trigger required effect on dedi server.

(Not sure what is prefered to limit system and network overhead)

A is definitely preferred, because B keeps sending the code AND parameters over the network, where-as A only sends the parameters over the network, thus saving sending the code over-and-over.

Share this post


Link to post
Share on other sites
A is definitely preferred, because B keeps sending the code AND parameters over the network, where-as A only sends the parameters over the network, thus saving sending the code over-and-over.

thx, so broadcasting variables to server and all clients is still preferable over sending vars + some code to just the server?

Or is there an CBA EH that will only broadcast to server?

(I've seen only a) EH to send to all, including local client, b) to all exlcuding local, and c) just local, but not one to just send to server?

(Anyway, using the EH seems easier to hook into the existing dDetect framework after all.)

d) CBA_fnc_whereLocalEvent

Edited by Ollem
---- found d) -----

Share this post


Link to post
Share on other sites
thx, so broadcasting variables to server and all clients is still preferable over sending vars + some code to just the server?

Or is there an CBA EH that will only broadcast to server?

(I've seen only a) EH to send to all, including local client, b) to all exlcuding local, and c) just local, but not one to just send to server?

(Anyway, using the EH seems easier to hook into the existing dDetect framework after all.)

Ollem,

let me know what should i do to add these functionalities, i have really no clue.

BTW: good forum birthday ;) 10 years!

Share this post


Link to post
Share on other sites

Not sure if I'm able to work it out today, but I believe I've found the right approach:

The rately used: CBA_fnc_whereLocalEvent

(there's only 2 references about it on this 10 yr old forum - 3 now :p )

I'll believe the following should work:

on isDedicated server, spawned in dDetect.sqf:

// Only triggered where _unit is local
["suppressEvent", {
_unit = _this select 0; _side = _this select 1;

[_unit, _side] call '[i]some_bDetect_fnc'[/i];

}] call CBA_fnc_addLocalEventHandler;

Player trigger event, executed on player client - already processed so only triggered in case bullets were detected in range of suppressed unit:

["suppressEvent", ['[i]suppressed AI unit[/i]', '[i]side[/i]']] call CBA_fnc_whereLocalEvent;

(I've code ready which allows specific parts od bDetect to run on isDedicated and/or client - will share later today)

Edited by Ollem

Share this post


Link to post
Share on other sites
Not sure if I'm able to work it out today, but I believe I've found the right approach:

The rately used: CBA_fnc_whereLocalEvent

(there's only 2 references about it on this 10 yr old forum - 3 now :p )

I'll believe the following should work:

on isDedicated server, spawned in dDetect.sqf:

// Only triggered where _unit is local
["suppressEvent", {
_unit = _this select 0; _side = _this select 1;

[_unit, _side] call '[i]some_bDetect_fnc'[/i];

}] call CBA_fnc_addLocalEventHandler;

Player trigger event, executed on player client - already processed so only triggered in case bullets were detected in range of suppressed unit:

["suppressEvent", ['[i]suppressed AI unit[/i]', '[i]side[/i]']] call CBA_fnc_whereLocalEvent;

(I've code ready which allows specific parts od bDetect to run on isDedicated and/or client - will share later today)

Thank you, any code insight will be precious.

Have a nice weekend.

Share this post


Link to post
Share on other sites
Thank you, any code insight will be precious

PM sent.

Have a nice weekend too!

Share this post


Link to post
Share on other sites

Hey can I make a suppression effect to put into your mod??? sort of like screen blur when a bullet hits near you (Project Reality).

---------- Post added at 06:15 PM ---------- Previous post was at 06:05 PM ----------

Hey can I make a suppression effect to put into your mod??? sort of like screen blur when a bullet hits near you (Project Reality).

I actually meant for this to be for the other Suppression Mod, can someone move this over to the other mod...

Share this post


Link to post
Share on other sites
Not sure if I'm able to work it out today, but I believe I've found the right approach:

The rately used: CBA_fnc_whereLocalEvent

(there's only 2 references about it on this 10 yr old forum - 3 now :p )

I'll believe the following should work:

on isDedicated server, spawned in dDetect.sqf:

// Only triggered where _unit is local
["suppressEvent", {
_unit = _this select 0; _side = _this select 1;

[_unit, _side] call '[i]some_bDetect_fnc'[/i];

}] call CBA_fnc_addLocalEventHandler;

Player trigger event, executed on player client - already processed so only triggered in case bullets were detected in range of suppressed unit:

["suppressEvent", ['[i]suppressed AI unit[/i]', '[i]side[/i]']] call CBA_fnc_whereLocalEvent;

(I've code ready which allows specific parts od bDetect to run on isDedicated and/or client - will share later today)

I've been able to successfully test the concept :cool:

Will work on the details now

Share this post


Link to post
Share on other sites

This is magic! So eventually we should be able to have the script choose the appropriate bdetect framework based on isdedicated?

Share this post


Link to post
Share on other sites

Ok this might be a noob question but when this is perfected, would it be possible to turn this into a ballistic crack sound mod, by this I mean:

At the moment the game engine limits us to a close and a distant soundfile per ammunition type, with this script could it be possible to create a sound mod mod that contained a lot more audio files and plays them at the specified distances from the player

i.e 0m file 1 is played, 10m file 2 and so on?

Share this post


Link to post
Share on other sites
Ok this might be a noob question but when this is perfected, would it be possible to turn this into a ballistic crack sound mod, by this I mean:

At the moment the game engine limits us to a close and a distant soundfile per ammunition type, with this script could it be possible to create a sound mod mod that contained a lot more audio files and plays them at the specified distances from the player

i.e 0m file 1 is played, 10m file 2 and so on?

Hi Bigpickle,

this is a small framework, think of it as a little toolbox, not as an usual mod.

It basically makes possible adding any features based on bullet proximity, given some configuration.

Choosing, scripting and making those features working is up to the user.

I bet what you ask for would be technically possible, but i'm not much into sound editing/scripting.

---------- Post added at 21:10 ---------- Previous post was at 21:06 ----------

This is magic! So eventually we should be able to have the script choose the appropriate bdetect framework based on isdedicated?

I've seen some edited bDetect code by Ollem, looks like just a few changes would be needed.

I saw no trace of CBA_fnc_whereLocalEvent nor CBA_fnc_addLocalEventHandler though, i'd like to get some confirmation from Ollem that those functions are not needed.

If so, v0.69 would be the first version to include some basic MP handling.

Edited by fabrizio_T

Share this post


Link to post
Share on other sites
This is magic! So eventually we should be able to have the script choose the appropriate bdetect framework based on isdedicated?

well... actually most likely one version which should fit all... but making some decision based on which system it is being triggered.

---------- Post added at 06:24 ---------- Previous post was at 06:19 ----------

I've seen some edited bDetect code by Ollem, looks like just a few changes would be needed.

I saw no trace of CBA_fnc_whereLocalEvent nor CBA_fnc_addLocalEventHandler though

If they're not in there I might have sent you the wrong version ... was kind of hectoc weekend so wouldn't be surprised... :-(

Updated version uncomming later today..

Share this post


Link to post
Share on other sites

Just an update.

Looks like our heroic Ollem did solve most MP problems.

New version coming, i hope soon ;)

Edited by fabrizio_T

Share this post


Link to post
Share on other sites

YeeHaw!!

^ Krem I assume you've tested this (and TPWC) with the Battlezone missions? How does it run?

Share this post


Link to post
Share on other sites

Of course I have tested it :) Runs very well most of the time. The new MP version (thanks Ollem!) will get tested this evening :)

Share this post


Link to post
Share on other sites
The new MP version (thanks Ollem!) will get tested this evening :)

I see :)

Didn't know that, i suppose i should hurry up.

---------- Post added at 16:15 ---------- Previous post was at 16:02 ----------

v0.70 undergoing basic testing now.

Share this post


Link to post
Share on other sites

bDetect v0.70 SP/MP released and frontpaged.

Edited by fabrizio_T

Share this post


Link to post
Share on other sites

bDetect v0.72 will be out in a few hours.

Mostly a MP code update, featuring more reliability and less overhead.

Share this post


Link to post
Share on other sites

Excellent work and special thanks for the MP version - so far it works like a charm!!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×