How to please designers and free up programmers by wuxiangyu


									  Enabling Data Driven
Tuning Via Existing Tools

     Jeremy Chatelaine
      Argonaut Games PLC
           GDC 2003
• Me
  – Jeremy Chatelaine, programmer:
       •   Argonaut Games PLC (X-Box project)
       •   Lionhead Studios (Black&White)
       •   …
       •   Personals projects
A few words

• Many forms of data, focus on game
  data from designers input

• Why is this talk important?

• Data driven concept
Data Driven - Concept
Code Driven       Data Driven
Overview Of Presentation
• Advantages/disadvantages of common
  ways to gather game data

• Exporting more along with data

• Some software to help us in our quest

• Conclusion and Q&A
Producing game data
• 3 common ways to gather game data:

  – Proprietary tools (e.g. MFC, Delphi…)

  – In-game editor

  – Existing tools (Excel, notepad? )
 Proprietary tools - Advantages
• Full control

• Fulfil needs

• Released to

                    Morrowind Editor
Proprietary tools - Disadvantages
• Time Issues:
   – Learning MFC?
   – Design, Code, Debug, Test
   – Keep up to date with the game
   – Schedule likely to slip
• User issues:
   – Rarely user-friendly
   – Learning, documentation?
   – High latency between request and implementation
   – Unstable version…
   – Rework or re-export if tool change?
• Other issues:
   – Useful for other projects?
In-Game editor - Advantages
• Real time effect

• Full control

• Fulfil needs

• Easy to maintain for programmers
In-Game editor - Disadvantages
 • Time issues:
    – Extra work on UI: sliders, combo box…
 • User issues:
    – Rarely user-friendly
    – Poor refresh rate / CPU expense (same PC)
    – Loading game…
    – Broken versions, crashes
    – How long before a new/stable version?
 • Other issues:
    – Memory on console
    – Save/Load & Import/Export confusion
Existing tools - Advantages
• User-friendly

• Fast to develop

• Easier to maintain
Existing tools - Disadvantages
 • Time issues:
    – Learning (Macro/Plug-in)
    – New version may lead to a change in

 • User issues:
    – How to use it

 • Other issues:
    – Price!
    – Licence
    – Less control
    – Rarely match your needs
Gathering data - Conclusion

• Try to gain advantages:
  – Network communication (fast feedback)
  – Reload on the fly
  – Automation/Visual Basic for proprietary tools

• Do consider Time AND User issues

• Designers are not engineers
Our goal is simple
  • Minimize Time issues
    – Save programming time
    – Decentralize programmer power
    – Accelerating data exposure

  • Maximize User-friendly
    – Need nice UI and facilities
    – More flexibility and control
    – Keep designers happy

  • Avoid complexity!
  First example:
  Designer to Programmer scheme
• Designers enter Data
  for each object

• Programmers query
  the values through a

• Programmers use
  the data in game

> Used for graphic and
  sound data…
    Second example:
    Programmer to Designer scheme
•   Programmers “write
    structures in Excel”

•   Excel macro exports
    source code plus a
    description file for the
    designer tool

•   Designers enter data for

•   Programmers have
    nothing to code!

•   Programmers uses the
Excel class definition for programmers
Designer tool
Some helpful techniques

 • offsetof() and sizeof()
    – Produce binary data

 • #define and #include
    – Enums and strings of enums
    – Class factory
Generating more than data - Advantages

  • Self-maintainable code

  • Self-contained system

  • Full control

  • Saving time for programmers

  • Accelerating exposure of new data
Generating more than data - Disadvantages

    • Still need to design code!

    • System based on a base class

    • More files generated

    • Need to be recompiled

    • Sync Code
Exporting data & code - Conclusion

•   Advantages stronger than disadvantages
•   Easy to set up, no complexity
•   Once it’s in place, you are done
•   More confident in constantly doing changes

• Many ways to implement/improve
    – Default values in file, exposed to designers
    – Using binary files for release version
    – Using Access instead of Excel
Considering a few tools
• Excel, Access, Visio
  – Visual Basic Macro and Automation

• Macromedia Flash

• Other things?
MS Excel
• Easy to get into, start and run
  - Familiar with .csv (comma delimited)

• Simple macro (Visual Basic)

• Share possible but too limited

We use it as a user-friendly “interface” to generate
 XML files.
MS Access
• Share of data between the team (simultaneous

• Slightly more complicated than excel.

• User-friendly facilities with forms (quick and easy)

• Permission security for altering the database

• Variables are already types
Also contains the possibility to export to Excel
MS Visio
•   Ideal for flowcharts
•   Harder to get in
•   Harder to get data
•   May be used for:
    –   Skill/technology tree in RPG or RTS
    –   Economic pattern in management games
    –   State machine for AI?
    –   Story line for single player?

We are using it for screens organisation and
 template code + data.
Visio – Facts in our current project

• Around 100 screens to manage

• ~1 Week for a fully scalable system

• Adopted by other projects of the company

• Still room for improvement though
  – XML as data entry of each screen?
  – Sharing problem
  – Slow Macros (Visual Basic > call DLL?)
Macromedia Flash
• Perfect for:
   – Position, scale, transparency, rotation…
• Problem finding proper documentation on the
• Not ideal for a dynamic number of items to
• NO SHARING. One person per flash file.

We used it to design Front End graphic/Text position.
Future tools to look at?
• XDocs:
  –   Deals with XML format
  –   Sharing facilities?
  –   Automation, Visual Basic script?
  –   Expected for middle of 2003
Future investigations
• 3D Packages of artists
   – Export 3D Data…
   – Export other things?

• Exporting Stats in html?
   – Picture of Texture, name, path, size…
   – Poly count
   – Number of bones, frames…
   – Exporter version, export time
Future investigations
• Scripting Language
  – Runtime data entry technique (avoid recompile)

• More time to set-up than simple macros

• Slower than real time access

• How useful is a scripting language for non
• Can be applied to most tools.

• Easy AND powerful (self-maintainable)

• Reusable (self-contained)

• Enables parallel work

• Fast feedback to designer requests

• Compiler checks errors
• Scott Bilas (GDC 2002)
   – “A Data-Driven Game Object System”

• Rob Fermier (GDC 2002)
  – “Creating a Data Driven Engine: Case
    Study: The Age Of Mythology”

• Alex Duran (GDC 2003)
  – “Building Object Systems”

To top