Send message from widget -> unsynced gadget
Moderator: Moderators
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Send message from widget -> unsynced gadget
How do I do this? I only know how to send this via synced gadget but it is currently undesirable to do it that way.
Re: Send message from widget -> unsynced gadget
See this: http://springrts.com/phpbb/viewtopic.php?f=23&t=28347
Yeah.. I feel it's not possible, can you explain the use case?
Yeah.. I feel it's not possible, can you explain the use case?
Re: Send message from widget -> unsynced gadget
Clearly I'm not directly familiar with Spring Lua, but couldn't you have some kind of "event handler" or "listener loop" in the gadget that responds to a something the widget does? Like maybe you have some kind of table that the widget puts messages in and the gadget checks to see if there are messages in that table?
Re: Send message from widget -> unsynced gadget
noSinbadEV wrote:..
it's best if you consider gadget and widget as two separate programs that communicate through the engine
Re: Send message from widget -> unsynced gadget
please stop making posts where you make assumptions and generally just bullshit about how it might work sinbad, it only helps to confuse the issue.
Google: messages are only recieved in sync but you can put the value in _G and check on gameframe. What are you trying to do?
p.S. it is a work week so I may be slow to reply
Google: messages are only recieved in sync but you can put the value in _G and check on gameframe. What are you trying to do?
p.S. it is a work week so I may be slow to reply
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: Send message from widget -> unsynced gadget
There are a few cases of varying importance.
Currently widgets ask my metal spot system to send them the list of metal spots. This means metal spots are not accessible for replays because the synced message is not received during replays.
I have gadgets which draw graphics and some of the graphics is toggleable. Widgets send messages to toggle graphics. To me this system sounds more reasonable than constantly sending data from the gadget.
Most recently I have a terraform texturing gadget which has to be a gadget to match the terrain texture update with UHM updates. The texture application part could be widget side but that sounds expensive.
I wouldn't have a problem if unsynced gadget -> widget communication was cheap. Currently I don't know if it is expensive or not but I usually assume communication is expensive.
(I'm ignoring SinbadEV unless he proposes how to do that)
Currently widgets ask my metal spot system to send them the list of metal spots. This means metal spots are not accessible for replays because the synced message is not received during replays.
I have gadgets which draw graphics and some of the graphics is toggleable. Widgets send messages to toggle graphics. To me this system sounds more reasonable than constantly sending data from the gadget.
Most recently I have a terraform texturing gadget which has to be a gadget to match the terrain texture update with UHM updates. The texture application part could be widget side but that sounds expensive.
I wouldn't have a problem if unsynced gadget -> widget communication was cheap. Currently I don't know if it is expensive or not but I usually assume communication is expensive.
(I'm ignoring SinbadEV unless he proposes how to do that)
Re: Send message from widget -> unsynced gadget
GameRules!?!Google_Frog wrote:Currently widgets ask my metal spot system to send them the list of metal spots. This means metal spots are not accessible for replays because the synced message is not received during replays.
Re: Send message from widget -> unsynced gadget
I had not heard of or seen this before, can you give more details?Google_Frog wrote:There are a few cases of varying importance.
Currently widgets ask my metal spot system to send them the list of metal spots. This means metal spots are not accessible for replays because the synced message is not received during replays.
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: Send message from widget -> unsynced gadget
GameRules sounds useful for some things but can it send tables? It only solves the cases where widgets ask gadgets for information. The case where a widget sends some sort of graphics config to unsynced gadget is unsolved.
@smoth http://springrts.com/phpbb/viewtopic.ph ... 7&start=40
@smoth http://springrts.com/phpbb/viewtopic.ph ... 7&start=40