Page 1 of 4

Station Defense Minigame

Posted: Wed May 30, 2012 4:38 pm
by Commander Xvyto
I'm trying to learn about coding oxp's and I had an idea for one. Essentially, there is a research station in the middle of nowhere (perhaps behind the sun) that the player can dock with. Then, a mission screen comes up, saying that you must launch and defend the station from pirates/political enemies. You launch, and the game will spawn several waves of attackers. Some will be assigned with destroying the station, and others with killing the defenders (you, and several NPCs).

My questions are:
1. How would one create a station behind the sun on a specific planet? (spawning location: planet and in-system)?
2. Spawning enemies/NPC allies with specific AIs (AI assignment and writing, spawning ships)

Re: Station Defense Minigame

Posted: Wed May 30, 2012 5:05 pm
by Okti
Commander Xvyto wrote:
1. How would one create a station behind the sun on a specific planet? (spawning location: planet and in-system)?
I can help you on those, but Xenon a little warning authoring oxp's is addictive :D. Just PM me.

Re: Station Defense Minigame

Posted: Wed May 30, 2012 6:37 pm
by Smivs
Okti's right...once you take your first step on the Path of OXPs, there is no turning back. They will devour and engulf you, and everything else in your life will become un-important. :P
Having said that it's great fun and you will learn a lot and will get a great sense of satisfaction from your creations.
Welcome to the ranks of The Lost Souls. :D

Re: Station Defense Minigame

Posted: Wed May 30, 2012 6:48 pm
by Cody
Smivs wrote:
Okti's right...once you take your first step on the Path of OXPs, there is no turning back. They will devour and engulf you, and everything else in your life will become un-important.
<this semi-retired test pilot smirks> It's somewhat on the darkside alright! I'll fly the darkside in-game, but I stay well away from OXP'ing!

Re: Station Defense Minigame

Posted: Wed May 30, 2012 6:55 pm
by Smivs
El Viejo wrote:
... but I stay well away from OXP'ing!
There was one lapse old chap! :wink:
El Viejo is made of sterner stuff than most of us...he took The Path, but then returned relatively unscathed! :)

Re: Station Defense Minigame

Posted: Wed May 30, 2012 7:06 pm
by Cody
El Viejo wrote:
I don’t make OXPs, but if I did… The Green Gecko is based on Griff’s Gecko, and I am greatly indebted to him for his help, as I am to several other people (all credited in the readme), from whom I have begged, stolen, and borrowed the constituents of this OXP… all I did was imagine, instigate and assemble it.
Hmm... I stand by my previous statement! Although I did tinker with a plist or two, I admit!

Re: Station Defense Minigame

Posted: Wed May 30, 2012 7:08 pm
by Smivs
<Smivs chuckles merrily>

Re: Station Defense Minigame

Posted: Wed May 30, 2012 7:13 pm
by Cody
It is a lovely boat though, is the Green Gecko! Goes to show that if a dumb pilot such as I can assemble that, then you should have no trouble making OXPs, Xenon!

Re: Station Defense Minigame

Posted: Wed May 30, 2012 7:44 pm
by Commander Xvyto
It is a lovely boat though, is the Green Gecko
If a bit deadly. :twisted:

Re: Station Defense Minigame

Posted: Wed May 30, 2012 8:27 pm
by Smivs
To wander back on-topic...
Commander Xvyto wrote:
2. Spawning enemies/NPC allies with specific AIs (AI assignment and writing, spawning ships)
This is relatively easy. I say relatively because you will need to learn how the game uses javascript (and of course pick up a bit of js if you don't already know any), and also how the games' AIs work.
With a bit of time and effort this is within the grasp of most people...even me!
The wiki is the source of information on these matters. Here for the js, and here for the general OXP how-to which includes a section on AIs.
A good start though will be digging into the innards of the core game where you will find lots of examples of AIs in particular, looking at the scripting in OXPs which do similar things to what you want, and of course as the work progresses there is a wealth of knowledge and experience here on the Board. :)

Re: Station Defense Minigame

Posted: Wed May 30, 2012 11:30 pm
by JazHaz
Commander Xvyto wrote:
a mission screen comes up, saying that you must launch and defend the station from pirates/political enemies. You launch, and the game will spawn several waves of attackers. Some will be assigned with destroying the station, and others with killing the defenders (you, and several NPCs).
This happens in Random Hits OXP. You can be docked at a space bar when alarms ring and there are pirates attacking the bar. You and several other ships launch and take on the attackers.

So its already been done, and done well.

Re: Station Defense Minigame

Posted: Wed May 30, 2012 11:32 pm
by Commander Xvyto
So its already been done, and done well.
I know that. I'm just using the idea for learning oxp creation.

Re: Station Defense Minigame

Posted: Thu May 31, 2012 8:44 am
by Disembodied
Commander Xvyto wrote:
I know that. I'm just using the idea for learning oxp creation.
I don't think the suggestion was that, because it has been done elsewhere, you shouldn't do it too – rather that you should take a look at how Random Hits does it, and modify that to suit your needs, instead of starting from scratch. No sense reinventing the (dark) wheel! ;)

Re: Station Defense Minigame

Posted: Thu May 31, 2012 9:00 am
by Smivs
Some of my best work started life on somebody else's computer.

(Anon)
:D

Re: Station Defense Minigame

Posted: Thu May 31, 2012 12:00 pm
by Commander Xvyto
No sense reinventing the (dark) wheel
I dunno. For me (at least in programming) I've learned better not by copying stuff but writing it myself, because it forces me to understand.