• 0.960062646828504

    posted a message on [Solved] Attributes as a substitute for custom values? Would this cause more or less lag?

    You could also unit charges (trigger action AddChargeForUnit). They're like custom values except they use a string key instead of an integer index.

     

    Pros

    * You can have more than 32 kinds

     

    Cons

    * Only positive values can be used, so you'd have to store SomeAttributePositive and SomeAttributeNegative and sum them

    Posted in: Data
  • 0.961218836565097

    posted a message on Pirated Assets

    Figured some of my recent developments may be useful for others to use in their mods or for learning purposes. Most of these assets are the product of research for my latest (side) project, Resistor(), to further my own data skills.

    Better Floating Combat Text

    Dependency Mod.  This mod provides an action to create beautiful customizable floating combat text inspired by Heroes of the Storm. Includes options for directions (left, right, middle, random, vertical) and font styles (basic, ability, healing, status, and crit variants).

    Easy Unit Status Bars

    Demo Map. This function constructs and returns a customizable status bar as a dialog item. Contains variation for each race, options to show/hide energy, and to add a behavior duration timer (stimpack is shown in the gif). Note that in order to use these status bars you must copy both the function (CreateStatusBarForUnit) and the UI layout (PiratedStatusFrameTemplate).

    Global Backstab Vulnerability

    Demo Map. A backstab vulnerability behavior that increases all damage a unit takes by 50% if the attacker is behind the target. Note that the behavior is given to the target unit. Useful for games with a global backstab mechanic.

    Defendable Neutral Bunkers

    Demo Map. These neutral bunkers can be commandeered by any unit. Empty bunkers revert back to their neutral capturable state. Reducing the bunker to 20% life forces out any occupants and prevent use until the damage is repaired.

    To Do
    • Effect Debug Tools
    Posted in: Data Assets
  • 1.32756436110385

    posted a message on Better Combat Text with PiratedFloatingText

    This is the public release of PiratedFloatingText which you can download here or from my assets page.

     

    This mod uses layouts to create smooth animated combat text similar to the combat text found in Heroes of the Storm. Style and directionality options are included for customization. Text styles included as follows: Basic, Basic Crit, Ability, Ability Crit, Healing, Healing Crit, and Status. Crit variants have slightly longer airtime and include a highlighting icon (except for Healing Crit).

     

    Left (Basic)

     

    Middle (Ability Crit)

     

     

    Right (Healing Crit)


    Vertical (Status)

     

     

    Random (Healing)

     

     

    I hope you find this useful. The layouts are relatively easy to customize for you own purposes.

     

    Typical Usage Case

    Posted in: UI Development
  • 0.958333333333333

    posted a message on 2D Game Lib

    2D Game Lib v0.8

    Embed Removed: https://www.youtube.com/v/_Mk28lArak8?fs=1

    What?

    The 2D game lib is a basic framework for creating 2D platformer type games in StarCraft 2 which makes gratuitous use translate kinetics (a new data type added in 3.0). With some modifications, the game lib could be used to for any games with a WASD / 8 directional movement controls or even just games with basic 2D physics (tetris, angry birds, flappy bird, canabalt, etc).

    How?

    The X and Y velocity of each unit is stored as a custom value. Every game tick, the velocity for each unit is applied via a combination of translate kinetics. Since a maximum of 4100 kinetics can be applied at once, kinetic data is broken into digits (X 1.0, 2.0, 3.0, etc / 0.1, 0.2, 0.3, etc / 0.01 , 0.02, 0.03) and direction (+X for right, -X for left, +Y for up, -Y for down). Because these kinetics have a duration of 0.0625, there is no stacking of applied kinetics across game ticks, allowing units to be moved accurately. Kinetic application occurs in the "Translate Unit Horizontally" and "Translate Unit Vertically" function (inside the Translate Unit function that's run for each active unit in the "Each Game Tick" trigger).

    The attached library's "Each Game Tick trigger" runs a host other functions to simulate 2D platformer physics, such as applying friction or air resistance based on unit state, basic collision, speculative contact, and applying gravity.

    You can modify game data such as hero move speed, jump height, restitution (bounciness) or game data data such as gravity strength, friction, and air resistance in the Global Record Variables.

    Known Issues / Caveats

    • Maximum horizontal and vertical unit velocity is 9.99 map units per game tick (0.0625 seconds). This could be increased by adding more kinetic data, but does anything really need to move that fast?
    • Top right / left corners of units may unrealistically clip through bottom corners of static collision units due to the position of the top side collision test. This will be fixed in the next version by using multiple top side collision tests.
    • Storing unit data (move speed, jump height, etc) in records is less than ideal. A better solution will be implemented.
    • Fast moving units may clip through 0.5 x 0.5 sized static collision units. I generally advise against using them (but had to create the pipe in Super Sonya Bros 1-1)

    Next Up

    • Support for slopes! This will allow for Sonic-like levels
    • Further Optimization. Please let me know if any code screams "optimize me". Current candidate areas include kinetic application and speculative contact functions (speculative contact is the most resource intensive operation by far).
    • Requested Features. Leave a request in this thread and I'll give it a shot.

    Special Thanks

    • To ArcaneDurandel/ArcanePariah for an introductory exploration of kinetic data, and for designing a kinetic wizard so I didn't have to write all 108 kinetic / apply / remove / remove all effects by hand.
    • Various 2D platformer game dev tutorials and stack exchange threads. Particularly this one.

    https://mega.nz/#!KBxwTITB!aBqWPFFLpHhgcI4uScKMyLeQgGbIup_PWXBt88dlvy4

    Posted in: Project Workplace
  • To post a comment, please or register a new account.