Time for action - creating a dungeon adventure game
Here, we're going to look at a small adventure game based on the
world00.xml file we created earlier in the chapter. The goal is to illustrate how we need to handle different tags and a larger, branching XML structure with event-driven processing. You should also notice that we need to create our own structural classes to maintain a representation of our world in memory, rather than allowing the XML system to do that for us.
- Create a new file and name it
- This is a rather long example, so we'll not provide the entire listing here. We're using the
sax_explore.pyfile from the Packt Publishing code bundle. Save it to your current directory or enter it into your text editor.
- Start up ...