Cheapest way to show hit damage text?

0 favourites
  • 5 posts
From the Asset Store
Change delay, create new lines, "backspace" the text
  • Hi constructers,

    I'm very new here and I'm making a prototype of action RPG.

    Now I want to display a HP damage text when player hit or get hit enemies. very typical example is Final Fantasy.

    I wonder whats the cheapist way at performance wise? my first idea is to spawn a text object shows the damage amount, move upwards then destroy it?

  • That's how I will do it too, not sure about the cheapness though...

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Optimisation: don't waste your time.

    Instead of destroying the text object you can consider to set it invisible and reuse it later to display other datas.

    Anyway, C2 recycle objects for us, so it doesn't even really matter in the end.

    As long as your computer can make it run, consider that it's good and working and that your current machine can be used as "least required hardware the game will execute properly on".

  • Make a text object named DamageDisplay. I would give it a fade behavior with about 2.5 seconds of fade out time, also set it to destroy after fade. THEN.

    Make a new event such as

    • Bullet collides with Enemy (or whatever is your attack)
    • > Create new DamageDisplay at Enemy.X Enemy.Y-20
    • > Set Text to DamageDealt
    • > Wait 2 seconds
    • > DamageDisplay start fade
  • Thanks:D

    I have tried either way, seems the text is pretty cheap anyway is it doesn't matter set visiblity or creat/destory. It really depends on what effect you want achieve. Fade behavior is also cool!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)