by date
New Reticle HUD resource / FGE Update
New Reticle HUD resource / FGE Update
| Name: | Martin Schultz | ![]() |
|---|---|---|
| Date Posted: | Nov 03, 2007 | |
| Rating: | 4.7 out of 5 | |
| Public: | YES | |
| Comments: | YES | |
| RSS Feed: | or Subscribe with . | |
| Profile Page: | View profile page for Martin Schultz |
Blog post
New GUI Reticle HUD for TGE(A)
A few weeks back I stepped out of the Panzer Ace development team and after a little pause I started working again on my game Subsonic. For that game and the homing missiles inside the game I needed a reticle HUD display thingie to cycle through all available targets in the view frustrum, select a target and fire a missile on it. I took the famous guiShapeNameHUD control and modified it until I got a nice reticle hud working. It has today the following features:
- Implemented as gui control
- Drawing a solid rectangle or only corner-stlye rectangle around every shape in the view frustrum
- Colors for normal/highlighted shape can be freely chosen
- Minimum size for the rectangle can be defined for shapes far away (to have a min. size bounding box around)
- Cycling through all targets using the mouse wheel via script
- Turning on/off the reticle HUD
- Ability to have it only for selected weapons
- Resolving the client ghost id on the server to a valid player id (via this resource) to have a homing missile be able to track the target
See a screenshot here:

A short 10 MB video shows the target cycling in action.
A big help was Ben Garney (although not knowing :) with his explanations in this thread about bounding box rendering and alike. Very helpful stuff, Ben, thanks!
As I got asked to release this as a resource I do so now and please find here the whole reticle hud as free resource here:
Gui Reticle HUD for TGE(A) With Target Cycling
(Update: Resource is approved and available!)
Note: The forward/backward selection code is a bit "unoptimized" yet and not working always super flawlessly, but I will improve this soon and post an update to the resource.
Flight Game Example Update to version 1.4
Along with this new control I also updated the FGE to the 1.4 version including the above resource so that the homing missiles in the FGE work now with the reticle target selection. All existing customers find the new version now in the FGE owner's page as 68 MByte download.
Have fun with this one! :-)
Martin
A few weeks back I stepped out of the Panzer Ace development team and after a little pause I started working again on my game Subsonic. For that game and the homing missiles inside the game I needed a reticle HUD display thingie to cycle through all available targets in the view frustrum, select a target and fire a missile on it. I took the famous guiShapeNameHUD control and modified it until I got a nice reticle hud working. It has today the following features:
- Implemented as gui control
- Drawing a solid rectangle or only corner-stlye rectangle around every shape in the view frustrum
- Colors for normal/highlighted shape can be freely chosen
- Minimum size for the rectangle can be defined for shapes far away (to have a min. size bounding box around)
- Cycling through all targets using the mouse wheel via script
- Turning on/off the reticle HUD
- Ability to have it only for selected weapons
- Resolving the client ghost id on the server to a valid player id (via this resource) to have a homing missile be able to track the target
See a screenshot here:

A short 10 MB video shows the target cycling in action.
A big help was Ben Garney (although not knowing :) with his explanations in this thread about bounding box rendering and alike. Very helpful stuff, Ben, thanks!
As I got asked to release this as a resource I do so now and please find here the whole reticle hud as free resource here:
Gui Reticle HUD for TGE(A) With Target Cycling
(Update: Resource is approved and available!)
Note: The forward/backward selection code is a bit "unoptimized" yet and not working always super flawlessly, but I will improve this soon and post an update to the resource.
Flight Game Example Update to version 1.4
Along with this new control I also updated the FGE to the 1.4 version including the above resource so that the homing missiles in the FGE work now with the reticle target selection. All existing customers find the new version now in the FGE owner's page as 68 MByte download.
Have fun with this one! :-)
Martin
Recent Blog Posts
| List: | 05/23/08 - 20% discount for Flight Game Example (limited time) 03/27/08 - Development Diary: Balls of Steel 03/05/08 - New Game Out - Have fun playing! 02/03/08 - Meeting Thomas and Magnus in Copenhagen (and in sweden) 12/10/07 - FGE 20% Christmas Discount 11/03/07 - New Reticle HUD resource / FGE Update 10/09/07 - Flight Game Example - post mortem 06/21/07 - Flight Game Example for TGE(A) - OUT NOW! |
|---|
Submit your own resources!| Andy Hawkins (Nov 04, 2007 at 00:09 GMT) |
What I want to know more about is the resource you mentioned above...
Quote:
- Resolving the client ghost id on the server to a valid player id (via this resource) to have a homing missile be able to track the target
More specifically should I (and everyone else) be concerned with this in my code. I don't know why I should be concerned with ghost entities. Do they occur as a bug in TGE?
| John Kanalakis (Nov 04, 2007 at 03:51 GMT) |
John K.
| Martin Schultz (Nov 04, 2007 at 10:24 GMT) |
@Andy: No no, you shouldn't be concerned. It's not a bug. It is just that the selected shape in the reticle hud has a different player id than the server has because the shapes are ghosted to the client. So if the client then cycles through all available targets and "picks" one of them as target, sends that (ghosted) id to the server. Then the server needs to "translate" back the id the client knows about back to the id the server knows about so that both talk about the same target. That's the magic behind the mentioned resource. You could pass in a ghosted (client-side) player id and get out the server player id. The server id is then needed for the homing missile to track its target.
@John: Hehe, thanks, have fun playing with it. :-)
| Cyberkada (Nov 04, 2007 at 10:40 GMT) Resource Rating: 5 |
| Martin Schultz (Nov 04, 2007 at 14:38 GMT) |
| J.P. Berry (Nov 05, 2007 at 16:59 GMT) |
| Martin Schultz (Nov 05, 2007 at 17:03 GMT) |
| Cyberkada (Apr 18, 2008 at 06:46 GMT) Resource Rating: 5 |
A screenshot is here:

Edited on Apr 18, 2008 06:56 GMT
You must be a member and be logged in to either append comments or rate this resource.



4.7 out of 5


