F_Damage

by Flick
[Share] [Zip]
To download this library for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://Flick.F_Damage##version=4

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:

byond://Flick.F_Damage##version=4

1112 downloads
Version 1.1.0
Date added: Aug 6 2006
Last updated: Jun 18 2011
12 fans
Displays damage taken above a player or enemies head. [More]
Displays damage taken above a player or enemies head. Text font may be customised with a different icon, and text colour may be customised between calls dynamically. Unlike s_damage, this library can display a large range of numbers, including numbers in scientific notation.


Version 1.0.0:

Notably, icons are cached as required. This means that on a test machine, regular calls to F_Damage to display the same color text go from taking ~20 ms every time, to ~4 ms on average, with times no worse than before. This means compared to the initial release of F_Damage in 2006, performance has been improved for all library users.


Version 1.0.1:

Added two define options:

F_damage_assume_world_size - If set, will simplify icon size calculations.

F_damage_sleep - If set, will sleep(1) in F_Damage, to help long calling procedures to progress.

The first provides a performance improvement if you don't need F_Damage to center perfectly on big icons enemies. The second helps cover you for cases where F_Damage is executed in long procedures, and users may see a delay in flicking the damage numbers.

Version 1.1.0:

Adds a define option:

F_damage_no_scientific - Turns off scientific (1E+40) notation.

Removes two define options from 1.0.1, as their performance difference is negligible. This can be added back if performance regressions occur.

Adds a new option:

Horizontal alignment - Text can be left, center, or right aligned with an optional argument. Pleas see the library for specifics. F_Damage_Horizontal_Alignment can be extended for custom alignment rules.

Advertisement

Comments

Neo Rapes Everything: (Oct 31 2011, 8:39 am)
Darkchrispee wrote:
SUCK

I think you meant to write "I SUCK", don't you?

Nice library, I just noticed there was an Updated. The alignment implementation is really an useful tool, no more annoying numbers appearing randomnly.
Darkchrispee: (Oct 22 2011, 1:46 pm)
SUCK
Jmurph: (Jul 8 2011, 12:45 pm)
I just made a quick iso test map and tried it. The problem is that the numbers are stored in a standard icon (I think) and so they get a bit off in iso mode.
Stephen001: (Jul 7 2011, 5:58 am)
I have to say I've never checked it with an isometric map mode. Have you got the demo uploaded somewhere?
Jmurph: (Jun 23 2011, 7:25 am)
Just tried F_Damage with an isometric test game and it seems to be displaying oddly. It seems to place the damage number far off the actual target.