UI now recieves updates from EventBus
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: UI now recieves updates from EventBus
by Sloth » 05 Jul 2013, 06:31
I don't think other viewers/players have to be send the game state after every subability. Only when input is required.Max mtg wrote:Imagine we have remote observers, or even fully-involved into game players. The current way it works requires server to send client updated state of all cards every time player gets priority... and even more often - as soon as any subability is resolved.
I'm not an expert on network communication, but sending lots of small pakages of data doesn't sound necessarily so much better than sending one big package.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: UI now recieves updates from EventBus
by Max mtg » 05 Jul 2013, 15:54
Do you intend to delay propagation of open information, until the player gets priority?
And what about possible match spectators? Like human watching AI vs AI match... they will never receive updates then.
I don't want to update any cards that were not changed. But with these abilities cleared and re-applied every often, I have no means to filter out only the changed cards whose stats before clear and after re-apply are different.
And what about possible match spectators? Like human watching AI vs AI match... they will never receive updates then.
I don't want to update any cards that were not changed. But with these abilities cleared and re-applied every often, I have no means to filter out only the changed cards whose stats before clear and after re-apply are different.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: UI now recieves updates from EventBus
by Agetian » 05 Jul 2013, 16:01
As of r22431, the situation with combat icons and sounds seems better but not quite completely resolved - not sure if it has to be resolved by now or not, but I thought I'd report my observations anyway: it seems like the blocker icon now appears when the AI blocks (at least most of the time?), but the appropriate sound doesn't fire, and when the human player declares the attack, the attacker icon still doesn't appear immediately. If it wasn't supposed to be fixed yet but the latest changes, feel free to ignore this message. 
- Agetian

- Agetian
- Agetian
- Programmer
- Posts: 3486
- Joined: 14 Mar 2011, 05:58
- Has thanked: 683 times
- Been thanked: 569 times
Re: UI now recieves updates from EventBus
by Sloth » 05 Jul 2013, 20:57
Yes. That's pretty much how it has been. When the AI plays a land, suspends a card and then casts a spell you see the results all at once.Max mtg wrote:Do you intend to delay propagation of open information, until the player gets priority?
Match spectators can receive an update whenever a player gets priority.Max mtg wrote:And what about possible match spectators? Like human watching AI vs AI match... they will never receive updates then.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: UI now recieves updates from EventBus
by Agetian » 07 Jul 2013, 16:46
As of r22480, when the AI declares blockers the icon is still not drawn immediately and the "blocker declared" sound does not fire either despite the changes in r22477/r22478...
P.S. Have looked at my IDE setup and it's definitely currently set to use spaces instead of tabs - the ones in SoundSystem must have been remnants of the old messed up config
Now that reminded me I have to set NetBeans on my laptop properly though 
- Agetian

P.S. Have looked at my IDE setup and it's definitely currently set to use spaces instead of tabs - the ones in SoundSystem must have been remnants of the old messed up config


- Agetian
- Agetian
- Programmer
- Posts: 3486
- Joined: 14 Mar 2011, 05:58
- Has thanked: 683 times
- Been thanked: 569 times
Re: UI now recieves updates from EventBus
by Agetian » 07 Jul 2013, 19:40
r22483: Blocker icons now appear correctly when the AI declares blockers but the related sound doesn't fire.
- Agetian
- Agetian
- Agetian
- Programmer
- Posts: 3486
- Joined: 14 Mar 2011, 05:58
- Has thanked: 683 times
- Been thanked: 569 times
Re: UI now recieves updates from EventBus
by Max mtg » 07 Jul 2013, 19:54
There was no sound when AI declares blockers in 1.4.2Agetian wrote:As of r22480, when the AI declares blockers the icon is still not drawn immediately and the "blocker declared" sound does not fire either despite the changes in r22477/r22478...![]()
Icon redraw granted
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: UI now recieves updates from EventBus
by jsv » 08 Jul 2013, 07:43
r22489. Double-faced cards are not redrawn when they transform (tested with Garruk Relentless and Villagers of Estwald)
Re: UI now recieves updates from EventBus
by moomarc » 08 Jul 2013, 12:11
r22499: Morph creatures don't redraw when turned face up. Likewise, casting Backslide on a morph creature doesn't redraw the creature facedown.
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: UI now recieves updates from EventBus
by Max mtg » 08 Jul 2013, 12:58
These both problems have a similiar nature - I'll fix all transformations with a single commit (as I reach my computer at home)
Done - r22505
Done - r22505
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: UI now recieves updates from EventBus
by jsv » 09 Jul 2013, 10:34
Still an issue in r22519.friarsol wrote:Another UI redraw issue when undoing/canceling a spell, lands do not untap.
Re: UI now recieves updates from EventBus
by Max mtg » 09 Jul 2013, 16:12
r22524 - no longer an issue.jsv wrote:Still an issue in r22519.friarsol wrote:Another UI redraw issue when undoing/canceling a spell, lands do not untap.
It was somewhat dumb to redraw the whole player's battlefield because only a small number of cards should really have been updated. But I'll leave it for now - might return to this subject later when the project is closer to play over network.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: UI now recieves updates from EventBus
by friarsol » 10 Jul 2013, 02:21
Still missing attacker icons being redrawn for AI. (Sometimes its immediate, sometimes it isnt?) And Human Attacker icons not being undrawn when right clicking.Max mtg wrote:There was no sound when AI declares blockers in 1.4.2Agetian wrote:As of r22480, when the AI declares blockers the icon is still not drawn immediately and the "blocker declared" sound does not fire either despite the changes in r22477/r22478...![]()
Icon redraw granted
Edit: Oh Attacker redraw issue is only for creatures with Vigilance I think.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: UI now recieves updates from EventBus
by swordshine » 10 Jul 2013, 11:37
Assigned damage on card doesn't redraw at the end of turn.
- swordshine
- Posts: 682
- Joined: 11 Jul 2010, 02:37
- Has thanked: 116 times
- Been thanked: 87 times
Re: UI now recieves updates from EventBus
by Max mtg » 10 Jul 2013, 13:06
Both fixed.
Is there anything else remaining?
Is there anything else remaining?
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
30 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 15 guests