Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

[Announce] Combat Text

Discussion in 'Assets and Asset Store' started by fholm, Jul 24, 2012.

  1. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052

    Short Intro
    This asset will let you add dynamic text to your game, to create things like the now famous "Scrolling Combat Text" from World of Warcraft or display damage numbers around an enemy when you hit them.

    Long Intro
    This asset has been in the making for a while, it's been 95% complete and idle on my disk for about two months. I decided to push for the last part over the past day, and it's ready for release. In essence it's a bitmap font engine, which you can design fancy animations to if you so please. There are two distinct parts of the engine, one is for displaying static text - for things like in-world text, name-plates, etc. The other part is for display dynamic text that is displayed either in the UI or in the world as a response to something happening, the dynamic text can be animated, scaled, moved around, etc.

    Availability Price
    http://u3d.as/content/fholm/combat-text/3a4

    Webplayer Demo
    A webplayer demo is available right here https://dl.dropbox.com/u/19877504/BattleTextDemo/WebPlayer/WebPlayer.html, this is also the demo that ships with the asset package. Explanation of the effects you can see in the demo:

    • Switching between nameplates, nameplates can be made to look at the camera or not
    • Trigger a notice/announce with a "Finish It!", "Execute!", etc. text
    • Trigger damage text which hovers around a character, can be toggled to follow the character or not
    • Trigger two "scrolling combat text" arcs on the left and right side of the screen
    • Trigger a damage/heal "plume" that is animated in the world above the viking walking back and forth

    Video Preview
    This is a video preview I did a while back while still working on the asset, so it's not feature complete but a good demonstration nonetheless.

     
    Last edited: Jul 24, 2012
  2. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
  3. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
  4. EarthLaunch

    EarthLaunch

    Joined:
    Mar 7, 2012
    Posts:
    62
    Nice. Using the BattleTextSource component:

    http://firstearthgame.com/screensho...-Screenshot-AdamTest3_2012-07-31_05:44:02.jpg

    - My choice of coloring here causes weird aliasing, I'll fix that.
    - The position of the text lags behind noticeably (and rather smoothly) when I move the camera (using mouselook). Is there a smoothing that I can disable? This is the only real issue I'm having.
    - A small convenience would be a "no animation" animation option. I made one myself by creating an animation that does nothing for 600k seconds.

    Thanks!
     
  5. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    1) Ok on the aliasing (this should not happen though, what type of interpolation are you using on your font texture?)
    2) Make sure the texts are rotated after the camera is re-positioned, you can do this by modifying the script execution order.
    3) If you need a static text, use just a BattleTextRenderer, it's explained in detail in the documentation how to build nameplates which are not animated (maybe I've miss-understood you?)
     
  6. EarthLaunch

    EarthLaunch

    Joined:
    Mar 7, 2012
    Posts:
    62
    1. On the font, I'm just using the Diavlo prefab that was included.
    2. Will try, thanks.
    3. It lacked some functionality I needed, but looking now I may have set it up incorrectly. I'll try again.

    I'll update later tonight.
     
  7. diablo

    diablo

    Joined:
    Jan 3, 2011
    Posts:
    736
    damn fholm... how on earth you have time to do all this is beyond me! good stuff! :D

    .
     
  8. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,749
    yeah, damn fholm... you're either single or your girlfriend is a nerd :p
     
  9. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Married with one kid :)
     
  10. EarthLaunch

    EarthLaunch

    Joined:
    Mar 7, 2012
    Posts:
    62
    On the above:

    2. Thanks, script execution order was the solution.
    3. With BattleTextRenderer, when I use "Look at Main Camera", then moving the camera side to side makes the text move choppily. Without Look at Main Camera, Lock X Rotation doesn't work, which I want. With BattleTextSource these work exactly the way I want.

    Of note: The "NamePlate" GameObject has have the "CombatText" layer when using BattleTextSource, but not when using BattleTextRenderer, a little confusing.
     
  11. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Good!


    Hm, the text should not be choppy if you have the execution order correct (after the camera moves) for the BattleTextRenderer objects also. I can look into why Lock X doesnt work without Look at camera.

    Not entirely true, you can use whichever layer you want, it depends on how you want them rendered ("in the world" or "in the UI")
     
  12. EarthLaunch

    EarthLaunch

    Joined:
    Mar 7, 2012
    Posts:
    62
    Still working on my understanding of it. Aha, you were right, I hadn't added Renderer objects to the execution order also. That solved it. Thanks for reiterating that, and the support. It's doing exactly what I want now, and with BattleTextRenderer.

    (For what it's worth, I'm using this with your controller, slightly modified. Altogether it's a great solution.)
     
  13. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Good that it fixed it :)

    Very Cool, thank for your kind words :)
     
  14. outtoplay

    outtoplay

    Joined:
    Apr 29, 2009
    Posts:
    741
    Was looking to do simple 'dialogue bubbles' over characters in a 2d game. Classic 2d text bubble with a character saying a line at various times during gameplay, then disappear till the next event. Would this system be overkill?

    thanks,
    B.
     
  15. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    While it can be used for displaying longer texts, etc. there is no multi-line support, so that might be a no for you due to that. Also, if it's overkill or not I don't know, you can use it for a whole bunch of other things too :)
     
  16. EarthLaunch

    EarthLaunch

    Joined:
    Mar 7, 2012
    Posts:
    62
    Is there a way to display BattleTextRenderer in screen space? I need it to stay the same size at any distance. (When it's tracking an object; world coords translated to screen coords. BattleTextSource works this way with a Transform source.)
     
  17. iceisfun

    iceisfun

    Joined:
    Jan 31, 2009
    Posts:
    1
    I just purchased this and I'm getting a null reference exception on BattleTextRenderer.cs:86 ... renderer and filter are both null

    Just for fun I added the following right above 86 and it said the components already existed, and calling GetComponent on them after the AddComponent error returned a object however the text still did not show up.

    gameObject.AddComponent<MeshFilter>();
    gameObject.AddComponent<MeshRenderer>();

    filter = GetComponent<MeshFilter>();
    renderer = GetComponent<MeshRenderer>();
     
  18. hesa2020

    hesa2020

    Joined:
    Jul 27, 2011
    Posts:
    261
    World of warcraft are using UI not 3D object !
     
  19. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Please be more clueless.