Dogfight computer
Moderators: winston, another_commander
-
- Average
- Posts: 13
- Joined: Tue Apr 29, 2014 7:13 pm
- Location: HMS Zion, a small ship where I am captin
Dogfight computer
Hi everyone.
This is my first post here (HELLO), but i've been lurking as a non-member for a while.
quick bit of background, I've been playing Elite since before I could talk (Born 1991, started playing the original elite 1993) and have never stopped. Now I am wanting to make an expansion for oolite (might make more than one) and have been reading the wiki ect.
So for my first project, I'd like to look at a dogfighting computer for ships. Basically, I'd like it to be able to turn the ship to face the target, and open fire.
any hints to get me started?
Thanks
Dan
This is my first post here (HELLO), but i've been lurking as a non-member for a while.
quick bit of background, I've been playing Elite since before I could talk (Born 1991, started playing the original elite 1993) and have never stopped. Now I am wanting to make an expansion for oolite (might make more than one) and have been reading the wiki ect.
So for my first project, I'd like to look at a dogfighting computer for ships. Basically, I'd like it to be able to turn the ship to face the target, and open fire.
any hints to get me started?
Thanks
Dan
- Captain Beatnik
- Deadly
- Posts: 155
- Joined: Sun Feb 27, 2011 10:15 pm
- Location: Eastern Bavaria (Average Agricultural Confederacy)
Re: Dogfight computer
Hello commander dan3008 and welcome to this board, the friendliest place this side of Riedquat.
I think the development of something like a dogfighting computer will require quite a lot of scripting. I would suggest to start at the wiki. There you will find many howtos that will give you valuable information about oxp-development: http://wiki.alioth.net/index.php/OXP_Distribution
I´m looking forward to hear more of your project!
Best regards
C.B.
I think the development of something like a dogfighting computer will require quite a lot of scripting. I would suggest to start at the wiki. There you will find many howtos that will give you valuable information about oxp-development: http://wiki.alioth.net/index.php/OXP_Distribution
I´m looking forward to hear more of your project!
Best regards
C.B.
I love deadlines. I like the whooshing sound they make as they fly by. (Douglas Adams, 1952 - 2001)
You have to try the impossible to achieve the possible. (Emil Sinclair, 1877 - 1962)
You have to try the impossible to achieve the possible. (Emil Sinclair, 1877 - 1962)
- Norby
- ---- E L I T E ----
- Posts: 2577
- Joined: Mon May 20, 2013 9:53 pm
- Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
- Contact:
Re: Dogfight computer
Welcome dan3008!
Your selection is not the easiest for a first project. You can try my similar function in Telescope OXP where a double ident press ("r") can steer to the most centered ship, even if out of the screen. It is useful in dogfight when you want a lock on the next target as fast as possible after you finished one.
If you look into the Scripts/telescope.js file then the $Telescope_Steer() function add a FrameCallback in the 1514. line which can change the player.ship.orientation towards the target in every frame (normally 60 times in a second).
There are small tricks to do this correctly, for example I multiplied the player.ship.maxPitch with the elapsed time since the last frame (from the "delta" variable) to match the produced turn rate to the capability of the current player ship. So you should learn and borrow from existing codes also after you read the [wiki]OXP_howto[/wiki].
Programmed fire is even harder due to no simple fire function in the javascript interface. You can reduce the energy of the current target to simulate a hit (another trick is to get the correct damage amount from currentWeapon), but for an acceptable impression you must make visual and sound effects, and the usage of these will be obvious after some practice only.
If you are still here then we welcome you in the "dark side" of Oolite!
Your selection is not the easiest for a first project. You can try my similar function in Telescope OXP where a double ident press ("r") can steer to the most centered ship, even if out of the screen. It is useful in dogfight when you want a lock on the next target as fast as possible after you finished one.
If you look into the Scripts/telescope.js file then the $Telescope_Steer() function add a FrameCallback in the 1514. line which can change the player.ship.orientation towards the target in every frame (normally 60 times in a second).
There are small tricks to do this correctly, for example I multiplied the player.ship.maxPitch with the elapsed time since the last frame (from the "delta" variable) to match the produced turn rate to the capability of the current player ship. So you should learn and borrow from existing codes also after you read the [wiki]OXP_howto[/wiki].
Programmed fire is even harder due to no simple fire function in the javascript interface. You can reduce the energy of the current target to simulate a hit (another trick is to get the correct damage amount from currentWeapon), but for an acceptable impression you must make visual and sound effects, and the usage of these will be obvious after some practice only.
If you are still here then we welcome you in the "dark side" of Oolite!
- JazHaz
- ---- E L I T E ----
- Posts: 2991
- Joined: Tue Sep 22, 2009 11:07 am
- Location: Enfield, Middlesex
- Contact:
Re: Dogfight computer
Sorry, what? You started playing the original Elite in 1993, the year that Frontier Elite 2 came out? So which game was you playing?dan3008 wrote:Born 1991, started playing the original elite 1993
- Diziet Sma
- ---- E L I T E ----
- Posts: 6312
- Joined: Mon Apr 06, 2009 12:20 pm
- Location: Aboard the Pitviper S.E. "Blackwidow"
Re: Dogfight computer
I thought that was pretty clear.JazHaz wrote:Sorry, what? You started playing the original Elite in 1993, the year that Frontier Elite 2 came out? So which game was you playing?dan3008 wrote:Born 1991, started playing the original elite 1993
G'day Dan, and welcome aboard!
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
-
- Average
- Posts: 13
- Joined: Tue Apr 29, 2014 7:13 pm
- Location: HMS Zion, a small ship where I am captin
Re: Dogfight computer
Yep, the original, my parents only had number 1. I got myself a pre-owed copy of 2 when i went to uni, in 2010... not long before i found oolite, and decided to just stick with that.JazHaz wrote:Sorry, what? You started playing the original Elite in 1993, the year that Frontier Elite 2 came out? So which game was you playing?dan3008 wrote:Born 1991, started playing the original elite 1993
anyway, thats for all the advice. I'll certainly take a look at that NorbyNorby wrote:Telescope OXP
haha, sure its not the easiest start point. But at least i'm familiar with javascript. and IMHO its the one thing that's really missing from Oolite that isnt already coverd in other oxp's. Normally i'd start with something simple, like a new ship or texture pack, but I dont have a decent image editor at the moment (old laptop ) and I cant do 3d models to save my life lolCaptain Beatnik wrote:I think the development of something like a dogfighting computer will require quite a lot of scripting
attacked, defended myself, now i'm the fugitive. How was i supposed to know that other ship was a galcop...
- Smivs
- Retired Assassin
- Posts: 8408
- Joined: Tue Feb 09, 2010 11:31 am
- Location: Lost in space
- Contact:
Re: Dogfight computer
Hi Dan, and welcome.
You wouldn't build a robot to take care of your love life for you, would you?
Ha, there is a good reason for that! Whatever 'career' the player adopts, one thing remains constant, and that is that the real fun in the game is getting into a mean and dirty dogfight from time to time if you 'automated' it you would take away the best bit of the game.dan3008 wrote:[a dogfighting computer] its the one thing that's really missing from Oolite that isnt already coverd in other oxp's.
You wouldn't build a robot to take care of your love life for you, would you?
Commander Smivs, the friendliest Gourd this side of Riedquat.
- Norby
- ---- E L I T E ----
- Posts: 2577
- Joined: Mon May 20, 2013 9:53 pm
- Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
- Contact:
Re: Dogfight computer
There is another OXP: [wiki]SniperLock[/wiki] keep your ship lined up on target after you lined up once by hand. I think it can be a big help for novices but maybe considered to an uber addon by others. ClymAngus wrote in the SniperLock topic: "additionally we require an autopilot.oxp and autotrade.oxp in order to turn oolite into a proper screen saver."
Life savers: [wiki]Auto_eject_OXP[/wiki], [wiki]Energy_Equipment_OXP[/wiki], [wiki]Repair_Bots_OXP[/wiki], [wiki]Retro_Rockets_OXP[/wiki] or [wiki]Hired_Guns_OXP[/wiki].dan3008 wrote:save my life
-
- Average
- Posts: 13
- Joined: Tue Apr 29, 2014 7:13 pm
- Location: HMS Zion, a small ship where I am captin
Re: Dogfight computer
I dono, I find the fights rather tedious. I quite enjoy just trading and doing delivery missions. besides, I never said that the computer would be good. End of the day, skill and determination would be able to outdo a computer, not even a contestSmivs wrote:Ha, there is a good reason for that! Whatever 'career' the player adopts, one thing remains constant, and that is that the real fun in the game is getting into a mean and dirty dogfight from time to time if you 'automated' it you would take away the best bit of the game.
You wouldn't build a robot to take care of your love life for you, would you?
attacked, defended myself, now i'm the fugitive. How was i supposed to know that other ship was a galcop...
- Diziet Sma
- ---- E L I T E ----
- Posts: 6312
- Joined: Mon Apr 06, 2009 12:20 pm
- Location: Aboard the Pitviper S.E. "Blackwidow"
Re: Dogfight computer
That's the nice thing about Oolite.. "Your Ooniverse, your way.." and if that's what floats your boat, there's bound to be others out there who feel the same way. So I say, go for it!dan3008 wrote:I dono, I find the fights rather tedious. I quite enjoy just trading and doing delivery missions. besides, I never said that the computer would be good. End of the day, skill and determination would be able to outdo a computer, not even a contestSmivs wrote:Ha, there is a good reason for that! Whatever 'career' the player adopts, one thing remains constant, and that is that the real fun in the game is getting into a mean and dirty dogfight from time to time if you 'automated' it you would take away the best bit of the game.
You wouldn't build a robot to take care of your love life for you, would you?
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
-
- ---- E L I T E ----
- Posts: 607
- Joined: Wed Feb 20, 2013 1:24 am
- Location: Aboard the D.T.T Snake Charmer: My Xanadu
- Contact:
Re: Dogfight computer
Right on Dizzy! };]
Personally, Sniper Lock is a life saver when flying by keyboard! I would have stopped playing long ago without it!
Personally, Sniper Lock is a life saver when flying by keyboard! I would have stopped playing long ago without it!