simple shooter

Xantcha

Addon Developer
Addon Developer
Joined
Mar 26, 2008
Messages
203
Reaction score
0
Points
0
Just found my first orbiter vessel I have made, thought that it can be interesting for someone else, so I put it here.

It's a simple addon that adds an arcade shooter into orbiter environment. It features my favorite craft - shuttlePB with a cannon :)
Start a mission, shoot at enemies, gain scores, avoid counterfire. And remember that shuttlePB has VERY powerfull yaw motors - use them to your advantage.

P.S. Flying to the moon is cheating :)
P.P.S. - N to cycle through targets, space to shoot.
 

Attachments

  • fighterpb.zip
    117.5 KB · Views: 67
Last edited:

computerex

Addon Developer
Addon Developer
Joined
Oct 16, 2007
Messages
1,282
Reaction score
17
Points
0
Location
Florida
Very, Very nice!
You need to:

1. Release the source so we can see how you managed to create a basic AI!

Possible bug:

To avoid death, just land. AI stop chasing you.
 

Xantcha

Addon Developer
Addon Developer
Joined
Mar 26, 2008
Messages
203
Reaction score
0
Points
0
What do you mean "tell us how to shoot?"

And about sources - it was my first project and my writing skills were not very bright (not that they are very good now, just better than what was before) So I'm a bit ashamed of them - may be after some clening up.

And about "AI" - first I wrote routine for attitude autopilot (with ShuttlePB's powerfull RCS it was easy) so I can set desired heading and pitch for bots.
The behavior itself is very simplistic: When player is out of range, set attitude so that it points directly towards player. When in fire range - set it so that it aims at fire point (same algorithm that is used in player's HUD for showing aiming helper). And thats it :)
No teamwork, no evasive action. Bots are not even even trying avoid hitting land. And of course it only works in atmosphere and only when player and bot are within visual horison range.
But still - it works, bots can follow player and shoot at him with acceptable precision. Besides it's just fun to see someone (even a stupid bot) flying in orbiter with you. makes atmosphere less lonely and brings some action :)
 

astrosammy

Dash!
Addon Developer
Donator
Joined
Apr 27, 2008
Messages
2,124
Reaction score
0
Points
36
Location
ICAO ID: EDFB
It sounds like a cool Addon,
but I can't get it working :(. I can't see the PB's, and can't control it.
 

computerex

Addon Developer
Addon Developer
Joined
Oct 16, 2007
Messages
1,282
Reaction score
17
Points
0
Location
Florida
What do you mean "tell us how to shoot?"

And about sources - it was my first project and my writing skills were not very bright (not that they are very good now, just better than what was before) So I'm a bit ashamed of them - may be after some clening up.

I forgot to read your post script, and could not find anything in the zip package to tell me how to shoot. So as you can see, I was lost. :) As for your code not being clean, whose is? Forgive me, but programmers aren't know for being elegant. ;) It's always good to release the source code so others can learn from it. I learned pretty much all I know about Orbiter add-ons from looking at examples, so I release all my sources so others can do the same.


Excellent idea BTW. I was hoping to do something like this myself, but I couldn't get anywhere near yours with my elementary math knowledge. It would be really really nice if you could adapt this to the DG. They look more like the "fighter" type. :)

It sounds like a cool Addon,
but I can't get it working :(. I can't see the PB's, and can't control it.

Perhaps Xan. compiled using an express edition of Microsoft's VC++ compilers? If so, you need to install the VC++ 2005 runtime components or VC++ 2008 runtime components depending on the compiler he used to compile this. If he compiled using a professional editon, he could link statically in order to get rid of this dependency.
 

Xantcha

Addon Developer
Addon Developer
Joined
Mar 26, 2008
Messages
203
Reaction score
0
Points
0
Yes, used VC2008 Express to compile it. Sorry for not mentioning it.
2 Computerex> Are you sure there is no way to get rid of that dependency in express version?
 

Xantcha

Addon Developer
Addon Developer
Joined
Mar 26, 2008
Messages
203
Reaction score
0
Points
0
EDIT: updated attachment in 1st post, tried to change compiler settings - hope this can allow to run addon w/out installing runtime environment
 

astrosammy

Dash!
Addon Developer
Donator
Joined
Apr 27, 2008
Messages
2,124
Reaction score
0
Points
36
Location
ICAO ID: EDFB
It's working for me now...
Strange... I thougt I have the runtime enviroment.
:thankyou:
 

Zatnikitelman

Addon Developer
Addon Developer
Joined
Jan 13, 2008
Messages
2,302
Reaction score
6
Points
38
Location
Atlanta, GA, USA, North America
WOW That was awesome! I really liked it! Too bad you can't map the joystick trigger to the fire button, but don't get me wrong, I Freaking loved it!!!!!
 

computerex

Addon Developer
Addon Developer
Joined
Oct 16, 2007
Messages
1,282
Reaction score
17
Points
0
Location
Florida
Yes, used VC2008 Express to compile it. Sorry for not mentioning it.
2 Computerex> Are you sure there is no way to get rid of that dependency in express version?

As far as I know, VC++ 2005 express edition was not able to link statically, therefore requiring you to link dynamically, and having the runtime dependency. Weather or not Microsoft changed that in VC++ 2008 express editions, I don't know, I haven't had a chance to try out the express edition.
 

Xantcha

Addon Developer
Addon Developer
Joined
Mar 26, 2008
Messages
203
Reaction score
0
Points
0
Thanks for kind words. Glad that it works and that it is interesting for someone else.

2 computerex> ok, I'll try to clean up the code a bit and will post it here.

About adapting it to DG - the way addon is done is very inflexible. It will require some work to change that. And of course I'm interested in that. I'd like to make it more universal and add ability to use existing vessels, add some depth and game modes.
Just not very soon :)
 

astrosammy

Dash!
Addon Developer
Donator
Joined
Apr 27, 2008
Messages
2,124
Reaction score
0
Points
36
Location
ICAO ID: EDFB
I renamed "atlantis.msh" to "ShuttlePB.msh" and now I have this: :lol: :lol:
Unbenannt.jpg
 

Woo482

Moderator
Moderator
Addon Developer
GFX Staff
Joined
Feb 13, 2008
Messages
3,048
Reaction score
20
Points
78
Location
Earth?
:rofl::rofl::rofl: thats funny :)
 

RangerPL

Addon Consumer
Joined
May 25, 2008
Messages
345
Reaction score
0
Points
16
Location
Soviet bunker on Pluto
"Atlantis, Houston. WE'RE TAKING HEAVY FIRE, OUR WINGMAN JUST GOT SHOT DOWN AND OUR LEFT OMS IS MALFUNCTIONING, NEED BACKUP!"

or

SBM-126 (Shuttle Bombing Mission)

"Atlantis, Houston, bombs away"
"Hahaha :censored: insurgents"

*couple minutes later just north of Baghdad*

(Arabic)
"Look a shooting star"
"Make a wish"
*hears whistling of the bomb on its terminal dive*
"OMG holy :censored: BOOOOM"
 

Xantcha

Addon Developer
Addon Developer
Joined
Mar 26, 2008
Messages
203
Reaction score
0
Points
0
Just tried it mysef - that's really funny. Now, beware of circlestrafing killer-shuttles!
Very cool idea, Astrosammy.
 

astrosammy

Dash!
Addon Developer
Donator
Joined
Apr 27, 2008
Messages
2,124
Reaction score
0
Points
36
Location
ICAO ID: EDFB
I also tried it with MMU and DG, but it's hard to hit a little target like MMU.
 

Coolhand

Addon Developer
Addon Developer
Joined
Feb 7, 2008
Messages
1,150
Reaction score
7
Points
0
Website
www.scifi-meshes.com
Awesome, definately something that should be expanded upon to include more vessels and broaden the capabilty of the AI. Easier said than done though i'm sure. I've love to see non player ships in orbiter, trundling around the solar system, trying to blast me out of the sky...:) Great fun addon as it is though! keep up the great work.
 

DanP

New member
Joined
Mar 23, 2008
Messages
64
Reaction score
0
Points
0
Wow, this is so much fun!

If you intend on developing it, I think the next step should be ground collision detection. Limited ammo could be easy to implement too... Refuel and rearm the ship upon landing... Just ideas. Very cool addon indeed!
 
Top