Brian Long (www.blong.com)
This demo is an implementation of the classic Digger game (sometimes known
as Boulderdash or Dig Dug).
It was translated to Delphi for .NET by Brian Long (www.blong.com)
from the C# implementation by Lutz Roeder (www.aisto.com/roeder/dotnet).
The graphics and levels are taken from the original version by Alexander Lang
and Jan Fricke.
Changes in the Delphi implementation include:
Digger spans several units and demonstrates a number of useful concepts, including:
The Digger source uses conditional compilation through various conditional defines to cater for some features that are currently not working in the preview version of Delphi for .NET and also to show alternative ways of doing things:
You can build Digger in two different ways, depending on whether you want a simple, straightforward compilation, or something slightly more involved and interesting:
|
The second approach to compiling Digger involves the use of creative
round tripping to link the data files into the executable as managed
resources.
This is an interesting process that involves:
In this particular case, once Digger.exe has been disassembled to the corresponding
Digger.il file, it is reassembled with one additional IL file, DiggerResources.il.
This is a trivial file that refers to each data file in an appropriate manner
to have the assembler link them all as managed resources and looks like
this:
|
Use the BUILD2.BAT batch file at the command line to generate this version
of Digger.exe.
BUILD2.BAT performs the following operations:
|