HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: target region highlighting for ability use  (Read 1497 times)

Maldris

  • General Accounts
  • *
  • Posts: 49
    • View Profile
target region highlighting for ability use
« on: Nov 25, 14, 07:02:36 AM »

Ive been working on the new ability system for my project and after allot of planning and much more blundering and testing and fixing we have a basic system that more or less works.

The question I have is more to do with presentation of this system.

Often in games when laying down a targeted ability, its effective range is represented by a highlighted region of the terrain. I want to hear other peoples thoughts on ways to implement this behaviour as the approach that immediately comes to mind for me, has several flaws.

The approach I think of immediately is to use a model much as the clean engine system does when targeting, create the model with an animated UV that appears under the targets feet. The problem with this approach is that even when correcting for a sloped surface, it does not allow for anything other than a flat terrain. If the ground slopes up within the region, the model appears below the surface, if it slopes down it appears to partially hang in mid air.

Alternative solutions I have thought of tend to revolve around using particle effects and their collision events, a less than optimal solution for performance as well as appearance reasons.

I was wondering what other solutions people have come up with to solve this issue within their own titles and if they are willing to share their insight.

Thanks and regards,
Maldris
Logged

HE-Cooper

  • *****
  • Posts: 2221
    • View Profile
Re: target region highlighting for ability use
« Reply #1 on: Nov 25, 14, 02:06:40 PM »

Easiest solution is simply to use a sphere. On the other hand, by the time you're ready to ship a beta of your project, let's say minimum 24 months, it's likely the engine will support projected textures, but I don't like committing to any feature set.

So further options:
1. Sphere/cylinder with scrolling texture.
2. Particle emitter mesh sphere.
3. Stack of rising flat circular particles.
Logged

Maldris

  • General Accounts
  • *
  • Posts: 49
    • View Profile
Re: target region highlighting for ability use
« Reply #2 on: Nov 26, 14, 12:29:59 AM »

Im going to give some of those a go and do some testing, thanks for the feedback.

Two other ideas I came up with earlier today that I am not as confidant about their functionality I thought I would run past you.

Using the decal system to draw the icon
Im assuming this will function similarly to the flat disk model? and also has the downside of not being easy to move, necessitating repeatedly destroying and recreating decals to show it in a new spot.

Dynamic or kinetic physics on a model
This one I'm really not sure if it will work as I haven't played with this physics modes much if at all. Would it be possible to have a model of the targeting model and rig it, with the hope that the dynamic physics will let the bones be pulled down and drape the model across the ground to an extent (I'm aware this could look hokey as the model is repeatedly dropped and draped, was just a thought) though I'm not sure if this kind of functionality is supported, I assume not as it would run a similar issue to the cloth simulation, which was removed for obvious performance reasons.

Thanks again for your help.
Logged

HE-Cooper

  • *****
  • Posts: 2221
    • View Profile
Re: target region highlighting for ability use
« Reply #3 on: Nov 26, 14, 08:19:37 AM »

I'm going to say that those two ideas would generally be considered in all game development in all engines as "not a good idea" :-).
Logged

Maldris

  • General Accounts
  • *
  • Posts: 49
    • View Profile
Re: target region highlighting for ability use
« Reply #4 on: Nov 26, 14, 03:44:02 PM »

that was my assumption, figured it didn't hurt to check, thanks for your help Cooper.
Logged

Maldris

  • General Accounts
  • *
  • Posts: 49
    • View Profile
Re: target region highlighting for ability use
« Reply #5 on: Dec 07, 14, 05:53:34 AM »

Sorry to interrupt again.

I got a particle based system planned out, however the thought occurred to me to take another look at the HJ ref world, when I did I noticed the lineCircleMechanics input system which uses stencils to achieve what I was trying to with coloured regions instead of textures.
I've been playing with it a little and its quite nice. As such I had a few questions relating to it;

Is there a reason these external functions appear to have no documentation at all? with some experimentation and looking at the HJ example I think I've figured it out now, but some official documentation would still be appreciated for reference.

Due to it not being documented and some of the other matters surrounding it, I just wanted to check that it is not something that only draws on the heroblade and not on the player client.

and lastly, while I've been using it, setStencilShape() works well for creating and moving the stencil, my presumption was that stopStencilShape() would remove it, this doesn't appear to be the case as far as I have seen (more testing is intended for tomorrow, this could just be me) so I wanted to check what the intended functionality of that function was.
Logged

Maldris

  • General Accounts
  • *
  • Posts: 49
    • View Profile
Re: target region highlighting for ability use
« Reply #6 on: Dec 07, 14, 06:07:07 AM »

please disregard the previous comment about stopStencilShape(), I found a logic error that prevented it executing.
Logged