Drawing current player selection highlighter? Like in sports games?
Hi all!
I''m working on a 3d sports game, similar to SpeedBall. I would like to show which member of your team the player is currently in control of, so I would like to draw a ring around the current player.
This screenshot shows an example of what I would like to achieve:
http://www.gamespy.com/asp/image.asp?/reviews/march02/ff/3.jpg
In the top right of the screenshot the current player is surrounded by a purple/pink ring.
How would I go about drawing a ring such as this in OpenGL please?
Thanks a lot for any help/suggestions!
Adam
There are many ways to do this.
You can use a 3D model made with any 3D modeler, simple texturemapped quad or even gluDisk() .
You can use a 3D model made with any 3D modeler, simple texturemapped quad or even gluDisk() .
Thanks for the fast reply!
Which of these would be the easiest to implement? Im guessing gluDisk()?
But I just searched google for info on gluDisk and am I right in finding that it only produces 2d shapes? would I be able to achieve what I want with this? If so how?
Thanks again!
Adam
Which of these would be the easiest to implement? Im guessing gluDisk()?
But I just searched google for info on gluDisk and am I right in finding that it only produces 2d shapes? would I be able to achieve what I want with this? If so how?
Thanks again!
Adam
Since your code obviously already handles placement and drawing of 3d models, adding another one that takes the place of the "circle" should be "easiest".
You need a static model loader, Search for asc, obj, ase loaders. Most apps can export into one of these, or convert to them(crossroads).
Is the game to be played on a flat "field"?...
I think that a 3D model is a bit of overkill in this instance, and you would be much better off decalling a textured quad onto the field under the player. Just use a texture with an alpha channel, and only set full alpha where you want your circle or whatever other shape (everything else can be 0), then simply draw a quad using this texture slightly above the playing field at the player''s position, with alpha testing enabled (and alpha func set to greater than 0).
This method is gonna be a shiteload faster and just as easy (if not easier, coz you don''t have to load a model).
Hope that helps
I think that a 3D model is a bit of overkill in this instance, and you would be much better off decalling a textured quad onto the field under the player. Just use a texture with an alpha channel, and only set full alpha where you want your circle or whatever other shape (everything else can be 0), then simply draw a quad using this texture slightly above the playing field at the player''s position, with alpha testing enabled (and alpha func set to greater than 0).
This method is gonna be a shiteload faster and just as easy (if not easier, coz you don''t have to load a model).
Hope that helps

You could also write a very simple particle engine and have a ring (or orderned cloud) of start circling the active player. Looks better too! I did that once in an OGL version of the kids game "Tag, you''re it!".
- An eye for an eye will make the world go blind -
- An eye for an eye will make the world go blind -
<hr />
Sander Marechal<small>[Lone Wolves][Hearts for GNOME][E-mail][Forum FAQ]</small>
Check out NeHe''s quadratic tutorial, draw a disk around the player with an inner radius close to the outer one. (difficulty = copy and paste and change a couple numbers)
_______________________________________Pixelante Game Studios - Fowl Language
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement