Jump to content

Flexman

Members
  • Posts

    916
  • Joined

  • Last visited

Everything posted by Flexman

  1. Thanks for looking Mac. All I really want for now is to be able to find "rotor_limb_1" from BMax on a model named "rotor_mast.gmf" loaded in the Apache LUA script and parented to the Apache model. But GetKey() not working is very strange. It must be something I've cocked up somewhere. I'll try to explain what's going on. I use LoadScene() and starting Apache aircraft are placed on the map as needed. During a ProcessScene() function, bit of a relic but handy, I replace these Apache entities with a new one. e is the current entity ' CONSTRUCT A PLAYER FRIENDLY APACHE LONGBOW ENTITY' If(vh = "AH64D") Then vh = "" CreateApacheEntity(EntityPosition(e), EntityRotation(e), e) FreeEntity(e) ; GCCollect() done = 0; Exit; End If And here's CreateApacheEntity() Function CreateApacheEntity(loc:TVec3 = Null, rot:TVec3 = Null, srcent:TEntity = Null) Local helo:THelicopter = New THelicopter; Local idString:String idString = String("LONGBOW00" + game.HelicopterCount) helo.Load3DModels(srcent) ; If Not helo.entity AppLog(" *** CreateApacheEntity:NO ENTITY:") Else ' COPY KEYS FROM EDITOR OR SOURCE AS NECESSARY' If srcent Then CopyEntityKeys(srcent, helo.entity) ; helo.entity.SetKey("fcr", GetEntityKey(srcent, "fcr", "1").ToString()) helo.entity.SetKey("rotorspeed", GetEntityKey(srcent, "rotorspeed", "0").ToString()) helo.entity.SetKey("stabpos", GetEntityKey(srcent, "stabpos", "0").ToString()) End If End If AppLog(" *** CreateApacheEntity:Crewcount:" + GetEntityKey( helo.entity,"crewcount") + " *** ") ; AppLog(" *** CreateApacheEntity:Crewslotname:" + helo.entity.GetKey("slotname_1") + " *** ") ; ' IN LUA, SLOTS ARE INDEXED FROM 1, IN BMAX THEY ARE INDEXED FROM ZERO' helo.PlayerSlots = Int(helo.entity.GetKey("crewcount", 0)) helo.CrewSlot = New TVehicleSlots[helo.PlayerSlots] ; For Local n:Int = 0 To helo.PlayerSlots - 1 helo.CrewSlot[n] = New TVehicleSlots helo.CrewSlot[n].Pos = New TVec3 AppLog(" *** Crewslotname: " + helo.entity.GetKey("slotname_" + String(n + 1), "") + " *** ") ; helo.CrewSlot[n].name = String(helo.entity.GetKey("slotname_" + String(n + 1), "slotname_" + (n + 1))) helo.CrewSlot[n].Pos = StringToVec3(helo.entity.GetKey("crewslot_" + String(n + 1), "0,0,0")) Next AppLog(helo.PlayerSlots + " CrewSlots Initialised") helo.idString = idString helo.childTADSpieExternal = helo.entity.FindChild("tads_pie") If loc <> Null PositionEntity(helo.body, loc) ; RotateEntity(helo.body, rot) ; Else PositionEntity(helo.body, game.scene.campos) ; RotateEntity(helo.body, Vec3(0)) ; End If SetEntityCallback(helo.entity, helo.MessageReceiveCallback, ENTITYCALLBACK_MESSAGERECEIVE) ; game.AddHelo(idString, helo) ; SetEntityKey(helo.entity, "vehicle", VEHICLE_KEY_APACHE_LONGBOW) ; SetEntityKey(helo.entity, "action", ACTION_MOUNT) ; SetEntityKey(helo.entity, "guid", idString) ; DebugLog(" CreateApacheEntity :" + idString) ; helo.SoundIdle = LoadSound("abstract::AH64CompressorIn.ogg") ; helo.SourceIdle = CreateSource(helo.SoundIdle, SOURCE_EAX | (SOURCE_LOOP)) ; SetSourcePosition(helo.SourceIdle, EntityPosition(helo.body)) ; helo.SoundRotors = LoadSound("abstract::apache_noise_internal.ogg") ; helo.SourceRotors = CreateSource(helo.SoundRotors, SOURCE_EAX | (SOURCE_LOOP)) ; SetSourcePosition(helo.SourceRotors, EntityPosition(helo.entity)) ; SetSourceVolume(helo.SourceIdle, 0.0) ; SetSourceRange(helo.SourceIdle, 60.0) ; SetSourceVolume(helo.SourceRotors, 0.0) ; SetSourceRange(helo.SourceRotors, 60.0) ; PlaySource(helo.SourceIdle) ; PlaySource(helo.SourceRotors) ; End Function The final part is the Load3DModels function...which is called early in CreateApacheEntity() Here I tried all manner of CopyEntity() etc. And I've since changed it back to what it was originally, which results in the same behavior. GetKey() not working. Maybe there's a LUA issue not being picked up. Method Load3DModels(srcEntity:TEntity) Self.model = LoadModel("abstract::aircraft_helicopter_ah64d.gmf") ; Self.entity = Self.model Self.body = TBody(Self.model) ; Self.entity.Show() Self.body.SetCollisionType(3, 1) ; Self.ViewPivot.SetParent(Self.entity) ; ' STORES - WEAPONS PODS' Self.Stores.Initialise(TModel(Self.model)) ; Self.Stores.SetPylon(1, PYLON_HELLFIRE) ; Self.Stores.SetPylon(2, PYLON_HELLFIRE) ; Self.Stores.SetPylon(0, PYLON_ROCKET) ; Self.Stores.SetPylon(3, PYLON_ROCKET) ; End Method
  2. k, I couldn't either. Must be something else. Thanks for the response Josh.
  3. 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
  4. I ask if there's a limit or some stack that gets filled up as we have 964 instances of about three kinds of buildings. With LUA scripts for these buildings the editor crashes on load, all the LUA script does is set the ViewDistance to 3000. Without the LUA the map will load fine but stuck with having to set the view distance elsewhere. Seems a lot of editor crashes are LUA related :/
  5. Dave, the kids must have been playing "pilot" again, they've gone and pulled off the knob for the standby instrument lighting, make it like the other two rotaries. I'll fix the camera clipping on the seat Source
  6. I know I said this week but will likely be over the weekend, there were some LUA issues I needed to get my head around. As for LUA, I think I'm going to pull out some of the model features I've been putting into the model LUA scripts as it's starting to get in the way when I need to control them in game logic. Reading values and objects back seems to be a dark art, these things may have been fixed, or not bugs at all, but caught between moving engine versions and not much documentation I'm left with having to "land at an alternate airport" just to keep things moving. Also I want to fix up the cockpit ambient lighting before recording a sight-seeing tour around our version of Herat city. Here's a tasty screen-shot of the Citadel to keep you going. Source
  7. I've been having a little problem with spawning helicopter entities and the LUA for these helicopters. I'll try and relate what happens here as best I can in case one of you much smarter folks can spot anything. This is a BMax to LUA problem I think. Description of problem Apache helicopters use LUA to load the rotor model, control lights, door animations, animate rotors. All spawned Apaches process the update loop correctly. You can use as an example: PlayerVehicle.SetKey("rotorspeed","4.5") to set the rotors turn at 4.5 degrees every update. It works fine. Problem comes with READING values though GetKey(). It will only work for entities loaded via LoadScene(), which is the first Apache. The Apache is copied, dressed with other data and loaded munitions in BMax, then the original is dumped. All spawned entities after that are created using CopyEntity() and CopyKeys(). while SetKey() works on these, GetKey() will always return an empty string. Even putting a Print("HEY GETKEY HAS BEEN CALLED") after the function isn't processed on these kinds of spawned entities. From what I understand, LoadModel() loads the LUA and must do some magic to ties that instance of the entity to the LUA state. But this isn't happening with CopyEntity()? Given that SetKey() works on these entities but GetKey() does not for copied entities, even when it's a simple Print() statement, what is going on here do you think?
  8. Flexman

    Week 3

    "Linux is only free if your time is worth nothing." hehe I like that. I suppose like most things, if you're skilled in it it's second nature but made me chuckle though. I just want to add that I love seeing a Roadmap. Streaming terrain and is something we started to look at using GROME as an editor, it has powerful scripting features and the ability to slice up huge maps. But of course it's breaking LE in two which is fine, cherry picking is part of creation process. The prospect of staying 'native' is quite appealing.
  9. Was exactly a year ago today we started work on Combat-Helo. I really don't know where the time has gone. Happy buffday team, and well done. To commemorate the occasion I dug out one of the earliest screen-shots I could find to compare with one from this afternoon. And thank you to everyone who's offered kind words of support and encouragement. It all helps. Sept 2010 - "Herat" Oct 2009 - "Camp Zero" Source
  10. Flexman

    Week 3

    We wouldn't leave home without cubic spline interpolation, between Bangkok and the UK we couldn't. In the real wold outside the US and cosy net services the internet weather can be a little rough. We send more data than just positional, since our entities don't make sudden changes positional updates can rely on client prediction between those updates to allow state data through which potentially can change faster. It's your opinion of course, I've had time with commercial sims like Empire Interactive's Apache Havoc and the networking was a disaster. Assumptions on letting the transport layer handling problems is just doomed to failure leading to complaints about performance. Nobody will end up using it.
  11. 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
  12. I want to thank Komodo Simulations for inviting me down for Summer Sim 2010, even though it didn't go according to plan we all learned a lot, I certainly did and this was really a chance to meet people and forge connections. Rich was clearly deep in thought and concerned about hardware performance. I was lost in deep thought and concerned about software. Everyone else didn't seem to mind very much. What happened was, early in the day while I was re-compiling the demo to fix a stupid inverted axis problem, FSX was running a helo demo and a visitor came and stomped on the left pedal, ripping out the weld and smashing the Hall sensor. We had to make do with alternative hardware (thanks to Flightstore for the loaners etc.) The "Virtual Blade", but nothing virtual about it, very real. What you would have seen today. If you came along, thank you very much to coming up and saying hi, I'm really sorry you didn't get a chance to see (much) of the game. Things just conspired against us from the start. But we'll get a new movie done showing some of the things we wanted to show this weekend but didn't. Oh, please email me if you were there as I'd like to get your names for future reference. Laptop demo, not a flying toy I came away with a Saitek X62; a stupidly knobbly joystick that has more buttons and hats than you thought was possible to put on a joystick. And also a Saitek Instrument Flight Panel which are those little LCD panels with VGA resolution (320x240). This morning I installed the Saitek OpenOutput SDK on my laptop (which continually gave me a memory errors after compiling till I rebooted *grrrr*) and got the 512x512 MFDs in Combat-Helo supersampled down to 240x240 to fit Saitek's panel. It was readable, not great, but certainly readable. The SDK is quite nice, a lot of callback hooks and functions for sending JPGs, BMPs and text to the screen. It's actually a good resolution for the Upfront Display, some nice chap at the show asked about (sorry I forget your name, even though I asked I'm pretty terrible with them). I'll post a pic later when I get a chance. I'm going to have to get a new stick of RAM for the demo laptop, it was one more thing letting me down. Yesterday it was crashing randomly when trying to run the demo and same again today when compiling. What's more the changes I made to fix one issue caused enough which I didn't notice till later (collective at 230%??), silly typo. The Komodo team comes equipped with a deadly "nice-guy", a chap so full of charisma he could (with apologise to Douglas Adams) charm all four legs off an Arcturan mega-donkey except perhaps the manager of a local restaurant who insisted it was perfectly normal to wait two hours for your starter. But at least the conversation was good and I learned fascinating things about horses. Thank you "Cyclic" (aka Rob) for being my point man again, have a good trip back to Saudi. Phil, I know you couldn't make it but the photo you sent of the Blackhawk Down fish pond decoration was a real ROFL. Every pond should have a crashed helo in it. (Rob, can you send it to me?) Day two and the chair was fixed, sorry I couldn't stick it out the whole day but there was a lot of interest in the chair and it was a really busy Sunday. We'll be looking to have a special Combat-Helo software/hardware package with a replica Apache control system consisting of a cyclic with magnetic force trim and full length collective. Unless it all goes pear shaped of course. How much will it cost? We'll you know but estimates sounded reasonable and not far off a certain A10 replica stick soon to arrive. Actually we all had a long chat about the Thrustmsater A10 and while Rob in particular voiced how nice it looked, the fear is that they will drop the ball again like they did with the Cougar. The trust isn't there anymore. A scary thought. *edit* The X65 force sensors are amazing, apart from the **** plastic HAT2 and POV (also plastic) it's pretty slick. Most of it's metal including one of the HAT, so why skimp on the rest? Sunday: the Komodo Simuations camo tent "FARP"(Rich, forground left looking pensive) (and YES I finally got my bloody PC Pilot subscription, can you spot where?) Thank you to my hosts, Rich, Mac and the nice lady who needed chocolate. Good luck at Duxford next week (it's also Battle of Britain weekend there so it's going to be mental). Take a spare Source
  13. All the things we want to show but can't. Still making some final hour changes to get a robust demo working that can be operated by Joe Public (I'm told he's coming along). A simple flying demo that will show the technology, Afghan map, lighting and cockpit. It has the mark 1 flight model I keep tweaking. sounds could be better. I wish I had time to do the landing gear joints, it's hard to land without wheels. Better stop with the bloggin and get back to writing. Source
  14. Brilliant, I added the emmiter.Turn(...) to the Update() method and it seems to have the desired effect. I'll play around with the parameters while I write this reply...at some frame rates you can see a 'spiral' pattern emerge. In the cockpit it looks pretty convincing. *more edits* After some more parameter experimentation I get a really nice 'shockwave' effect in the dust. ...CreateEmitter(300, 1200, Vec3(0, 1, 0), 0) ; ...SetVelocity(Vec3(8, 0.01, 0)) ...Turn(Vec3(0, -33, 0)) ...AlignToTerrain(TTerrain(game.scene.terrain)) ; I set the Area and Radius according to the helicopters altitude from the ground and rotor RPM (which is a percentage). Above 60 feet it's "hidden". Maybe I should pause it? Not clear what's more efficient. Thanks for those suggestions. Got a good result /thumbup
  15. I added some dusty rotor downwash from a helicopter but I'm not getting the effect I want and wondered if anyone has any ideas on how to do this. I want the particles to emanate around a circumference (mid rotor length), or a single point (under the rotor shaft) and move away in a circle. Leadwerks particles, as far as I can see support a rectangular area and a linear acceleration (one direction only from a 'wind' direction). But since they wind is blowing 360', the rotor downwash, it doesn't quite give the desired results. Any help or suggestions?
  16. Ran fine here too. Really nice. Ran the .EXE (you packed it somehow). Little guy runs around, idles in around 20 secs just fine.
  17. Hmmmm, I wonder if this might be good for our project? *cough cough* We could use the trees a little bigger but only have max 2009, is there a way to edit them using last years earlier version?
  18. AD made some atmospheric screen-shots when playing with lighting and environment settings. SimHQ Diary Starting with the only major airbase in the region. AD is responsible for some Strike Fighter mod aircraft models, one of which is a Tornado GR1 (?). Which he's used here. I don't think these will be in the game unless we get permission from the original mod maker to use it. But it does look nice. This is our early version of Camp Stone complete with a half-court basket. You wouldn't have a pair of M1A1s on the doorstep but they do look interesting. Poster child..."never alone" We have been hard at work on getting a simple flying demo ready for a public showing, we've had to make it playable and gave me an excuse to put some more time into the mark 1 flight model which is a much simpler easy to fly model for general consumption. This approximates the mass of the helicopter, rotor thrust from engine power and semi coordinated turns. The landing gear desperately needs some joints to make it easier to land but I don't think I'll have time for that. Following the road north our of Camp Sone you eventually approach Herat, our version is perhaps more idyllic taxi-free version, and perhaps more green to make efficient use of geometry. Enough to fill enough area to represent a small city. No orange sunset here. Looks much more natural. Freecam mode lets you move anywhere you want to take snapshots. Contemplating broadcasting a regular call to prayer from the towers at the appropriate local game time. Nice choice of sky. You can see what we had to do to the rivers to prevent a lot of clipping and z-buffer fighting. Hence the "Death Star Trench" name we use. Source
  19. Aye Mack. Although, a funny thing. I edited the script in the 2.40 editor just to get on with it. And while it doesn't work in the 2.31 editor, it works in game compiled with 2.31 So I'm left a bit, "blah". I can't find the word so the sound will have to do. "blah", there it is again. As much as I want to upgrade then engine for the project it still has issues with my game I don't currently have time to work on. Got a demo for a public show to do this Saturday and it's not going to have many features ready in time.
  20. I would have had this working already, but in LUA SetColor() doesn't seem to work. All the lights created are white? There are light strips on the tail, wings and other parts that offer a dim green glow. I'm supposed to use the FULL_BRIGHT shader and a glow map for those.
  21. Flexman

    Week 2

    Maybe add ribbons, ribbon particles too? Looks great.
  22. These are placement tests for the Apache model in the editor, getting a feel for colour, levels, position, range and angle. The left nav light (red) on the Apache model needs to have the fullbright material applied to be visible in dark conditions. One pilot was telling me that the ground on the left side on the helicopter appears brighter than the right with night vision. Interestingly our night vision shader amplifies lighting levels based on final pixel colour and gives a boost to red values so you should also experience the same effect. Same again but with the nav strobe blinking, ever so short flash that should be visible 2km away in game terms. It uses a corona and not a real light source for performance reasons. It's highly visible and does it's job. Although it will probably flare-out or clip in NV mode. I experimented adding two point lights in the cockpit area, these lights currently exist in the internal cockpit mode but I'll see about adding them to the external model if it can be easily done. On the whole, performance would be better just baking that light onto the texture but the exterior cockpit is really simple, the canopy doesn't cast shadows and the light range is short. Final shot is the retractable spot-light, which we were going to model, maybe we did already but can't remember...(check notes). It's supposed to be steerable and there's a toggle switch for it somewhere. I think using a 3D cone mesh to add a bit of fake 'haze' around it might be an idea. I shall get these coded up into the game model now. Pretty pleased with the overall layout. Source
  23. You were needing exactly 1 extra layer too? lol If we had it, we'd still need just ONE more
  24. Added some fixed internal views for 'quick' look downs and drama shots. Wiper dash...this has a little vibration. Pilot displays... Over shoulder... Pilot engine controls (startup and lighting)...CP/G similar (not pictured) Co-pilot target panel (TEDAC)... I think a 'foot-well' cam will come when we get a pilot model in game so we can see the crew looking around. And I think we could use an ADI/Comms panel view. Feel free to suggest a few more. Source
  25. This is months of painstaking trial-and-error, optimisation and experimentation. I said months ago, "We don't have the resources or time to build a whole city, just a close approximation". Well it's an approximation but it's more than what we anticipated was possible. Given that the old girl Longbow 2 had a small village, a dozen or so muddy cubes, this is 2010 and we can afford to push it a little. Putting the demo together for Summer Sim 2010 next weekend, the updated map includes Herat city which is not a center for our first campaign map, geographically or strategically as it's close to the north-west corner of the map. But it is a regional feature, the city is the gateway to Iran. One of the campaign scenarios involve a armoured invasion by Iranian forces in an attempt to do something about a deteriorating security situation in which NATO led US forces are caught in the middle and ultimately you decide which way that goes. The city will present a real challenge for pilots, not only is it a maze of structures and narrow streets, there are not many open areas to perform an emergency landing should the need arise. I don't think we want to build another city like this. Hopefully you'll be able to appreciate the amount of work that's gone into the environment. Flying over the rooftops and sat dishes in the pilot seat with a full HOTAS is a dream come true, I certainly never expected anything like this when we started last September. It has the feel of an old familiar sim mixed with the new and we're not finished yet. AD has done an outstanding job in realising the setting. If there's one criticism I can level, there's not enough of it. I'd happily fly for longer than I perhaps normally would in other sims as the detail is better. There's always something interesting over in the next valley, or a nice low level route to challenge your flying skills. We chose from the outset not to put the player in Helmand which is where the worst of the troubles are. It's a question that's been asked, why not? It limits what you can do with scenarios and we wanted the Apache to do what it does best, spank heavy armour. Italy is currently the occupying security force in this region which is set to pass on to the US in the near future. Here we get to play out two different kinds of warfare. And what starts as one kind, if you do really badly in one campaign, may step things up and move you into the second. And if that happens you'll be flying over Herat, weapons hot. Source
×
×
  • Create New...