User Tools

Site Tools


DMOD Authoring/scripting guide for HD versions

Using get_version to detect HD capable (1.09 DinkC support)

By checking the version you can have HD specific commands only detected when the DinkC support is V1.09 or newer. This lets your DMOD take advantage of new commands while retaining compatible with older clients.

if (get_version() > 108)
//do stuff that only HD versions would understand
int get_client_version()

This gets the version of the dink engine client, which at the time of this writing is HD is currently 1.42 (it will return 142)

In general you shouldn't need to check this, but it could be useful for working around older clients that have known bugs.

int get_platform()

This returns the type of system OS Dink is currently running with a single integer. This lets you adjust the difficulty for iPhone/Android versions or work differently on platforms without mouse support.

Here is what the numbers it returns means:

  • -1 (Platform unknown)
  • 0 Windows
  • 1 iOS (iPhone/iPad/iPhone4)
  • 2 Mac/OSX
  • 3 Linux
  • 4 Android
  • 5 Windows Mobile
  • 6 WebOS
Ogg support

playmidi(string) can now also play .ogg filenames.

When normal .mid files are played, if an .ogg version also exists, it will be played instead. (this applies to using the playmidi command, as well as 1.mid type stuff that gets played because the midi number was set in the editor for the screen)

.xm/.mod/.mp3 formats are technically also supported in the Windows and iOS versions, but not recommended because the Android version can't handle playing those file types.

Unsupported commands / color changes

Dink HD only runs in high-color 32 bit mode. It can handle .bmps with alpha channels.

It ignores the following commands:

  • load_palette
  • load_tile
Platform specific issues
  • The android version's audio system is currently missing pitch changes and sound effect looping (such as for the fire place sound at the start of the game)
  • When picking up items, the android version plays “sword2_item.ogg” instead of a sped up “sword2.wav” because it can't adjust the pitch of the sfx and sounded horrible.
New DinkC limits in HD versions
  • Max sequences is now 1300 (was 1000)
  • Max sprites that can be loaded is now 6000 (was 4000)
  • It does support the redink's new sp_custom stuff (in theory?) and fixes a memory leak it had
  • No longer any limit in the number of “set_sprite_info” commands used (used to be 1000)
dink/hd_author_guide.txt · Last modified: 2010/12/10 00:00 by seth