Jump to content

Flexman

Members
  • Posts

    916
  • Joined

  • Last visited

Blog Entries posted by Flexman

  1. Flexman
    [NTS] Left Upper button. Next To Shoot is the ubiquitous video game cycle through targets. Or TAB target if you play MMOs.
     
    I've touched upon how radar works in this blog entry from August - Radar - A Discussion
     
    The Apache can automatically selecting priority targets based on some sort of criteria. This short blog post touches on how I've elected to do this. Again if you're familiar with the 1996 classic, Janes Longbow 2 there's nothing unfamiliar here.
     
    The TSD (tactical situation display) collects data from visual cues (look at object), radar and TADS (again look at and store). A linked-list of 3D entities is stored and sorted by range. The list is re-sorted by what type of object it is.
     
     



    Target object sorting as follows:
     

    Fast Movers
    Helicopters
    Air Defence with Radar
    Air Defence
    Armour
    Wheeled
    Aircraft normally only show up in air targeting modes. The image above has one on the GTM Radar which is a BUG but that helicopter (another Apache) is on the ground.
     
    Then these are sorted by range.
     
    The [Cycle Target] key (default: TAB) steps through the list. This is different to the [Padlock Cycle] key (default: LCTRL F4) which applies to your head view and steps outward through visual targets sorted by range only. Sometimes the nearest isn't closest to the centre of view.
     
    I'll touch on how I've programmed the game internally. A linked list of objects that are picked up in the FCR footprint are added to a TSDcontact list if the entity pointer (an entity is a vehicle) is not already present.
     
     
    The game maintains separate lists from sensors and a Tactical(Situation Display) list which is used for referencing entities on the TSD. It also allows for messages received by the THelicopter message handler to add entities to the TSD when the player presses the 'ABCC download' button to download shared targets from a shared digital battlespace (fancy name for a simple array). To upload your TSD list you press the 'ABCC upload' function. I will think about expanding this to work on several channels in later versions.
     
    Tactical Sensor Lists
     
    The TSD used in our Apache vehicle is simply an instance of the TacticalSensor class which is used for all AI but the inputs are wired up differently.
     
     



    These inputs are updated when in use, typically triggered by a player pushing keys. I've colour coded the inpus accoring to type. FCR is radar type area scan, high volume, Orange (HMD) is using the Mk1 eyeball, TADS in blue is an optical sensor (longer range eyeball) and Red is known data from external source, which you can imagine as a radio or some data modem.
     
    As potentially there might be a hundred active AI vehicles in close proximity having all of these using all kinds of sensors, doing lots of volume searches and entity queries is woefully inefficient. Fortunately the natural hierarchical structure of unit can be simply used to make things much more efficient.
     
    Since entities are grouped into Formations which share waypoints and mission targets, they share a common awareness. The same TacticalSensor class we use in our Apache. Only this time the inputs come from the different entities in the formation. Some will have an active sensor system, some are unable to supply input.
     
     



    They periodically perform a sensor scan (interleaved to spread the load) to refresh their group TacticalSensor list.
     
     
    Oh NO! The MIG! Target Priority
     
    I'm sorting the linked list when updated based on criteria that I want based on experience from other games of this type. Worked for them, works for me.
     
    In LB2 a Mig was triggered at random if flying over 250 ft. If not spotted quickly it was almost certain virtual death. To give these a high priority I added a Priority field to the SensorClass and arranged the icon IDs (1,2,3,4 etc) so by default the Priority value can be taken from the icon ID then modified later. Now the most dangerous entities can be simply sorted on this field but we could for example assign an entity as a "Primary Target" and add +10 to the Priority to have it automatically sit at the top of the TAB target list.
     
    Very handy for scripting tutorials and the like. For example we can now spawn a virtual waypoint marker on a target range and command the avionics to give top priority.
     
    So whatever the first entry on the linked list is, that's the NTS object, the second in the list would be the ANTS.
     
     
    PFZs
     
    Another often asked about feature in Combat-Helo is the ability to create PFZs. Which is something that only applies to the Hellfire missile system which is coming in a later update as we've not yet implemented it. However our Tactical list makes this a trivial matter to implement. We have a static list of entities, mouse input on the TSD map and mouse driven events. Everything needed to add PFZs and NFZs.
     
     



     



    Correct weapon symbology coming soon
    Whole HMD needs a going over.
     

     
    Source
  2. Flexman
    I've just moved on to doing research into co-ordinates and floating point accuracy.
    Going to make a few test projects to try different ideas. Dave has been posting updates on the greenzone development.
     
    Welcome to Afghanistan
     
    Source
  3. Flexman
    My Dennis Norden bit. Out-takes from today. Most programmers we have a few wilco tango foxtrot moments from time to time. Here's a few from today. Starting with "How not to render lights to a buffer."
     

    The canopy glass makes for an interesting effect. Next, an interesting effect you REALLY don't want to see....ARRRRGHHHH....
     

    This is me getting a transform wrong. You can almost see the join between the high detail cockpit and the Apache exterior model. Mind the gap? I did fix this by correcting the TForm and resetting the camera back to the origin. Still have the lighting to correct but it's almost ready. The cockpit is rendered after the world, the zbuffer cleared and the pit is drawn at the world origin so zbuffer and floating point error is nil. All games have hacks to make them work, didn't you know?
     
    Speaking of hacks I highly recommend "Game Coding Complete" by Mike McShaffry. Full of funny developer anecdotes and a brief history of Ultima which is fascinating. As well as many best-practice approaches to game programming.
     
     
    Moving on, Dave was back to polishing the textures and models. More AO baking, backfaces, specular tweaks. Here's a selection of views from today. (Leaving out the rude England footy twitter jokes, some of which were priceless).
     
     

     



     
    Source
  4. Flexman
    It's ridiculous, I'm seemingly unable to purchase from the UK, PC Pilot, a UK based flight simulation magazine . The only way I'm able to obtain copies is via ebay sellers in the US.
     
    Local stockists are non-existent and repeated attempts to buy them online results in emails informing me that they are unable process my details. The same details which seem perfectly fine for US ebay vendors.
     
    Two weeks now.
     
    I give up, I'll stick with US postal charges. More reliable.
     
    Source
  5. Flexman
    Writing this up for reference later.
     
    Thinking about players, names, callsigns, current rank, medals, changing characters. The 3D base metaphor avoids a lot of GUI work. Using 3D lockers (since I have one to hand) is perfect. As it turns out, as easy as setting user keys on Locker entities. Simple.
     
    Source
  6. Flexman
    I like the idea of having a GunCam view. However it means increasing the texture detail on cannon as it really wasn't meant for up close viewing.
     

    Heh, I have you in my sights.
     

    Trying alternative offsets for the cam to get a good viewpoint. You can see the spotlight on but we don't yet have it deploying from the hull.
     
    Source
  7. Flexman
    Monday was one of those email days.
     
    Future Tech
     
    As director I'm looking beyond Combat-Helo, the future of the game and where we want to make improvements. One major improvement I'd like to see is the terrain rendering part of the engine. Make it more flexible, scalable and efficient. We've been looking at different engines and technologies, none of them are suited for flight-simulation out of the box. As much as we'd like to license those for use in a future commercial project they are either not ready or unavailable for license.
     
    To satisfy requirements post Combat-Helo we require the ability to model the whole of the earth and stream in data for ground detail. There's potential to do that with the current engine by paging in ground object data with a curved terrain mesh (think of a skybox that's curved into a sphere, but used for terrain). There are several interpolated LOD methods. The Terrain Augmentation Program is to be an ongoing side-project and not to interfere with Combat-Helo development.
     
     
    Vector Graphics and Display Lists
     
    I was looking over our Apache MPD (multi-page display) code, there are items I left out simply because I didn't have a handy symbol or character. Also the amount of updating required is a little inefficient. MPD updates were scheduled to be part of an optimisation pass later in the project but since I was adding the FCR and TADS symbology I feel justified in bringing that forward to make it easier.
     
    Currently the MPDs use a co-ordinate system with 0,0 in the centre of the screen, with -1.0 being the left edge, +1.0 the right side. With +1.0 and -1.0 top and bottom respectively. This allows for resolution independent rendering. However some elements such as the Leadwerks bitmap fonts required converting to a standard co-ordinate system. Bitmap fonts don't scale well.
     
    I've just completed coding a complete alpha-numeric font with symbols that mimic closely the current Apache MPD looks. All using vectors and OpenGL Display Lists (which are sort of pre-compiled commands), runs pretty fast and looks not too shabby. The MPD text and symbols are now fully scalable, also being pure OpenGL they are freed from needing the 3D engine and will run on a modest laptop.
     
    Things left to do,convert existing code to use new VectorFont class, use more Display Lists for page elements. I was adding the FCR (back) into the game while I was away last week but it's aged so much it's worth starting over.
     
    Sensors and Equipment
     
    Regardless of the current Apache capabilities which are not in the public-domain, our Apache will track and classify up to 256 objects (thank you AABB for making it so easy). It's currently magic, meaning instant and no regard for signal strength or LOS. This will be sorted out later. Just needed something to display on the TSD, FCR etc.
     
    David has been looking at the crews survival equipment. Something you can whip out to find out where you are. We know we'll want to have at least one weapon (a sidearm) and smoke signal flares for dropping a coloured smoke emitter.
     


     
    Source
  8. Flexman
    Last week I identified one issue relating to UserEntityData introduced with the last engine update which prevents consistent update of Enity data due to some change in the hierarchy and no documentation on what was changed.
     
    So I'm faced with having to re-factor (meaning to changing code but same behaviour) core sensor code. It's the sort of thing that is utterly frustrating and makes one want to throw everything out of the window. It's not as if there aren't enough things to do.
     
    There's 4 major issues I'm not happy with:
     
     

    Flight Model bridge refinement
    Ground dynamics
    Horizon gapping and other asset problems (licences/legal, audio)
    Events / Triggers

    I know I can rush some of these things and end up with something I'm not happy with. And if I'm not happy with it I don't see why anyone else will be happy. The majority of potential customers don't follow this blog, they don't care about how much work or team sizes, finds and lack-of, how or why, and often they don't care about the word "beta". To do what's right in the long term means having to not cut corners and do what needs to be done.
     
     
    Sucks though.
     
     
    Who would have thought building a stand-alone study sim of the most advanced attach helicopter on the planet would be so difficult? What gives?

     
    Source
  9. Flexman
    Dave who is the artist on Combat-Helo is currently in the process of evacuating his home in Thailand as the floods in Bangkok have made living difficult. With no fresh drinking water for days, no supplies in the shops and place of work closed, services breaking down it's time to jump ship.
     
    Blue indicates server flooding (clearly) Red=flood defence
     
     



    BBC carries the story here
     
    Dave's last act before evacuating was uploading the latest Chinook work to our server alas there was no time to upload the PSDs. Good luck and fingers crossed we'll hear from you in a week or a month...

     
    Source
  10. Flexman
    Starting to feel the pressure now. Both the financial and stress factors are weighing in. Doesn't stop me working but it's hard to switch off. On the business side there's a ton of things on the to-do list, it all eats time taken from production.
     
    Spooky, ok so the lip light isn't actually on his mic.
    If it was you wouldn't see this.
    Boeing sent me a poster back in 2002, this is a homage to that.
    This time with the rear seat.
    Taking out bad guys without damaging the good guys is a challenge.
    Experimenting with simple TSD display and labels.
     



     



     



     



     



     
    On top of this I'm studying some Unity material and shader programming. I could use a beer, a real one.

     
    Source
  11. Flexman
    Still working on the loadout system, as it happens I totally forgot to do the pylon classes. While I'm working on polymorphic classes to deal with that (lot of cases to think about). During lunch I played with some more dust effects, this time for rotor downwash. This uses the roaddust pixel shader so it picks up the colour of the terrain it's currently over.
     



    With no wind vector applied, brown-outs, where the crew can't see outside are occurring. Not sure why the canopy isn't blending as it should, it's located in the same transparency world as the dust particles. I'll have to check the shader settings in the material. Back to pylons.
     
    Source
  12. Flexman
    Looking at the pieces we have and project roadmap. Our game, like football (soccer for American readers), is a game of two halves. Side A and Side B. One campaign is the thinking man's approach; counter insurgency. The other game is the more familiar tank spanker; survival in a high-tech hostile environment against well armed self-sufficient mechanised infantry with air-defence units.
     
    Compounds are anchor points of the campaigns, in groups they form the villages, strategic points you're tasked to provide security for. In the side-B campaign, the role is slightly different but as important.
     


    I'm still a little bothered by LOD and shadow ranges, you can go mad tweaking these to find something that works well for different modes. Maybe I'm stupid but it only occurred to me last night to make the LOD settings dynamic. Which is ironic, as the very very first multiplayer wargame I worked on back in the late 80s used an LOD system based on view height.
     
    In the real world, at ground level the horizon is around 11km away, it's a mathematical function based on your height and the curvature of the earth.
     
    1.17 times the square root of your height of eye = Distance to the horizon in nautical miles
     


    So I'll be experimenting at some stage with adjusting the Leadwerks Engine LODs for shadows and vegetation based on player mode and viewer height.
     
    Just using a depth of field filter on the far horizon seems to greatly improve visual quality, making hills blend a better into the haze, masking the smaller details.
     
    First things first, we have to complete our Apache and it's operational systems. Arming is almost complete.
    With breaks for Easter, familiy time and re-writing internal systems for handling weapons THREE times (it got better each time). It's taken a week longer than I said originally. The menu system is in place and the visual manifestation of the ordnance is left to do. Rocket pods will require one click per zone (3 zones or 3 kinds of rockets per pod).
     


    Presently it permits arming in proximity to the Apache which is fine on the base. But we'll have to implement some object, like an ammo truck (hmm, seen that somewhere before), or some invisible object we can attach to any entity via some LUA code (much like player spawn locations).
     



    DOF blending the horizon.


     
    Source
  13. Flexman
    This entry is not about the life of pioneer George Stephenson. The pylons seem capable of configuring themselves, got some elevation in there for aim assist if/when we add that.
     
    I removed the LUA based weapon loading, it wasn't working out the way I hoped it might. There's a level of disconnect between LUA and the game-engine which added to the complexity of something that is already complex, when it didn't need to be.
     
    Can finally get started on the arming now. Got a little sidetracked with testing what I call compound entities which seemed like a good idea but don't actually work outside of the editor due to some engine bug. It would have been a great way to make villages but we've adopted a different approach. Both would give us destructible buildings.
     
    * update * Stores jettison is working too well. The whole things comes off the rail...and drops through the floor. All corrected. Rail and pod weights are effecting the centre of gravity a little too well, that's going to require a bit of tweaking to correct. I need to check my notes on stores weights and extrapolate how heavy these pods and rails are when empty. Then I had to create a custom physical shape to fit flush with the Hellfire rails as the connectors and actuator were causing collision events to trigger. And it turned out that my function to set those collisions was never called, it was removed after the 2.31 engine update. Restoring the function worked a treat. Now I need to add to the SFX required list, store jettison and stores hitting ground.
     
    Overall it's been a frustrating evening but a result at the end. Lots of fixing up to do to complete the arming, might take until the end of the weekend before it's fully functional. End of April is pencilled in as the blowing things up milestone, the campaign map is well under construction and I think we're almost at the point where the campaign data that sits on the map can start going in.
     



    It's bloody hard work, often tedious but the results make it almost worthwhile. Tomorrow however I have to face a reality I've not been looking forward to. And it might scupper everything.
     
    Source
  14. Flexman
    Yup, perhaps the most nauseating camera view is back. One that a still screen-shot and an fps hungry FRAPs recording IMPROVES. RotorCam is like having your brain ripped out by your eye-stalks and soaked in vinegar. A virtual camera is strapped to the underside of blade number 1 and everything else is a blur. Only use I can think of is a debug aid when we get to blade flapping etc.
     


    I'd like to thank Macklebee for helping me sort out the LUA object passing to get this working.
    RotorCam for all your video game torture needs.
     
    Source
  15. Flexman
    Had a quick play with Saitek's DirectOutput SDK, results are mixed but not bad. The MFD resolution in Combat-Helo is a native 512x512 and the Saitek Flight Instrument Panel is VGA 320x240, there's a bit of difference.
     

    Sampling the buffer down to a smaller surface and then adding a suitable BMP header to send over to the device. Remarkably easy. I'll have three more please Saitek
     
    BUT please can you make an FIP version two with a 512x512 square ratio display? Or at least increase the vertical resolution to 256?
     

    Text is near impossible to read, but the general layout is recognisable. I don't know if we're going to support these devices in game, it's just one more thing to go wrong and support, and the default button locations don't match up so it would need code to move functions over to the left side, there are only 6 six buttons. But it's interesting to play around with.
     

     
    Source
  16. Flexman
    I've been using this for testing and making profiles for Combat-Helo since the weekend. This is a really odd stick. It's perhaps the best built joystick out of the box I've ever had the privilege of using. And quite a looker too. The textured metal feel, the metal triggers and even a couple of the HATs. Oddly this level of build isn't consistent with several hats made from what feels like a poor quality plastic. But it wasn't broken or badly assembled, and nothing has broken yet.
     
    If you didn't know, the X65 is a force sensing stick. It doesn't move and is really sensitive to tiny amounts of hand pressure along the x/y and rotation axis. The amount of pressure you apply is translated into a direction. It makes fine control a joy since there are no springs or rubber boots to interfere with your intent. Apart from the plastic hats I don't have anything to say about the stick. Just really nice to hold, use, and with no moving parts it should be reliable. Guiding the Apache in Combat-Helo around for landing can be tricky made easier by the X65.
     
    Then there's the throttle. *sigh*
     
    Again beautifully made except for the dual throttle tension adjuster, a tiny hex screw on the underside made from the softest metal on the planet designed to dissolve on contact with anything heavier than neutrinos. The dual-throttle operation set to the weakest tension setting requires quite a lot of force. More force than is comfortable or practical for a helicopter collective that might require a good percentage of travel quickly. The perfect combo would be a separate collective controller and then just use the dual throttle for the engine levers. Also it has a rather unpleasant sounding 'gloop' noise when operated, like there's a lot of grease inside being moved around. The noises are almost pornographicly sticky.
     

     
    So we have a super sensitive joystick perfect for fine control. And a near impossible-to-move dual throttle controller that needs to be nailed down (which is why it comes with a heavy steel plate).
     
    All in one neat package. A tale of two joysticks.
     
    Source
  17. Flexman
    Began preliminaries on the advanced flight model. This involved looking through the various classes and discussing best strategies to minimise future maintenance and ease integration.
     
    Dor setup a flight-sim workstation and was researching the finer points of .GAU programming but was thwarted when her PC detected a Rookit virus infection picked up when working away over the weekend. She shouldn't have plugged into strange networks and let the client install software. Lesson learned the hard way.
     
    Between looking through physics code and C# I also found time to play with a demo of a terrain editor called GROME" which was used for Blazing Angles 2 and was able to import the ubiquitous Longbow 2 terrain. When I get it painted I'll post a screen-shot but the results are promising.
     
    I also was able to do a little more tinkering with shaders (I was all over the place today you can tell, had a not very nice interview in the afternoon which always leaves me feeling antsy). Was able to trim out some useless parts of the MPD shader and add some smooth filtering and desaturation. Details of the Arrowhead/MTADS (Modernised Target Acquisition and Designation) are a bit scarce but the in general offers three-times the optical range and improved low lighting visibility, highlighting obstacles such as wires, trees. Some edge-detection should be fairly easy to add, I've no idea how representative it would be, but since it's all very definitely under the heading of "capability", is therefore going to be secret. You'll have to live with more approximation based on guesswork and YouToob images.
     

     

    On of the improvements I'm keen on is applying a global X/Z offset to shaders to implement a fast terrain tile system for future releases. If we can cram more ground detail and reduce load times for larger maps by paging in data and translating visuals at the shader level until a big shunt is needed when crossing a terrain page. That should keep floating point errors in check and spread the load. As well as potentially increasing terrain detail.
     
    Some experiments are needed to verify performance but if it works, we'll slice up some DEM terrain with GROME and see what that will do for us. Using meshes for terrain is probably just as efficient, if not more so than the Terrain object we're currently using. I'm not getting hung up onchanging the terrain system for CombatHelo's first release. We have to give you something new to look forward to right?
     
    Source
  18. Flexman
    Yes were still using Notepad to edit them. Well that's not quite accurate, I'm using Notepad++
     
    What's nice about Leadwerks is being able to create a shader to add new effects or change how the engine renders something without anything getting in your way. So when Dave asks for a version of the cubemap that will blend in some particular way it was no problem to quickly put it together. He's doing terrible things to make filthy looking windshields, chrome toggle switches and this rather neat looking rear view mirror.
     
    Who needs fancy wysiwyg editors....well it would be nice sometimes.
     
    Dirty Mirror finish
    It's a double rainbow! Testing blending and reflections.

     
    Source
  19. Flexman
    I'm still hard at work on flight model code so not much to show or talk about. I'm feeling a bit sleep deprived but we're against the clock.
     
    Dave is refreshed from his little break in the sun and has been rendering shadows for the opfor ground vehicles and CH47. I like these "showroom" pictures. Gives me a hankering to play an RTS game.
     

     
    Source
  20. Flexman
    AD has been finishing more of the villages and green zones around the region. You can read more about it here...
     
    SimHQ Dev Diary update
     
    This is "Dara" in the Northern region (See map below)

     
    Source
×
×
  • Create New...