Actually theses are not really frequently asked questions, it's more like answers to questions noone ever asked but still need to be answered to complete this website...


Nala is short for Nalathni, which is a "small but intelligent dragon" with a beautiful image on a promo Magic card released at Dragon Con in 1994, and also the name of a role-playing character of mine. Since some people found it difficult to pronounce, it became Nala.

64K in Delphi?

An empty Delphi application doing nothing is about 300K (depending on the Delphi version). For those of you who wonder how to make a 64K intro or 96K game in Delphi I try to give you a starting point here.

Don't use the VCL at all. Remove Controls, Forms and Dialogs from the uses clauses of all of your units and also from the dpr file. Your project won't have a main form, you have to create the window using WinAPI calls and provide your own message loop.

Also remove the Graphics unit. You probably have to generate all of your graphics dynamically anyway, rendering them to some buffer (maybe a DirectX surface). If you wonder how complex textures can be generated dynamically, have a look at Perlin noise.

Using the Windows unit is fine. The Delphi smart linker will automatically make sure no unused functions are linked into the exe file. The less functions you are using, the better. Actually the same is true for other units, but the smart linker cannot optimize all units as good as the Windows unit. That's because a lot of units have an initialization section creating things you usually require in a "normal" Delphi project. But for sure you don't want them to be part of your 64K project. Unfortunately since the initialization section is always executed if the unit is present, the linker cannot remove certain things. You have to do this job by excluding the complete unit.

In case you only require a small routine from some unit, it might be a good idea to rewrite this little code snippet or use copy & paste to put it into your own unit (for IOI I'm using my own Classes.pas containing just TList with a few optimizations like reduced exception handling).

If you want to use DirectX, you probably already have the Delphi translation of the DirectX header files. That's alright, but you cannot make use of Delphi helper DLLs like D3DX8ab.dll. Such DLLs are containing some stuff originally provided by Microsoft as lib files, which normally are simply linked directly into C++ projects. Everything you need from such a DLL has to be rewritten by yourself. Things like matrix transformation functions can easily be found on the web, so it's no big deal but can be a laborious task.

Use an exe packer. I really like UPX, but for such tiny executables version 2 actually works better than version 3. Even better compression is possible with UPack by Dwing (that's the packer I've used for IOI), however it seems to have more problems with virus scanners. There are a lot more exe packers around (like kkrunchy), but not all of them can be used for your Delphi project.