Making A Score Bug

A series of tutorial videos showing creation of an animated score bug for basketball.
A Score Bug for Basketball : Preparing the Visuals

Preparing the Visuals

The first part of the scorebug series shows the preparation of the graphics using CW’s layer creation tools.

A Score Bug for Basketball : Animating the game period displays

Animating the game period displays

This section discusses how the animated period displays are made, dealing with the basics of keyframe animation and the timeline in CW.

A Score Bug for Basketball : Game Time

Game Time

Scorebugs can be created using the Down Counter element in CW, and this video shows show.

(As an alternative, CW 2.5 introduces Timer cells for Key-Value Data Sources which are far more powerful and flexible).

A Score Bug for Basketball : Driving The Score Using Expressions

Driving The Score Using Expressions

This part demonstrates using expressions for dynamic real-time modification of Key-Value Data Source cells

A Score Bug for Basketball : Advanced Animation using Behaviours

Advanced Animation using Behaviours

The last part examines advanced Behaviour setups on Data Sources for driving animations and expressions.

A Score Bug for Basketball : StatCrew Integration in CharacterWorks

StatCrew Integration in CharacterWorks

Practical CharacterWorks StatCrew setups for attractive presentations

Sample XQuery Codes for StatCrew SoftWare

Match Global infos

for $gmatch in //bbgame/venue
for $gmatchrule in //bbgame/venue/rules
let $referees := tokenize((data($gmatch/officials/@text)), ‘,’)
return <datarow>
{
for $att in $gmatch/@*
return element{data(name($att))} {data($att)}
}
{
for $att in $gmatchrule/@*
return element{data(name($att))} {data($att)}

}
<offical1>{data($referees[1])} </offical1>
<offical2>{data($referees[2])} </offical2>
<offical3>{data($referees[3])} </offical3>
<notes>{data($gmatch/notes/note/@text)} </notes>

</datarow>

Players

let $players :=”V”
for $mplayer in //bbgame/team[@vh=$players]/player
return <datarow>
{
for $att in $mplayer/@*
return element{data(name($att))} {data($att)}
}
</datarow>

Players on Court

let $team := ‘V’

for $mplayer in //bbgame/team[@vh=$team]/player[@oncourt = ‘Y’]
return <datarow>
{
for $att in $mplayer/@*
return element{data(name($att))} {data($att)}
}
<firstname>{substring-after($mplayer/@name, ‘, ‘)}</firstname>
<lastname>{substring-before($mplayer/@name, ‘,’)}</lastname>
</datarow>

Players and Stats

let $period := ‘1’
let $playerno := ’02’
let $team := ‘H’

for $gtotals in //bbgame/team[@vh=$team]/player[@uni=$playerno]
return <datarow>
{
for $att in $gtotals/statsbyprd[@prd=$period]/@*
return element{data(name($att))} {data($att)}
}
<firstname>{substring-after($gtotals/@name, ‘, ‘)}</firstname>
<lastname>{substring-before($gtotals/@name, ‘,’)}</lastname>
</datarow>

Specials

Specials (H – home V – visitors)

let $specials :=”V”
for $gtotalspecial in //bbgame/team/totals/special[@vh=$specials]
return <datarow>
{
for $att in $gtotalspecial/@*
return element{data(name($att))} {data($att)}
}
</datarow>

Team Stats

let $team :=”H”
let $period :=”1″
for $gtotalstatsbyprd in //bbgame/team[@vh=$team]/totals/statsbyprd[@prd=$period]
return <datarow>
{
for $att in $gtotalstatsbyprd/@*
return element{data(name($att))} {data($att)}
}
</datarow>

Scores

let $team :=”V”
for $result in //bbgame/team[@vh=$team]/linescore/lineprd
return <datarow>
<period>{data($result/@prd)}</period>
<score>{data($result/@score)}</score>
</datarow>

Sample Score Bugs

Leave a Reply

Your email address will not be published. Required fields are marked *

Post comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.