James Palmer wrote: > I am seriously interested in adding dogfighting capability to FG. > > I've been reading through the source for the past couple of days. (I've only just stumbled > upon FG.) > > As I see it, the following changes would need to be implemented to have a rudimentary dogfight. > 1- add missiles to submodels > 2- have submodels added to the multiplayer protocol so that players can see other AI entities. > 3- add collision detection (airplane to airplane and airplane to AI)
> Missiles - > The approach I planned involves creating a new submodel called "missile." I have two options on how to proceed. > a- create a missile object based on the AIballistic submodel but with an added "thrust" parameter. > b- create a missile object based on the AIAircraft model. > I think the AIAircraft model will be more useful as a base, so that future expansion can be added more easily (i.e. seeking methods etc) > Multiplayer - >I still have a lot of reading to do in this area. Any suggestions for allowing submodel information to be sent to the server and other players are greatly > appreciated. > Collision Detection - >For a first run, I planned on using the same "_crashed" variable in the YASim model. Just calling a setCrashed when a player comes within contact distance >of another player or AI model. >I haven't read through all of the source code yet, so any critiques or suggestions are welcome. I recently added the capability of AIObjects to use submodels, so some of what you want to do is already present. If the trigger property is set over the net, the AIObject, in this case an MP aircraft, should release a submodel. Unfortunately, all objects in the environment using the same 3d model will do likewise. So if you are using a F16, and your target is an F16, both will fire a missile as it currently stands. There are small but significant lags on the network, so the missile you fire and see is not in the same position as another player will see. This shouldn't matter too much for homing missiles, but I think would preclude a realistic extension into guns. A modification of AIAircraft is probably the way to go. Simple proximity is probably not enough to calculate a hit - you should at least think about simulating the fuse characteristics, and consider the geometry of the intercept. I imagine you would need to add some randomness to simulate the probabilities of success. And finally, and THIS IS IMPORTANT. We don't want some idiot over KSFO shooting down other players who are quietly practicing touch and goes, so this facility, if you provide it, MUST be selectable by other players. Vivian -- James Palmer ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel