Kostas Anagnostou Game developer Adjunct Lecturer in Videogame Technologies
Who am I? Freelance game developer Adjunct Lecturer in Videogame Technologies, Ionian University Game Engine programmer at Microsoft Game Studios (Rare, UK)
What is this talk about? Making great games!
What is this talk about? Not really, I don’t have the recipe for that…
What is this talk about? How to  enable  talented and creative people to make great games!
How are great games made? It is a trial-and-error, iterative process. Mechanics and content must be tried and fine tuned in-game
Who creates a great game? Game designers and artists mainly All effort in game development must be focused on making their jobs easier What we call  Power to the Artist !
Data-driven development Decouple game data and logic from game code Let data determine game behaviour/aesthetics  Make data accessible to all
Data-driven development (DDD) Data-driven game development requires more initial work Much easier to hardcode everything! Why should we care?
Benefits of DDD for artists Much easier to add new content Much easier to add new behaviour Faster iteration times Reduces artist dependency on programmer
Benefits of DDD for programmers Tighter, easier to maintain code Flat class hierarchy No artists bugging us!     Scott Shumaker,  Outrage Games
Elements that can be data-driven Level design/content Game object data/behaviour UI/localisation Game configuration
How can data affect game behaviour? Data driven development goes nicely with a Component-based engine architecture Game Entities are just containers Data specify which components/functionality are required Scott Shumaker, Outrage Games
Requirements of DDD Some form of data description Efficient and artist-friendly tools
Levels of Data driven development #define ENEMY_KAMIKAZE_HP 20 void  ApplyEnemyDamage(Enemy* enemy) { if (enemy->Type == ENEMY_KAMIKAZE) { enemy->Shield -= ENEMY_KAMIKAZE_HP; } }
Levels of Data driven development File: EnemyHitPoints.txt ENEMY_KAMIKAZE_HP 20 ENEMY_KILLER_HP 10 ENEMY_BRUTE_HP 2 ENEMY_BOSS2_HP 2 … ..
Levels of Data driven development File: EnemyDefinitions.xml <?xml version=&quot;1.0&quot;?> <enemies> <enemy type=&quot;Warrior&quot; texture=&quot;enemies_sheet.png&quot; shield=&quot;100&quot; speed=&quot;30&quot; weapon=&quot;Laser&quot; explosion=&quot;Muffled&quot;> <frames interval=&quot;0.3&quot;> <frame x=&quot;0&quot; y=&quot;0&quot; w=&quot;32&quot; h=&quot;32&quot;></frame> <frame x=&quot;32&quot; y=&quot;0&quot; w=&quot;32&quot; h=&quot;32&quot; /> </frames> </enemy> <enemy type=&quot;Kamikaze&quot; texture=&quot;enemies_sheet.png&quot; shield=&quot;50&quot; speed=&quot;40&quot; weapon=&quot;&quot; explosion=&quot;Strong&quot;> <frames interval=&quot;0.3&quot;> <frame x=&quot;0&quot; y=&quot;32&quot; w=&quot;32&quot; h=&quot;32&quot; /> <frame x=&quot;32&quot; y=&quot;32&quot; w=&quot;32&quot; h=&quot;32&quot; /> </frames> </enemy> </enemies> JSON is quite trendy too!
Levels of Data driven development
First taste of Data Driven Development At Rare we focused on the content pipeline a lot! Extensive framework built around Maya and the in-house game engine. The artist could fully customize assets in Maya One click asset deployment Enabled iterative development
First taste of Data Driven Development Rare’s solution focused on data/game entity customization No game engine support for components/data driven behaviour Still, artist empowerment was huge!
Space Debris by Rotten Fish Games Space Debris is a retro Space Shoot’em Up Designed for smartphones (iPhone and later Android) 15 multilayered levels in total, tens of enemies, lots of weapon/weapon upgrades, bonuses, animations etc We relied on a data-driven system to set all that up.
Data-Driven system design Game Entity is a container for data/behaviour By default only supports transform/rendering Designer can add weapons, animations, sprite animations, bonuses, upgrades, sound effects, explosions etc externally Game stats are set externally as well
Hierarchical structure of XML files Level.xml spritesheets.xml animations.xml spawners.xml bonuses.xml enemies.xml explosions.xml
Sample XML definitions layout <?xml version=&quot;1.0&quot;?> <stages> <stage  name=&quot;stage1&quot;  spritesheets=&quot;spritesheets.xml&quot;  enemies = &quot;enemies.xml&quot;  spawners = &quot;spawners.xml&quot;  weapons = &quot;weapons.xml&quot;  animations = &quot;animations.xml&quot;  bonuses = &quot;bonuses.xml&quot;  explosions = &quot;explosions.xml&quot; > <levels> <level  name= &quot;s1level1&quot;  file= &quot;tilemap_s1l1.tmx&quot;  music = &quot;STAGE1_LEVEL_1.mp3&quot;> </level> <level  name= &quot;s1level2&quot;  file= &quot;tilemap_s1l2.tmx&quot;  music = &quot;STAGE1_LEVEL_2.mp3&quot;> </level> </levels> </stage> </stages> Enemy definitions Bonus definitions Level tilemap
Sample XML definitions layout <?xml version=&quot;1.0&quot;?> <spawners> <spawner  type=&quot;S1LNKamikazeeHunterChase&quot;  enemytype=&quot;Kamikazee_Hunter&quot;  spawn=&quot;Chase&quot;  animation=“ ZigZag&quot;  number=&quot;6&quot;  rate=&quot;2&quot;  bonus=&quot;Invisibility&quot;> </spawner> </spawners> <?xml version=&quot;1.0&quot;?> <enemies> <enemy type=&quot;Kamikazee_Hunter&quot;> <parts> <part    sprite=&quot;alien_kamikazee_hunter“ shield=&quot;1&quot;  weapon=&quot;EnemyKamikazee1&quot;  explosion=&quot;MediumExplosion&quot;> </part> </parts> </enemy> </enemies> <?xml version=&quot;1.0&quot;?> <spritesheets> <spritesheet name=&quot;spritesheet_normal.png&quot;> <sprite name=&quot;alien_kamikazee_hunter&quot;> <frames interval=&quot;0.3&quot;> <frame x=&quot;432&quot; y=&quot;96&quot; w=&quot;48&quot; h=&quot;48&quot;></frame> <frame x=&quot;0&quot; y=&quot;144&quot; w=&quot;48&quot; h=&quot;48&quot;></frame> </frames> </sprite> </spritesheet> </spritesheets> <?xml version=&quot;1.0&quot;?> <animations> <animation  name=&quot;SPath&quot;  type=&quot;Bezier&quot;  track=&quot;Player&quot;> <parts count=“3&quot;> <part p0=&quot;0  0&quot; p1=&quot;1 0&quot; p2=&quot;1 -0.25&quot; p3=&quot;0  -0.25&quot;  duration=&quot;3&quot;></part>  <part p0=&quot;0  0&quot; p1=&quot;-1  0&quot; p2=&quot;-1 -0.25&quot; p3=&quot;0  -0.25&quot;  duration=&quot;3&quot;></part>  <part p0=&quot;0  0&quot; p1=&quot;1 0&quot; p2=&quot;1 -0.25&quot; p3=&quot;0  -0.25&quot;  duration=&quot;3&quot;></part>  </parts> </animation> </animations>
Sample XML definitions layout <?xml version=&quot;1.0&quot;?> <spawners> <spawner  type=&quot;S1LNKamikazeeHunterChase&quot;  enemytype=&quot;Kamikazee_Hunter&quot;  spawn=&quot;Chase&quot;  animation=“ SPath&quot;  number=&quot;6&quot;  rate=&quot;2&quot;  bonus=&quot;Invisibility&quot;> </spawner> </spawners> <?xml version=&quot;1.0&quot;?> <enemies> <enemy type=&quot;Kamikazee_Hunter&quot;> <parts> <part    sprite=&quot;alien_kamikazee_hunter“ shield=&quot;1&quot;  weapon=&quot;EnemyKamikazee1&quot;  explosion=&quot;MediumExplosion&quot;> </part> </parts> </enemy> </enemies> <?xml version=&quot;1.0&quot;?> <spritesheets> <spritesheet name=&quot;spritesheet_normal.png&quot;> <sprite name=&quot;alien_kamikazee_hunter&quot;> <frames interval=&quot;0.3&quot;> <frame x=&quot;432&quot; y=&quot;96&quot; w=&quot;48&quot; h=&quot;48&quot;></frame> <frame x=&quot;0&quot; y=&quot;144&quot; w=&quot;48&quot; h=&quot;48&quot;></frame> </frames> </sprite> </spritesheet> </spritesheets> <?xml version=&quot;1.0&quot;?> <animations> <animation  name=&quot;SPath&quot;  type=&quot;Bezier&quot;  track=&quot;Player&quot;> <parts count=“3&quot;> <part p0=&quot;0  0&quot; p1=&quot;1 0&quot; p2=&quot;1 -0.25&quot; p3=&quot;0  -0.25&quot;  duration=&quot;3&quot;></part>  <part p0=&quot;0  0&quot; p1=&quot;-1  0&quot; p2=&quot;-1 -0.25&quot; p3=&quot;0  -0.25&quot;  duration=&quot;3&quot;></part>  <part p0=&quot;0  0&quot; p1=&quot;1 0&quot; p2=&quot;1 -0.25&quot; p3=&quot;0  -0.25&quot;  duration=&quot;3&quot;></part>  </parts> </animation> </animations>
Game data specification
Game data specification
Experiences from the DD system Programmer becomes obsolete!   Designer can iterate level design faster Easier for the team to work remotely Cleaner code, almost flat Class hierarchy
A few weaknesses Some initial coding overhead We should have used a visual editor XML files not artist friendly enough Tiled editor was a halfway solution
Let’s wrap it up! DDD can benefit even small teams Content decoupling and iteration are important Some coding overhead, usually acceptable Need good tools to exploit DDD fully Give power to the artist to express herself!
Thank you for listening! Kostas Anagnostou [email_address]

Data Driven Game development

  • 1.
    Kostas Anagnostou Gamedeveloper Adjunct Lecturer in Videogame Technologies
  • 2.
    Who am I?Freelance game developer Adjunct Lecturer in Videogame Technologies, Ionian University Game Engine programmer at Microsoft Game Studios (Rare, UK)
  • 3.
    What is thistalk about? Making great games!
  • 4.
    What is thistalk about? Not really, I don’t have the recipe for that…
  • 5.
    What is thistalk about? How to enable talented and creative people to make great games!
  • 6.
    How are greatgames made? It is a trial-and-error, iterative process. Mechanics and content must be tried and fine tuned in-game
  • 7.
    Who creates agreat game? Game designers and artists mainly All effort in game development must be focused on making their jobs easier What we call Power to the Artist !
  • 8.
    Data-driven development Decouplegame data and logic from game code Let data determine game behaviour/aesthetics Make data accessible to all
  • 9.
    Data-driven development (DDD)Data-driven game development requires more initial work Much easier to hardcode everything! Why should we care?
  • 10.
    Benefits of DDDfor artists Much easier to add new content Much easier to add new behaviour Faster iteration times Reduces artist dependency on programmer
  • 11.
    Benefits of DDDfor programmers Tighter, easier to maintain code Flat class hierarchy No artists bugging us!  Scott Shumaker, Outrage Games
  • 12.
    Elements that canbe data-driven Level design/content Game object data/behaviour UI/localisation Game configuration
  • 13.
    How can dataaffect game behaviour? Data driven development goes nicely with a Component-based engine architecture Game Entities are just containers Data specify which components/functionality are required Scott Shumaker, Outrage Games
  • 14.
    Requirements of DDDSome form of data description Efficient and artist-friendly tools
  • 15.
    Levels of Datadriven development #define ENEMY_KAMIKAZE_HP 20 void ApplyEnemyDamage(Enemy* enemy) { if (enemy->Type == ENEMY_KAMIKAZE) { enemy->Shield -= ENEMY_KAMIKAZE_HP; } }
  • 16.
    Levels of Datadriven development File: EnemyHitPoints.txt ENEMY_KAMIKAZE_HP 20 ENEMY_KILLER_HP 10 ENEMY_BRUTE_HP 2 ENEMY_BOSS2_HP 2 … ..
  • 17.
    Levels of Datadriven development File: EnemyDefinitions.xml <?xml version=&quot;1.0&quot;?> <enemies> <enemy type=&quot;Warrior&quot; texture=&quot;enemies_sheet.png&quot; shield=&quot;100&quot; speed=&quot;30&quot; weapon=&quot;Laser&quot; explosion=&quot;Muffled&quot;> <frames interval=&quot;0.3&quot;> <frame x=&quot;0&quot; y=&quot;0&quot; w=&quot;32&quot; h=&quot;32&quot;></frame> <frame x=&quot;32&quot; y=&quot;0&quot; w=&quot;32&quot; h=&quot;32&quot; /> </frames> </enemy> <enemy type=&quot;Kamikaze&quot; texture=&quot;enemies_sheet.png&quot; shield=&quot;50&quot; speed=&quot;40&quot; weapon=&quot;&quot; explosion=&quot;Strong&quot;> <frames interval=&quot;0.3&quot;> <frame x=&quot;0&quot; y=&quot;32&quot; w=&quot;32&quot; h=&quot;32&quot; /> <frame x=&quot;32&quot; y=&quot;32&quot; w=&quot;32&quot; h=&quot;32&quot; /> </frames> </enemy> </enemies> JSON is quite trendy too!
  • 18.
    Levels of Datadriven development
  • 19.
    First taste ofData Driven Development At Rare we focused on the content pipeline a lot! Extensive framework built around Maya and the in-house game engine. The artist could fully customize assets in Maya One click asset deployment Enabled iterative development
  • 20.
    First taste ofData Driven Development Rare’s solution focused on data/game entity customization No game engine support for components/data driven behaviour Still, artist empowerment was huge!
  • 21.
    Space Debris byRotten Fish Games Space Debris is a retro Space Shoot’em Up Designed for smartphones (iPhone and later Android) 15 multilayered levels in total, tens of enemies, lots of weapon/weapon upgrades, bonuses, animations etc We relied on a data-driven system to set all that up.
  • 22.
    Data-Driven system designGame Entity is a container for data/behaviour By default only supports transform/rendering Designer can add weapons, animations, sprite animations, bonuses, upgrades, sound effects, explosions etc externally Game stats are set externally as well
  • 23.
    Hierarchical structure ofXML files Level.xml spritesheets.xml animations.xml spawners.xml bonuses.xml enemies.xml explosions.xml
  • 24.
    Sample XML definitionslayout <?xml version=&quot;1.0&quot;?> <stages> <stage name=&quot;stage1&quot; spritesheets=&quot;spritesheets.xml&quot; enemies = &quot;enemies.xml&quot; spawners = &quot;spawners.xml&quot; weapons = &quot;weapons.xml&quot; animations = &quot;animations.xml&quot; bonuses = &quot;bonuses.xml&quot; explosions = &quot;explosions.xml&quot; > <levels> <level name= &quot;s1level1&quot; file= &quot;tilemap_s1l1.tmx&quot; music = &quot;STAGE1_LEVEL_1.mp3&quot;> </level> <level name= &quot;s1level2&quot; file= &quot;tilemap_s1l2.tmx&quot; music = &quot;STAGE1_LEVEL_2.mp3&quot;> </level> </levels> </stage> </stages> Enemy definitions Bonus definitions Level tilemap
  • 25.
    Sample XML definitionslayout <?xml version=&quot;1.0&quot;?> <spawners> <spawner type=&quot;S1LNKamikazeeHunterChase&quot; enemytype=&quot;Kamikazee_Hunter&quot; spawn=&quot;Chase&quot; animation=“ ZigZag&quot; number=&quot;6&quot; rate=&quot;2&quot; bonus=&quot;Invisibility&quot;> </spawner> </spawners> <?xml version=&quot;1.0&quot;?> <enemies> <enemy type=&quot;Kamikazee_Hunter&quot;> <parts> <part sprite=&quot;alien_kamikazee_hunter“ shield=&quot;1&quot; weapon=&quot;EnemyKamikazee1&quot; explosion=&quot;MediumExplosion&quot;> </part> </parts> </enemy> </enemies> <?xml version=&quot;1.0&quot;?> <spritesheets> <spritesheet name=&quot;spritesheet_normal.png&quot;> <sprite name=&quot;alien_kamikazee_hunter&quot;> <frames interval=&quot;0.3&quot;> <frame x=&quot;432&quot; y=&quot;96&quot; w=&quot;48&quot; h=&quot;48&quot;></frame> <frame x=&quot;0&quot; y=&quot;144&quot; w=&quot;48&quot; h=&quot;48&quot;></frame> </frames> </sprite> </spritesheet> </spritesheets> <?xml version=&quot;1.0&quot;?> <animations> <animation name=&quot;SPath&quot; type=&quot;Bezier&quot; track=&quot;Player&quot;> <parts count=“3&quot;> <part p0=&quot;0 0&quot; p1=&quot;1 0&quot; p2=&quot;1 -0.25&quot; p3=&quot;0 -0.25&quot; duration=&quot;3&quot;></part> <part p0=&quot;0 0&quot; p1=&quot;-1 0&quot; p2=&quot;-1 -0.25&quot; p3=&quot;0 -0.25&quot; duration=&quot;3&quot;></part> <part p0=&quot;0 0&quot; p1=&quot;1 0&quot; p2=&quot;1 -0.25&quot; p3=&quot;0 -0.25&quot; duration=&quot;3&quot;></part> </parts> </animation> </animations>
  • 26.
    Sample XML definitionslayout <?xml version=&quot;1.0&quot;?> <spawners> <spawner type=&quot;S1LNKamikazeeHunterChase&quot; enemytype=&quot;Kamikazee_Hunter&quot; spawn=&quot;Chase&quot; animation=“ SPath&quot; number=&quot;6&quot; rate=&quot;2&quot; bonus=&quot;Invisibility&quot;> </spawner> </spawners> <?xml version=&quot;1.0&quot;?> <enemies> <enemy type=&quot;Kamikazee_Hunter&quot;> <parts> <part sprite=&quot;alien_kamikazee_hunter“ shield=&quot;1&quot; weapon=&quot;EnemyKamikazee1&quot; explosion=&quot;MediumExplosion&quot;> </part> </parts> </enemy> </enemies> <?xml version=&quot;1.0&quot;?> <spritesheets> <spritesheet name=&quot;spritesheet_normal.png&quot;> <sprite name=&quot;alien_kamikazee_hunter&quot;> <frames interval=&quot;0.3&quot;> <frame x=&quot;432&quot; y=&quot;96&quot; w=&quot;48&quot; h=&quot;48&quot;></frame> <frame x=&quot;0&quot; y=&quot;144&quot; w=&quot;48&quot; h=&quot;48&quot;></frame> </frames> </sprite> </spritesheet> </spritesheets> <?xml version=&quot;1.0&quot;?> <animations> <animation name=&quot;SPath&quot; type=&quot;Bezier&quot; track=&quot;Player&quot;> <parts count=“3&quot;> <part p0=&quot;0 0&quot; p1=&quot;1 0&quot; p2=&quot;1 -0.25&quot; p3=&quot;0 -0.25&quot; duration=&quot;3&quot;></part> <part p0=&quot;0 0&quot; p1=&quot;-1 0&quot; p2=&quot;-1 -0.25&quot; p3=&quot;0 -0.25&quot; duration=&quot;3&quot;></part> <part p0=&quot;0 0&quot; p1=&quot;1 0&quot; p2=&quot;1 -0.25&quot; p3=&quot;0 -0.25&quot; duration=&quot;3&quot;></part> </parts> </animation> </animations>
  • 27.
  • 28.
  • 29.
    Experiences from theDD system Programmer becomes obsolete!  Designer can iterate level design faster Easier for the team to work remotely Cleaner code, almost flat Class hierarchy
  • 30.
    A few weaknessesSome initial coding overhead We should have used a visual editor XML files not artist friendly enough Tiled editor was a halfway solution
  • 31.
    Let’s wrap itup! DDD can benefit even small teams Content decoupling and iteration are important Some coding overhead, usually acceptable Need good tools to exploit DDD fully Give power to the artist to express herself!
  • 32.
    Thank you forlistening! Kostas Anagnostou [email_address]