Skip To Content

Athabasca University

7.1. Using Datafiles to Store Game Resources

Learning Objectives

When you have finished section 7.1, you should be able to:

  1. Describe Allegro datafiles, including their structures, utility tools, and methods.
  2. Create and use Allegro datafiles.
  3. Test Allegro datafiles.
  4. Enhance the Tank War game using Allegro datafiles.

Required Tasks

  1. Study Chapter 18, Using Datafiles to Store Game Resources, in the eTextbook.
  2. Study the structure of the Allegro datafile, utility tools, and methods for manipulating Allegro datafiles both inside and outside of game programs.
  3. Study the TestDat program carefully for how to read bitmaps from an Allegro datafile.
  4. Go through the steps on pages 643-655, on how to enhance the Tank War game using Allegro datafiles.
  5. Complete the Chapter 18 quiz, and check your answers in Appendix A.

Files (tankwar_r8, TestDat)

Optional Tasks

  1. Reload the Tank War game enhanced in Unit 5 into your IDE, and further enhance the game by following the instructions given on pages 643-655 to modify the code.
  2. Build the project and run the game.

Updated May 24 2016 by FST Course Production