Here's looking towards big things this year. *sip*
Here's to absent friends. And my friend Gary, thanks for the present you sent me at Christmas. Cheers David, I owe you big time for your great work.
Here's to Banckrupt Stock, the Piman and Automata UK. We miss you. Here's to all those still born and deceased computing machines.
And thanks to the guys who made Gravity Crash, I enjoyed that.
Happy New Year.
Richard, aka Flex.
Thursday, 31 December 2009
Tuesday, 15 December 2009
Tuesday, 8 December 2009
UFD - Up Front Display
Things you really don't want to see outside of a lamp test...
I've wired up the PlayerHelicopter > Avioncs > Radios to the UFD. All the radios are initialised to default frequencies based on their band (UHF, VHF, FM). Here all warning flags are switched on for a display check, too many to show at the same time.
And this raises and interesting point. This is far too complicated for average Joe gamer.
Options include parking this module and saving it for the "pro" edition. Then replacing it with an easy radio; simple left<>right channel cycling between: ATC - FARP - Wing - Ground.
When using 'augmented' controls (such as when playing with a joypad) the radio should be handled for you anyway (by not having any logic checks for tuning etc).
Monday, 7 December 2009
Checkpoints
Started making a few sets to get an idea of what other objects we could use. Assume we place checkpoints to mark boundaries of security zones. Roads approaching to forward bases should be controlled and a semi-permanent road checkpoint established using handy materials, which is a couple of Hesco buckets, wire and an APC or two. There should probably be a small compound or a few small buildings, such a checkpoint is too exposed to be manned in such a manner 24/7.
Could use some wire and road barrier, improvised but clear intent. Still trying to source a soldier model.
These may be subjected to a coordinated attack across several locations during patrols.
Could use some wire and road barrier, improvised but clear intent. Still trying to source a soldier model.
These may be subjected to a coordinated attack across several locations during patrols.
Objects to do....
- Power lines
- Telephone lines
- Afghan compound walls
- Afghan compound buildings
- Crop fields
- Concrete blocks
- Concrete bridge
- Mosque
- Flags and poles
- Water Tower
- Spiral Wire Fence
- Road block pole with "stop" sign
- Satellite Dish array
- Dome Tents
- Wooden barracks
Hey Corona
Thanks to a little help from Macklebee Coronas are now working on my models. My scripts used the AABB bounding box dimensions for positioning objects, but there's an issue using those so hard-coding the position in each model will have to do, not a problem.
Next stage is to modify a models LUA code to have Coronas 'blink' at specific frequencies.
Coronas are "glows", halos (well, corona), that are billboards (always facing the camera). Typically used as fake lights or positioned on top of light sources to indicate the source, as lights themselves are not visible.
This radio tower model should have about five lights but due to budget cuts...
Dark brooding skies today. Reflecting my mood.
Next stage is to modify a models LUA code to have Coronas 'blink' at specific frequencies.
Coronas are "glows", halos (well, corona), that are billboards (always facing the camera). Typically used as fake lights or positioned on top of light sources to indicate the source, as lights themselves are not visible.
This radio tower model should have about five lights but due to budget cuts...
Dark brooding skies today. Reflecting my mood.
Sunday, 6 December 2009
Duststorms cont..
Two new screens from Combat-Helo.
The 3D effect works better, using a "cloud" type texture with some shading, A couple of emitters parented to a pivot and you can fill half a kilometre of a valley with a functional mini dust-storm. A couple of these following a path up dusty valley floors should make for a pretty scary flying experience, if you're foolish enough to try and fly through one.
Next video will show this better but you can hardly make out the farp ahead even though it's only 50 meters away. No flying this afternoon. Too bad we can't make the tents bellow.
Enough of this idle diversion, back to programming the upfront display (UFD). The new radios need some work.
The script has had it's third pass and been signed-off.
The 3D effect works better, using a "cloud" type texture with some shading, A couple of emitters parented to a pivot and you can fill half a kilometre of a valley with a functional mini dust-storm. A couple of these following a path up dusty valley floors should make for a pretty scary flying experience, if you're foolish enough to try and fly through one.
Next video will show this better but you can hardly make out the farp ahead even though it's only 50 meters away. No flying this afternoon. Too bad we can't make the tents bellow.
Enough of this idle diversion, back to programming the upfront display (UFD). The new radios need some work.
The script has had it's third pass and been signed-off.
Dust Storms and Rotor Wash
Dust storms are constant hazard and often so bad they not only ground aircraft they can cause a good deal of damage, especially to any exposed aircraft or unprotected aircraft intakes. Occasionally even tied down Apaches in the Gulf were tipped over.
I created a new particle emitter in the editor for dust-storms and rotor wash. Dust-storms would be a nice to have if they look OK. The reference pictures I have (taken by Michael Yon) show visibility dropping sharply to about 50 feet.
Improvements could be made if the particle material could be illuminated from above, like clouds. From a distance it looks like a brown smoke cloud, it needs lighting to give it a more 3D appearance.
Experiment painting desert tracks using the editor. Needs more softening of the edges. At ground level it works but at low altitude you can see the terrain tile resolution. Painting in the editor to get it right will be time consuming. Should be possible to do something in Photoshop.
I created a new particle emitter in the editor for dust-storms and rotor wash. Dust-storms would be a nice to have if they look OK. The reference pictures I have (taken by Michael Yon) show visibility dropping sharply to about 50 feet.
Improvements could be made if the particle material could be illuminated from above, like clouds. From a distance it looks like a brown smoke cloud, it needs lighting to give it a more 3D appearance.
Experiment painting desert tracks using the editor. Needs more softening of the edges. At ground level it works but at low altitude you can see the terrain tile resolution. Painting in the editor to get it right will be time consuming. Should be possible to do something in Photoshop.
Thursday, 3 December 2009
Radio sets
The TAvionics class is a single instance, one client, one avionics suite. If you leave a vehicle, this class is dumped (along with all the MFDs, HUDs and everything else it hosts followed by a good garbage collection). Enter a new vehicle and it's re-loaded, along with all the memory required for the instrument display buffers etc.
A radio has two channels, a main and a standby, (an AH-64D Apache Helicopter has several radio sets which we will go into later). We will use the ActiveChannel field to index these. If you're familiar with Microsoft Flight Simulator or have any of those RadioStack hardware panels you will be familiar with the "Active" and "Standby" principle of the radio set.
In Sandbox, now Leadwerks Editor, any models of class "radiosource" have keys for two frequencies and file for a radio source. The scene loader populates a TMap of radio-sources. The TRadio class by default loads in a sound file of radio static, turn on the radio and all you hear is shhhhhhhhhhhhhhhhshhhhhhshhh.
Fortunately each can be squelched independently. Using units of 0.0 to 1.0 we assume a background noise has a weak strength, say 0.3 and we'll set the default squelch to 0.2, so we can hear something when we turn the radio on.
And using Audacity we generated two radiohiss.ogg files simply using the "generate noise" function of the program. We used a low-pass filter to give it a more radio set feel. We'll adjust the pitch of the hiss pseudo-randomly when we step through frequencies and no other signal source is present.
Type TRadio
Field Enabled:Int;
Field Band:Int;
Field ActiveChannel:Int; ' 0 = FREQUENCY1 1=FREQUENCY2
Field Frequency:Float[] {hidden}; ' CHANNEL INDEX
Field AudioFile:TSound[] ; ' CHANNEL INDEX
Field Strength:Float[] ; ' CHANNEL INDEX
Field Squelch:Float[] ; ' CHANNEL INDEX
Field Volume:Float;
Field source:TSource; ' SET EXTERNALLY, NORMALLY BY TAVIONICS
Method New()
Self.AudioFile = New TSound[2] ;
Self.Frequency = New Float[2] ;
Self.Strength = New Float[2] ;
Self.Squelch = New Float[2] ;
Self.Enabled = True;
Self.Volume = 1.0;
Self.AudioFile[0] = LoadSound("abstract::radiohiss.ogg") ;
Self.AudioFile[1] = LoadSound("abstract::radiohiss2.ogg") ;
Self.source = Null;
Self.ActiveChannel = 0;
Self.Squelch[0] = 0.2;
Self.Squelch[1] = 0.2;
Self.Strength[0] = 0.3;
Self.Strength[1] = 0.3;
End Method
Method SwitchOn(audiosrc:TSource)
If audiosrc Then
Self.source = audiosrc;
Self.source.SetVolume(0.4) ;
Self.source.SetPitch(Rnd(0.2, 0.9)) ;
If (Self.Enabled) And (Self.Strength[ActiveChannel] > Self.Squelch[ActiveChannel]) Then
PlaySource(Self.source) ;
End If
End If
End Method
Method SetFrequency(tuner:Float, channel:Int = 0)
Frequency[channel] = tuner;
UpdateRadioSources();
End Method
End Type
A radio has two channels, a main and a standby, (an AH-64D Apache Helicopter has several radio sets which we will go into later). We will use the ActiveChannel field to index these. If you're familiar with Microsoft Flight Simulator or have any of those RadioStack hardware panels you will be familiar with the "Active" and "Standby" principle of the radio set.
In Sandbox, now Leadwerks Editor, any models of class "radiosource" have keys for two frequencies and file for a radio source. The scene loader populates a TMap of radio-sources. The TRadio class by default loads in a sound file of radio static, turn on the radio and all you hear is shhhhhhhhhhhhhhhhshhhhhhshhh.
Fortunately each can be squelched independently. Using units of 0.0 to 1.0 we assume a background noise has a weak strength, say 0.3 and we'll set the default squelch to 0.2, so we can hear something when we turn the radio on.
And using Audacity we generated two radiohiss.ogg files simply using the "generate noise" function of the program. We used a low-pass filter to give it a more radio set feel. We'll adjust the pitch of the hiss pseudo-randomly when we step through frequencies and no other signal source is present.
Type TRadio
Field Enabled:Int;
Field Band:Int;
Field ActiveChannel:Int; ' 0 = FREQUENCY1 1=FREQUENCY2
Field Frequency:Float[] {hidden}; ' CHANNEL INDEX
Field AudioFile:TSound[] ; ' CHANNEL INDEX
Field Strength:Float[] ; ' CHANNEL INDEX
Field Squelch:Float[] ; ' CHANNEL INDEX
Field Volume:Float;
Field source:TSource; ' SET EXTERNALLY, NORMALLY BY TAVIONICS
Method New()
Self.AudioFile = New TSound[2] ;
Self.Frequency = New Float[2] ;
Self.Strength = New Float[2] ;
Self.Squelch = New Float[2] ;
Self.Enabled = True;
Self.Volume = 1.0;
Self.AudioFile[0] = LoadSound("abstract::radiohiss.ogg") ;
Self.AudioFile[1] = LoadSound("abstract::radiohiss2.ogg") ;
Self.source = Null;
Self.ActiveChannel = 0;
Self.Squelch[0] = 0.2;
Self.Squelch[1] = 0.2;
Self.Strength[0] = 0.3;
Self.Strength[1] = 0.3;
End Method
Method SwitchOn(audiosrc:TSource)
If audiosrc Then
Self.source = audiosrc;
Self.source.SetVolume(0.4) ;
Self.source.SetPitch(Rnd(0.2, 0.9)) ;
If (Self.Enabled) And (Self.Strength[ActiveChannel] > Self.Squelch[ActiveChannel]) Then
PlaySource(Self.source) ;
End If
End If
End Method
Method SetFrequency(tuner:Float, channel:Int = 0)
Frequency[channel] = tuner;
UpdateRadioSources();
End Method
End Type
This is enough for an example. The Update method periodically steps through the TMap of radio-sources, and if they are in range;
- Sets the signal strength in the radio class
- Loads the sound file specified in the entityclass info into the appropriate AudioFile channel.
- Sets the volume of the sound file based on strength.
The TSource is created in the parent class (TAvionics). We only want one source to listen for radio transmissions so we pass this to each radio we create.
Our Apache has two radio sets for voice communication (a total of four channels), in addition there is a radio used for navigation. The Band field indicates if the radio UHF, VHF or NDB, VOR. Radio instruments used for navigation will query the NavRadio reciever for signal strength and bearing (bearing comes from the entity position of the radio-source relative to the player_vehicle entity).
What can I say. It works well enough. Our cockpit does not yet have any radio controls except for a few key-presses to turn the active channel and set vol. and squelch.
Finally, it is with deep regret that my wife's father passed away this morning at the age of 79 in Victoria BC. A survivor of the atomic bombing of Hiroshima, he was sponsored into the United States and became an influential scentist shaping our understanding of deep ocean currents and many years later, fibre-optics. He had a most interesting life and a devoted Quaker spending much of his time helping others. Mike, you will be missed.
Tuesday, 1 December 2009
Ground vehicle automata - Boragh APC
Ground vehicles are important in any combat simulation. So far our vehicles (lovingly built by David) are static placements except for a couple of vehicles we converted for the vehicle test program.
Our vehicles will be grouped together into "formations" (squads if you want to use a less technical vernacular) consisting of up to 12 different kinds of vehicles. Each formation will follow a set of instructions, waypoint>action and each vehicle within that formation will attempt to maintain it's relative position.
That's the general idea. Now to turn static models into war machines with a purpose. I turned a tracked Iranian Boragh (a BMP-2 APC with a peculiar turret) into a tracked/ten wheeled vehicle. Using the LE Scout example as a template it was easy to extend this to work on a more complex vehicle. Even drive it around in the editor.
Density of the particle smoke effects (now matching the terrain colour thanks to new shaders) is based on vehicle speed. The vehicles turn and have full suspension however the tracks are static, this is hard to spot with all the smoke, grass and movement of the vehicle.
They drive independently in a straight line, what's needed now is some logic to follow a point relative to the current lead vehicle in the formation. This is an exercise for later.
Implementation of tracked vehicles using Newton vehicle physics may prove too resource hungry. Worst case scenario is 12 x 10 wheels per formation and formations should be spread out to have a few km between them but that's not always going to be the case when people build their own missions. The current Vehicle command set is not complete and does not allow (as far as I can tell) any method to make vehicles "sleep".
An alternative idea is to make a single "sliding block" for each track and apply enough force to move the vehicle along. This would work better for a tracked vehicle and this is how it is done for a Locomotive using Newton physics.
More work on the Apache Computer, my first "Hello World" program on it. No, it's not a real functioning computer but a message queue display device with some event timers behind it...and yes, a working clock. Last five cautions and warnings are displayed at the top. So when you hear your pilot or gunner yelling "We got some caution and warning lights, check your panel!", this is where to look.
The time is from PC clock, you can see when I take these screen-shots now. The time will eventually come from current theatre time (based on mission start time). I managed to fudge a slight fuzzy look not by using a shader but adding a brown pixel outline to the font. Simple duh.
Our vehicles will be grouped together into "formations" (squads if you want to use a less technical vernacular) consisting of up to 12 different kinds of vehicles. Each formation will follow a set of instructions, waypoint>action and each vehicle within that formation will attempt to maintain it's relative position.
That's the general idea. Now to turn static models into war machines with a purpose. I turned a tracked Iranian Boragh (a BMP-2 APC with a peculiar turret) into a tracked/ten wheeled vehicle. Using the LE Scout example as a template it was easy to extend this to work on a more complex vehicle. Even drive it around in the editor.
Density of the particle smoke effects (now matching the terrain colour thanks to new shaders) is based on vehicle speed. The vehicles turn and have full suspension however the tracks are static, this is hard to spot with all the smoke, grass and movement of the vehicle.
They drive independently in a straight line, what's needed now is some logic to follow a point relative to the current lead vehicle in the formation. This is an exercise for later.
Implementation of tracked vehicles using Newton vehicle physics may prove too resource hungry. Worst case scenario is 12 x 10 wheels per formation and formations should be spread out to have a few km between them but that's not always going to be the case when people build their own missions. The current Vehicle command set is not complete and does not allow (as far as I can tell) any method to make vehicles "sleep".
An alternative idea is to make a single "sliding block" for each track and apply enough force to move the vehicle along. This would work better for a tracked vehicle and this is how it is done for a Locomotive using Newton physics.
More work on the Apache Computer, my first "Hello World" program on it. No, it's not a real functioning computer but a message queue display device with some event timers behind it...and yes, a working clock. Last five cautions and warnings are displayed at the top. So when you hear your pilot or gunner yelling "We got some caution and warning lights, check your panel!", this is where to look.
The time is from PC clock, you can see when I take these screen-shots now. The time will eventually come from current theatre time (based on mission start time). I managed to fudge a slight fuzzy look not by using a shader but adding a brown pixel outline to the font. Simple duh.
Subscribe to:
Posts (Atom)