draw error - final score

Game development with Board Game Arena Studio
Post Reply
User avatar
garcia1968
Posts: 24
Joined: 03 April 2013, 16:03

draw error - final score

Post by garcia1968 »

I'm getting this draw error(no formal red bar error at top,etc) on the final score where it's showing parts of my pieces from somewhere overlaid on the score window.

Ideas on how to fix?

Image
User avatar
Een
Posts: 3861
Joined: 16 June 2010, 19:52

Re: draw error - final score

Post by Een »

It looks like some problem with z-indexing.
You should make sure to use only z-indexes < 1000 so as not to have your game elements display above dialog boxes. I think it shoud do the trick.
User avatar
garcia1968
Posts: 24
Joined: 03 April 2013, 16:03

Re: draw error - final score

Post by garcia1968 »

I'm familiar with z-indexing, and that could be part of it - I searched my files for 'z-index' but didn't find where it was referenced in the .css file or elsewhere.

Where is the client code to post the final score box?
User avatar
garcia1968
Posts: 24
Joined: 03 April 2013, 16:03

Re: draw error - final score

Post by garcia1968 »

Also I was noticing that if ending the game with a tie score, this final window declares one of the players a winner anyway instead of a tie - so not sure how to influence/correct this window after issuing an 'endGame' state for either the 'draw error' or 'tie displayed as win' error.

Thanks
User avatar
Een
Posts: 3861
Joined: 16 June 2010, 19:52

Re: draw error - final score

Post by Een »

Yes, it doesn't look like you use z-index. Strange ;)

The code for the popup is in the compressed javascript of the framework.
It looks like this:

Code: Select all

var scoreDlg = new dijit.Dialog({
                title: dojo.string.substitute( __('lang_mainsite', 'End of game, ${winner} wins'), { winner: scores[0].name } )
            });

            var html = [...]
  
            scoreDlg.attr("content", html );
            scoreDlg.show();
Another possibility would be that you reused in your game some generic css class. I suggest that you look at the structure of the html inside the box with the inspection features of firebug or chrome dev tools, then check if there is some css overlap in your code.

As for the 'tie' message, it has been fixed on the main site, but the studio has not yet been upgraded: you don't need to do anything about it, this is a feature of the framework.
User avatar
garcia1968
Posts: 24
Joined: 03 April 2013, 16:03

Re: draw error - final score

Post by garcia1968 »

>Another possibility would be that you reused in your game some generic css class.

That was it! Thanks for the hint. I used 'score' to represent my score marker in the css and renamed it 'scoreMarker' to avoid the conflict.
Post Reply

Return to “Developers”