Saturday, 23 October 2010

TSD started, avoiding work for a Split Second

Another little progress update but first a diversion. Yesterday I took some time-off to brush up on gaming skills and really enjoyed Disney Interactive's "Split Second", one of the few car games I keep going back to since I typically find racing games tedious (lack of skill and patience on my part). However this game is almost pure adrenaline and I find my self coming back to try and shave off 2 seconds while avoiding exploding aircraft and collapsing control towers. Split Second is actually the perfect arcade car game IMO and probably much overlooked in a busy genre. It screams for a post race replay option though.

Enough digression. Not much to show yet as I've only spent an hour or two on it this morning, I hadn't put in the VR cockpit data for the TSD buttons so went and put that data in. Had some color issues down to a mix of LE and OpenGL and sorted out the MPD scale for rendering the currently loaded nav map image.

TSD stands for Tactical Situation Display

It is the most complicated system in the helicopter. Which I will strip down to the bone for the first release otherwise I'll be at it for months. The TSD presents a 'Gods eye' view of your helicopter and your environment. Downloaded target information, friendly unit sightings, route navigation and more is presented here. It is a moving map system that can be frozen, panned and scaled.

I need to slim it down into something manageable. Also there are many functions that are desirable to use in the command HQ tent planner and also other helos in future.

Our TSD will feature

  • Fire zones (aka PFZs, old school but everyone will want them)
  • Route editing
  • Threat, target and hazard objects
  • Nav and Attack mode (PHASE)
  • Freeze, panning, zoom
  • Crewman cursor acquisition, click on map and point will be made virtual in the helmet display.

So there's a few things to do but also shared with the ground planning system on the HQ tent computer.

For the base map, it's using the TTerrain() object on the loaded terrain entity (I needed to cast it to get access to the height and normal map data otherwise it's considered a TEntity). A shader converts the normal map into an intensity multiplier ( float intensity = dot( normal , lightdir ) ) for the colourmap, multiply the diffuse and intensity and voila you get a shaded relief map just like the one in the Leadwerks editor (except I don't need the realtime light position and colour that the editor uses).

To this I'll add a colour lookup table from the heightmap and possible some contour lines. I've not used an "lut" function (look up table) in a shader yet so it will be a fun little exercise. Contour lines could be done by setting output colour if the heightmap value is a multiple of 10 (meters) or whatever value I pass to the shader. This just colours the pixel if the value is in that multiple, steep terrain might bypass that value so results will be a bit patchy depending on the source data. I'll look into a proper contour function.

Keep in mind the heightmap in terrain doesn't have a flipped y axis.

* edit *

Elevation bands added to map shader, can be turned on/off. Should be easy to throw in current altitude and have all points above in red. Probably tone down the shading a bit. Need to add masking to my MPD curvedbox function.

* update 2*

Need to clean up the vector font a bit to make it more crisp (tidy work), looks fine on a laptop screen though. I added the backfill to the MPD drawing functions, added a basic waypoint display and most of the buttons I'm going to use except for the scale selection (top right).

This is the NAV mode (toggle between NAV and Combat mode using the PHASE button).

Buttons on right are: CTR, FRZ, CAQ
These are CTR=CENTRE to toggle map centering, otherwise it rotates around your aircraft in the bottom 3rd.
FRZ to hold the map position update so you can pan (when I add that).
CAQ to take the next "MPD ACTION" input and set that as a Pilot or CPG marker the crew can use to say where to go or visualise a situation. The point will be displayed in the HMD virtually.

Buttons at the bottom are: PHASE, BAM, MAP, RTE and POINT

PHASE cycles the TSD modes
BAM is for input of PFZs/NFZs
MAP is for changing of map types (user maps and contour/elevation modes)
RTE is route selection (editing, waypoints since we only support one route)
POINT to allow crewmembers to insert/edit symbols into the nav system (control points, hazards)

A function to send aircraft nav data to other flights and HQ will be provided.


  1. Looks great! I'm glad to see the PFZ's will be included and the elevation shader is a must.

    Will we be able to share our PFZ's with a Human/AI in another LB?

  2. PFZ's now there is something I have not heard of for many years. Brings back some good old memories.

  3. The vehicle messaging system makes it simple to send data like PFZs to each other. They were meant for high-intensity combat, massed armor engagements and such not something that's used today outside of training I expect.

    I'm told there's a BAM (Battle Area Management) sub-page next to the PHASE button (I'll update a screenshot later as there's a lot more on it now).

    But BAM is where you can draw and divide the PFZ/NFZs.

    This is going to be interesting as until now, I've never needed to use a mouse on these displays. They have a crew operated cursor which I was going to make as a 'virtual' cursor controller (up down left right inputs from whatever) and not an absolute input device.

    I tried that once and gave up as I couldn't at the time work out the mapping from screen-space to the MFD surface, not accurately anyway. If I could figure that out I'll drop in a MFD/Mouse mode toggle. Problem is, it's actually really hard to fly and use a mouse anyway.

    I can maintain a lovely stable hover but it requires a lot of concentration on my part.

  4. Looking forward to the BAM info.
    Regarding the PFZ's, if my memory serves me right, I had to use the mouse in LB2 to create my PFZ's.

  5. You're correct Tim, LB2 used the mouse. I'll have another go at it, not that I tried very hard.

    Ah now I remember, there was a cockpit geometry issue, it was the MFD bezel bounding box partially blocking surface picking with the mouse. I couldn't think of a quick and easy workaround. Also the polys for each MPD are seemed to be arranged differently so there wasn't a consistent way of converting that way.

    The other problem was that the function to return the surface co-ordinates didn't seem to work. Oh it's a laugh a second. There must be a way of doing it easily.