It is currently 22 May 2025, 21:44
   
Text Size

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

Postby Sloth » 05 Jul 2013, 06:31

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 don't think other viewers/players have to be send the game state after every subability. Only when input is required.

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.
User avatar
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

Postby 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.
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

Postby 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. :D

- 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

Postby Sloth » 05 Jul 2013, 20:57

Max mtg wrote:Do you intend to delay propagation of open information, until the player gets priority?
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:And what about possible match spectators? Like human watching AI vs AI match... they will never receive updates then.
Match spectators can receive an update whenever a player gets priority.
User avatar
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

Postby 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 :D

- 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

Postby 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
Programmer
 
Posts: 3486
Joined: 14 Mar 2011, 05:58
Has thanked: 683 times
Been thanked: 569 times

Re: UI now recieves updates from EventBus

Postby Max mtg » 07 Jul 2013, 19:54

Agetian 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... :(
There was no sound when AI declares blockers in 1.4.2
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

Postby jsv » 08 Jul 2013, 07:43

r22489. Double-faced cards are not redrawn when they transform (tested with Garruk Relentless and Villagers of Estwald)
jsv
 
Posts: 53
Joined: 29 May 2013, 03:20
Has thanked: 3 times
Been thanked: 6 times

Re: UI now recieves updates from EventBus

Postby 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
User avatar
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

Postby 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
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

Postby jsv » 09 Jul 2013, 10:34

friarsol wrote:Another UI redraw issue when undoing/canceling a spell, lands do not untap.
Still an issue in r22519.
jsv
 
Posts: 53
Joined: 29 May 2013, 03:20
Has thanked: 3 times
Been thanked: 6 times

Re: UI now recieves updates from EventBus

Postby Max mtg » 09 Jul 2013, 16:12

jsv wrote:
friarsol wrote:Another UI redraw issue when undoing/canceling a spell, lands do not untap.
Still an issue in r22519.
r22524 - no longer an issue.

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

Postby friarsol » 10 Jul 2013, 02:21

Max mtg wrote:
Agetian 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... :(
There was no sound when AI declares blockers in 1.4.2
Icon redraw granted
Still missing attacker icons being redrawn for AI. (Sometimes its immediate, sometimes it isnt?) And Human Attacker icons not being undrawn when right clicking.

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

Postby 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

Postby Max mtg » 10 Jul 2013, 13:06

Both fixed.
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

Previous

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 24 guests

cron

Who is online

In total there are 24 users online :: 0 registered, 0 hidden and 24 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 24 guests

Login Form