FSDeveloper Community

Go Back   FSDeveloper Community > Microsoft Flight Simulator development > Aircraft Design > Gauges

Gauges Use this forum for all your gauges related discussions

Reply
 
Thread Tools Display Modes
  #41  
Old 21 Mar 2012, 13:27
taguilo taguilo is offline
  argentina
Location: San Isidro-BsAs
Join Date: Oct 2006
Posts: 633
Quote:
Originally Posted by WarpD View Post
Multiply that by around 100 switches, lights and knobs... and it's a really, really bad idea when it comes to multiplayer/shared cockpit.
Ed,
10,100...1000...up to trigger_key_event(iEvent,iValue) is the same code, no extra lines needed. The only part that could become "heavy" is this one:

Code:
const int AC_SWITCH  = 70000;

void FSAPI EventHandler(ID32 event, UINT32 evdata, PVOID userdata)
{
     switch(event)
    {
         case AC_SWITCH:
etc
but that would be the same when using this method and by <EventID> as well.
In any case, the bad idea would be so many switches,lights and knobs and not the code to handle them

Tom
Reply With Quote
  #42  
Old 21 Mar 2012, 16:24
WarpD WarpD is offline
  us-ohio
Join Date: Dec 2007
Posts: 308
Correct me if I'm wrong... but don't Lvars get 'broadcast' during multiplayer mode?
Reply With Quote
  #43  
Old 21 Mar 2012, 16:43
sparouty sparouty is offline
  france
Join Date: May 2008
Posts: 16
Quote:
Originally Posted by WarpD View Post
Correct me if I'm wrong... but don't Lvars get 'broadcast' during multiplayer mode?
Hi,
For what I had tested during my Etendard project, L:vars are not shared between multiplayers but L:vars are shared between shared cockpit players...

Times ago, there was a thread speaking about gauge flooding, and many interesting things were said about that... I didn't find out the link...

I found also this thread that says that Custom Event can be fired with an (>K:XXXXX) call:
[FSXA] Custom EventIDs - Questions!

I didn't have time to try it but I will soon...
Regards,

Sylvain
Reply With Quote
  #44  
Old 21 Mar 2012, 17:34
taguilo taguilo is offline
  argentina
Location: San Isidro-BsAs
Join Date: Oct 2006
Posts: 633
Quote:
Originally Posted by WarpD View Post
Correct me if I'm wrong... but don't Lvars get 'broadcast' during multiplayer mode?
Yes, that's what the SDK says (and I know of your devotion to the SDK )
However, in a C++ gaugeset scenario, only those LVars used within the model would be broadcasted and hypotetically received by nobody, so I can't see a big tradeoff here.


Quote:
Originally Posted by sparouty View Post
I found also this thread that says that Custom Event can be fired with an (>K:XXXXX) call:
[FSXA] Custom EventIDs - Questions!

I didn't have time to try it but I will soon...
Regards,

Sylvain
Unfortunately the evaluations and conclutions in that thread were wrong. See post #15 here where I explain the reasons why it can't work.

Tom
Reply With Quote
  #45  
Old 22 Mar 2012, 01:22
Naruto-kun's Avatar
Naruto-kun Naruto-kun is offline
  southafrica
Join Date: Jun 2010
Posts: 405
Send a message via MSN to Naruto-kun
And with 100+ switches....Thats why we need a alternative to using L vars for Right/Left clicks.
Reply With Quote
  #46  
Old 22 Mar 2012, 02:17
Naruto-kun's Avatar
Naruto-kun Naruto-kun is offline
  southafrica
Join Date: Jun 2010
Posts: 405
Send a message via MSN to Naruto-kun
There is one other option....use unused FSX key events like the G1000 or the GPS key events to trigger custom events.
Reply With Quote
  #47  
Old 22 Mar 2012, 03:18
sparouty sparouty is offline
  france
Join Date: May 2008
Posts: 16
Quote:
Originally Posted by Naruto-kun View Post
And with 100+ switches....Thats why we need a alternative to using L vars for Right/Left clicks.
Hi,
I agree with you it's very frustrating to not being able to use (>K:xxxxx) call with custom event.
But I don't understand why you want left/right click for switch? Most of switch are 2 positions switch for which a single click is needed : a toggle behaviour...so custom event can be easily used.

Last I never noticed any issue with the use of Lvars in a vc whatever the mode used (single, mp, or sc): most of the Etendard vc animations are based on Lvars without any significant loss of fps... To my own point of view, Lvars are shared only in shared cockpit..
R.
Sylvain
Reply With Quote
  #48  
Old 22 Mar 2012, 03:27
Naruto-kun's Avatar
Naruto-kun Naruto-kun is offline
  southafrica
Join Date: Jun 2010
Posts: 405
Send a message via MSN to Naruto-kun
We are talking about knobs and multi position switches here. Thats where the left/right click comes in. And having too many L vars will clog up a shared pit. Thats what we are attempting to prevent here....

Update:

I just thought of a another option. If you are using L vars for the animation of the knob/switch maybe one can send a value outside of the animation range and have it get reset by the key event in the gauge. Unless it makes the knob jump around that is....

Last edited by Naruto-kun; 22 Mar 2012 at 05:02.
Reply With Quote
  #49  
Old 22 Mar 2012, 18:42
n4gix n4gix is offline
  unitedstates
Location: Hammond, Indiana
Join Date: Sep 2006
Posts: 8,556
Quote:
Originally Posted by taguilo View Post
Ed,
10,100...1000...up to trigger_key_event(iEvent,iValue) is the same code, no extra lines needed. The only part that could become "heavy" is this one:
Neither event_handler or the L:vars need be monitored all the time. The only time they would need to be evaluated is when a mouse event of some kind was triggered.

IOW, every mouse action would set a triggered flag, the evaluation would run, custom key_event sent, L:var updated and finally the triggered flag reset.

-OR-

Alternatively, how about multiplexing a couple of unused SET type tokens and their associated variables?
__________________
Bill Leaming
3d Modeler Max/GMax
C & XML Gauge Programmer
Eaglesoft Development Group
http://eaglesoftdg.com

Intel® Core™ i7-3770k 4.2GHz - Crucial 16GB DDR3 - Dual Radeon HD770 1GB DDR5 (Crossfire) - Eco II Watercooling - Win7 64bit
Intel® Core™ i7-2600k 3.4GHz - Crucial 4GB DDR3 - NVIDIA GeForce GTX550Ti 1GB - Win7 64bit
Intel® Core™ i7-860 2.8GHz - Crucial 8GB DDR3 - NVIDIA GeForce GTS240 1GB - Win8 64bit
NOTE: Unless explicitly stated otherwise, everything written by my hand is MY opinion. I do NOT speak for any company, real or imagined...

Last edited by n4gix; 22 Mar 2012 at 18:46.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[FSX] Catching Custom Action Events in C# RalphLear SimConnect 0 09 Jan 2011 10:01
[FSX] Can't catch custom events madevgeny Gauges 0 06 Nov 2010 15:45
[FSX] Sending Custom Events from model animations Misho SimConnect 21 08 Sep 2010 17:07
Making Custom Helipads Heli Traffic 2009 Compatible DanM GMax and 3DS Max 0 25 Feb 2010 19:06
custom sound events Simon853 FS wishlist 0 17 Feb 2008 07:19


All times are GMT -4. The time now is 15:48.

Kirsch designed by Andrew & Austin


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.