A book companion site by Chris Griffith
RSS icon Email icon Home icon
  • Chapter 9

    Posted on July 26th, 2009 Chris 4 comments

    Chapter 9 deals with using external data, specifically XML, as a source for your game’s content.  We’ll dissect a crossword puzzle game to see how XML provides a flexible, re-usable container for text-based elements.

    Chapter 9 Files

     

    4 responses to “Chapter 9”

    1. Hi Chris,

      I found a typo in chapter 9.

      The end of the XML file on page 134 should be

      <clues>

      and not

      <clue>

      Until now your book is great!
      You should really write more about this subject.

      Ruben

    2. hi can i know which line or section of the codes determines the number of tiles or rather which code determines whether the answer should be cross or down. I tried correcting the XML files, but it seems that the XML file determines only the clue. ); plz help. thank you.

    3. I’m not totally sure I understand the question. The XML determines the dimensions of the puzzle, and any non-underscore character is given a tile. The createPuzzle method is what iterates through the XML and builds all the lists. Can you be more specific?

    4. is there a way rather than clicking on the word to see the hint, can we have all hints published below like a regular word puzzle?

    Leave a reply