Advertisement

Drawing current player selection highlighter? Like in sports games?

Started by May 15, 2002 05:49 AM
8 comments, last by WoolyUK 22 years, 9 months ago
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() .
Advertisement
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
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".

Im loading MD2 models, dont know how to load anything else
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).
Advertisement
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
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 -

<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
Please blit a sprite under the current player (yes, even a fancy, animating sprite) and be done with it. We (sports game fans) would like you to spend the processing time on gameplay features instead.

This topic is closed to new replies.

Advertisement