Game Development Community

Target/Selection rings

by Richard Preziosi · in Torque Game Engine · 10/01/2010 (6:52 pm) · 8 replies

Looking for some advice on this, if anyone has any experience/ideas.

So I was coming upon the need in my project for a way to identify which player/ai is selected by the player. So target rings come to mind, you know the little circle at the target's feet to signify that it is your current target.

I immediately thought of the RTS kit and ArcaneFX, two problems though, the one in the RTS kit does not go on interiors from what I have reasearched, and ArcaneFX is not necessarily a mergeable component from what I have researched.

I found info on GLUdisks, however I have read that they do not conform to the terrain, and often look hackish when they appear to be cutting into the ground.

So my two best ideas are currently:

1. Copy the shadow.cc and shadow.h and "rewrite" them as a selection ring, not sure how well or if this could even work.

2. Add an extra node to each model to attatch a particle effect to. I'm not sure if particle effects can be set to an indefinite time though, or how much overhead this could cause.

If anyone has any ideas/criticisms on this, or has accomplished a target ring and would like to explain their method, it would be greatly appreciated.

#1
10/03/2010 (3:07 am)
So the shadow idea is out, it possibly could work, but would require too much modification for a simple feature. The best idea is still using particle effects to create a ring at the feet of the player.

Still trying to figure out how to only create particles for a certain player, or create client side particles, just not clicking at the moment.
#2
10/04/2010 (1:37 am)
Does the targetting ring need to be at the player's feet? If not, you could have an object (like a 2d billboarded arrow) constantly offset above the target's position?

You can enable and disable individual particle emitters. To see how to set up particles at a player's feet you could look at the footprint / footpuff code? I personally wouldn't go the particle route however.
#3
10/04/2010 (2:52 am)
How about decal projection?
#4
10/04/2010 (3:52 pm)
@Morrow
Why would you not go that route? If due to it causing overhead, do you think it would be much of an issue still with current computers?

@Michael
I didn't even think of that, and it honestly seems like the best method.
#5
10/05/2010 (3:36 am)
Because particle emitting just seems like it would look bad. It would spawn particles on a player (I'm assuming their feet?) which would stay relatively in the same spot and fall through the ground (or float with gravity disabled). It would look a lot like foot puffs or splash effects, just while being targetted.

The decal projection is the standard way of doing it, and I believe it's similar to how ArcaneFX handles it (though I do not own it and do not know). Just I know Torque can have some problems with dynamically moving decals.
#6
10/05/2010 (9:14 am)
You can make particles non-dimensional. Or at least I believe you can, I may be dellusional though.
#7
10/07/2010 (7:12 pm)
(Note: I don't own AFX, so what I'm saying is based purely off what I've seen/read)

Arcane FX does use something similar to its Zodiacs to do selection/feedback rings. (They call them Selectroncs) And from what I gather, Zodiacs are a decal that is rendered on the terrain. Because its a decal they can get a lot more pretty than just a colored gludisk, and they conform to the terrain and work on interiors.

The only quirk with that system I've noticed came while I watched a demo in action of a build that included the AFX (though I can't say for certain if this was default behavior or a change the programmers incorporated): but the 'selectrons' conformed to the terrain perfectly, even when say climbing steps into a hovel in orc town, so the targeting circle essentially conformed to the staircase, which was a little odd in my opinion.
#8
10/07/2010 (10:46 pm)
Meredith, that is stock behavior, and not really a problem with AFX implementation. That could be solved easily, by what I would consider proper dif/dts modeling. Using invisible wedges for the player to walk on instead of the actual stairs themselves. But that is just my opinion because I don't tend to like bouncing up the stairs and occassionally getting stuck. If my method is used then the selectron should conform to the invisible wedge instead of the stairs.