See site in english Voir le site en francais
Website skin:
home  download  forum  link  contact

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

Author Topic: Latest DGII coding news part 2 (closed)  (Read 14105 times)

0 Members and 1 Guest are viewing this topic.

Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #25 - 15 January 2004, 09:36:40
And the latest work:

Now the O2/Pressure and the crew response to it is acurately modeled
(the graph image was already showed sometime ago but there was no
code behind it)

The triangle is you current desired selection and the two blue line show the current
level of O2/pressure. If they cross in the red or blue section you are in hypoxia or
hyperoxia and with the current warning sound you hear also a breath sound.

If you reach the black section everyone is dead.

The checklist will include reducing the pressure and increasing the O2
in critical flight phase like take-off in order to minimize the risk.
(low pressure = less trouble if something happen to the hull)

The graph data where taken from nasa.



  • Guest
Reply #26 - 15 January 2004, 17:35:26

Are you trying to build the most greatest add-on for Orbiter or just looking for help BUSH to reach
MARS....... :-)

DGII is becoming more advanced that any other add-on that i have tried..... even more than Star
Trek movie ships....


Release it man


Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #27 - 15 January 2004, 18:04:03
oh no, there is only 1/4 of the feature It would be possible to add,
and half the lower panel is still empty  ;)
I think there is not much more things than last release appart the fact that all work
again and that you have the smoke. Other things are minor update I think.

Anyway I should add 3,4 things more and I may release an alpha without
doc update.

release Date depend if I run in trouble or not.



  • Guest
Reply #28 - 15 January 2004, 18:57:21
Idea for the future:

Maybe add some random system failures...

like a cooling system failure, a fuel leak, an air leak, hidraulic problems(no gears, forcing a smooth
landing or death), cone stuck, right engine failure, some rcs failure, electrical system bug...etc...

So many things to make it more exciting...

Ideas just ideas...

Offline bgreman

  • Jr. Member
  • **
  • Posts: 34
  • Karma: 0
Reply #29 - 15 January 2004, 20:15:22
I believe that was the original intention of Dan when he started the DGII project:  To include
failures of varying intensities at varying times.   Was my most looked-for feature, as it would add a
goal system to orbiter:  Have a problem, fix it.


Houston...we've flushed our toilet.

Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #30 - 15 January 2004, 20:15:42
this idea float in my mind since a long time...
but failure that occure "at the good time" aren't so simple to do
doing a simple random failure can't do the job. it should leave you
with some option to escape this situation else there is no fun.



  • Guest
Reply #31 - 15 January 2004, 20:50:54
I dimly remember the conversation talking about this way back when....Dan, can you elaborate on
why you don't think simple random failures would be a bad idea?  I envisioned random failures
such as follows:

--Halfway through the ascent to orbit in the DG3, the autopilot fails.  You have to manually steer to

--While in orbit, the O2 tank starts emptying at a high rate.  In 1 hour your O2 runs out.  Do you
try to make it to a station?  Or emergency landing somewhere?

--Hull Puncture: cabin pressure starts to drop.  Solution?  Pump in extra O2 to try and maintain

Things like this would be really fun if they happened randomly.  If someone wanted to use the DG3
without having failures, have a checkbox in the DG3 config program for "Enable Random Failures".  
Underneath, have a setting for "Failures per 100 hours" or something similar.

How does that sound?  Is it possible to program this stuff?



  • Guest
Reply #32 - 15 January 2004, 21:02:59
By the other thought just occurred to me regarding the DG3.  Would it be possible to
release two versions--one with normal fuel capacity, to be used primarily for Earth/Moon missions;
and one "long-haul" version for deep interplanetary flight, which has much more fuel aboard (extra
fuel tanks)?  I know this can be manually done by editing the scenario files, but I think it would be
neat to just release two versions (this goes back to your "class" idea, Dan--"Luna" class
and "Jovian" class spacecraft, maybe?)

If so, I'd colour them differently and maybe name them differently *hint hint* LOL



  • Guest
Reply #33 - 15 January 2004, 21:46:41
Simply outstanding Dan! I think it is really neat that you have opened up your creativity to input in
the forum. Orbiter just wouldn't be the same without Dan's creativity and vision. As someone that
uses multiple monitors and computers for running simulations I would like to see in the future the
ability to undock some of the additional instrumentation views so that systems could be
designated to a dedicated display. This would alow us to build glass cockpits instead of switching
from one view to another. It would also allow more than one person to monitor systems and such.
But I am willing to wait for Orbiter to evolve to this stage. I wish I had the programing know how
to make a contribution. Thanks again Dan for all your hard work.


Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #34 - 15 January 2004, 22:42:13

Dave wrote:
I dimly remember the conversation talking about this way back when....Dan, can you elaborate on
why you don't think simple random failures would be a bad idea?

Sure :)
The problem is in the "random" himself
if it's a true random let's see what happen:

--Halfway through the ascent to orbit in the DG3, the autopilot fails. You have to manually steer to

if it's random you may have problem during your 3 next flight (boring?)
or perhaps never. or also 3 time the same failure.
Also random: both engine broke in orbit, so did the o2 tank, the landing gear etc etc
no luck today...

--While in orbit, the O2 tank starts emptying at a high rate. In 1 hour your O2 runs out. Do you
try to make it to a station? Or emergency landing somewhere?

Again random mean it can happen at anytime... half enroute during your long trip
for mars for example...   ;)  (CTL-Q)

Well, you get the point a complete random failure is simple to do but
really boring to play with, things will broke at the wrong place with the wrong frequency.

What is needed is an "inteligent" failure that will do what you want :
a failure that occure where it would be possible to recover it.
a failure that happen not so frequently and not always the same.
Just enough  to put you in trouble but not too much so you don't die without any chance,
...a subtle mix in fax and plain random can't do that.
(see game where monster are randomly picked ... boring)

For this we should record some kind of failure history to not always send the same
and with a good "frequency" beetween the different flight so you are still surprised.
This would give a table with the possible failure for the current flight (failure
 that didn't occured already, time since the last failure)
We should also know where we are (orbit, surface, before landing, deep space) and
what failure would be possible here (No O2 tank broken or hole in the hull half way
in a 2 years trip to jupiter)

This would give also a second table of possible failure here.

We mix both table, THEN we can add the random here:
it's your lucky day ? no ? there is a long time since the last failure ?
then randomly pick a failure that is showed as "available" in the final table.

Things can be more complex also, once a failure occure we compute again
the table, the choice of failure will be reduced but can allow a a SECOND
failure that occure....  
"Nice, I was able to reentry after my O2 tank broke.. pfeee just in time,
now I just need to land... DAMN no landing gear also..."

Than you may have 10 flight without problem and the 11th an autopilot
failure during ascent.

Most intteresting, a third table with how you did fly in the past:
do you like heavy G reentry ?, nice ! you end with a weak hull that
will surrely fail.
Your landing are hard ? lets broke the landing gear during
next flight.
You love hovering and make a lot of landing from 4000 meter vertically
only with it ?  I bet they would be tired in the real life,
Let's see what you will think about an hover engine that fail at 500 meter
high .

Random can't do all this, really.

The cost will be beetween 500 and 2000 line of code and a lot of time to test.

Anyway I'm thinking often about it... this can add some intterest.
but my todo list is really full already.

I'm a bit tired tonight sorry for my english ;)

PS: you have already a configurable fuel and engine power
see the "Latest DGII coding news part 1" thread there is an
image of the dgIIconfig.exe with those feature added.

PS2: John, we don't have access to "dockable" view this should
         be done by martin himself.

Offline canadave

  • Hero Member
  • *****
  • Posts: 531
  • Country: Canada ca
  • Karma: 0
Reply #35 - 15 January 2004, 23:34:41
Roger, copy all that Dan :)  I withdraw my eager push for failures =D

You raise another interesting point in your response though.  How about killing the crew if the
landing speed is too high?  Program logic would run thusly:

When vspd=0 (meaning the craft has landed), check the last vspd;
If vspd > [whatever number you choose to make the death threshold...say, 10 m/s) then post
message: "Crew died! Landing speed too high."  If vspd < 10 m/s post message: "Great landing!"

Or has this already been modeled?  I can't remember....


Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #36 - 16 January 2004, 00:00:42

About Vspeed it's already here speed>20ms= death

About horizontal speed, it's planned but less rough than just dying:
speed>250 (900kmh) = Collapsing main gear ! (perhaps 200m/s only)

mhhhhh :wonder: :wonder: :wonder: gnnnnnn...... :wc:

PLONK !!!! here come another idea based on yours:
why not three wav recorded that will play after the landing
somethink like:

-"Good job commander, nice landing"
-"common Mr Moron your landing was crappy"
-"too bad, your dead, we cannot sue you to get
   back the 10 billion of the ship you just wrecked"

Well perhaps something more "official" but with a pint of humour
if he crash or do a bad landing....

Dave ready do record this ? ;)
I can then threat them to give a "radio" feeling.



  • Guest
Reply #37 - 16 January 2004, 01:36:31
[...things will broke at the wrong place with the wrong frequency.]

HMMMM... random is possible, maybe... but should be very very rare... not set by time, maybe by
mission... doesnt matter how long is the mission ll take

First mission...ok no the moon
Second mission...ok no mars
Third mission...ok no problem... back to earth
Fourth mission...ops hydraulic failure at the end of the ISS...aborted
Fifth mission...ok no ISS
10ª mission... Rcs failure at the beggining of the mission, on take venus...ship almost lost in
space, but landed back in safety

The frequency says all, very rare... it ll give credibility to the ship...

A problem to my small brain: how to define 1 mission, once you can turn of orbiter and continue

If I said some dumbshit, please, correct me...just trying to help thinking

Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #38 - 16 January 2004, 11:20:37
hi Prand,

It's only that your random isn't the same than computer's random ;)
your brain choose a cool case by instinct
Computer will choose more often wrong things than you.

If you choose very rare failure then you can be sure it will choose more wrong...
in a million km trip how many chance you have that the infamous O2 tank
broke near a base so you can return ?

And I bet that after experiencing 3 unfair failure anyone will disable this feature.
it would simply be like a blue screen of death:
you was playing nicelly then... stop ! try again ! insert coin! no chance !

The goal isn't to kill the player, this is too easy , the goal is to challenge
him, give him fun. Where is the fun when your two engine stop in a midle
of a trip or you get a hole in the hull in the midle of a 2 years trip ?

Statistically unless your always in LEO you expense many more time
in deep space than near a base... you don't feel it because you warp
at 10'000 but the computer don't care about that.

Anyway I'm puting some code right now for failure, no excitation
it's only "situation" failure as gear collapse when rough landing
but the code will be already here to fail various systeme.

he he I will have also some use of the "blue screen of death" created
month ago for the computer. (I recall that without computer there is no
autopilot that work even "killrot" or "normal+" are disabled, you may try
to reboot it while setting the main power on/off but there is no garantee)



  • Guest
Reply #39 - 16 January 2004, 13:02:29
I agree with you!

I was just trying to find another way, easier than write 2000 lines of program
(imagining how many work it ll take, poor dan)

A chalenge to fix is great, but I was thinking that some times the problem just dont have a solution
(like Columbia :sad: ).

Well by the way, is already a great work and I think that you have lots of work to do and already
many things to program, lets leave the "failure system" away by now.

Was great to talk about.



Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #40 - 16 January 2004, 13:45:05
he he, well I'm not doing a complete failure system but I'm currently
adding some surprise in this domain....

Now you may pay more attention to your flight/landing/docking
if you do not perform well somethings may get wrong and you
may loose one or more system. The DGIII will be less forgiving
than the II.

When this part of code will be ready if will render easier and eventual "random"
failure system. You cannot imagine how many lines I should add to
completely block a system for example for the autopilots there it at
least three way to engage them x8 autopilot=24 parts of code to block.
So once done I'll just have to call one function to set a failure eg:
SetFailure(LANDINGGEARCOLLAPS,TRUE) will take care to set the
warning light, play a warning sound,collapse it
and block the key so you cannot deploy it anymore.

My test now are full of Warning sound and flashing light :)


Offline jgrillo2002

  • Full Member
  • ***
  • Posts: 130
  • Country: United States us
  • Karma: 5
Reply #41 - 16 January 2004, 15:05:50
there called "Stop Errors" dan :wonder: . but what the heck, good idea :applause:

Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #42 - 16 January 2004, 15:14:15
DeltaGliders, Dragonflies, Shuttle As, these spaceships will reach the stars above.

Taken there is not too much failure :)

OUCH !!! That was a rough landing,

main engine, hover, landing gear, flight computer, autopilot,
this one will not fly anytime soon again.

Time to call the 18 ? what you think ?

"where is my pilot license ?"

Offline glObalist

  • Jr. Member
  • **
  • Posts: 74
  • Karma: 0
Reply #43 - 16 January 2004, 16:11:00

about the "random" failures, I understand pretty much everything you say. It really is complicated.
So it occured to me, why not then have at least an option (in the dgsetup launchpad) to select
THIS and THAT particular failure to happen roughly at THIS and THAT time of the scenario I'm going
to play. Not random anymore, but user-defined failures. Of course, you'd have to be familiar with
and follow closely the scenario you're defining the failures for. For example, you shouldn't
select "fire all rotation rcs thrusts at random rates (@simulation time 3512145s)" and then wait for
this to happen while sitting at the Cape. There's no point. Instead, you set it to happen when
you're ready to do your deorbit burn- you quit the scenario, set the failure to happen in 10min,
load scenario and look forward:)

What do you say?

"Wherever you go, there you are. Wherever you are, there you orbit."

Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #44 - 16 January 2004, 17:24:00
There is a long time I think about those failure things
and it's pretty clear now in my head.

My opinion is that there is about no fun in a planned
failure so I wont bother implementing this.

Implementing some timer that will trow a failure at a given time
and also make a whole interface to let user pick one failure
bore me a max, I find this really not intteresting to do and it may
take me more time to do the interface than coding an "intteligent"
system. (ie: there is no challenge here)

But implementing a kind of IA that will decide how it can put the
player in trouble but-not-too-much make me enthousiast :)  
I'll see how my coding goes and decide if I implement this or not.


Offline canadave

  • Hero Member
  • *****
  • Posts: 531
  • Country: Canada ca
  • Karma: 0
Reply #45 - 16 January 2004, 22:45:29
Dan, maybe you could have some sort of coding logic that says something like "no failures occur
unless the spacecraft is within X kilometers of a base"!


Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #46 - 16 January 2004, 23:25:06
Sure, that's it... sort of.

In fact it's easy to know what the player is doing:

atmospheric flight
Low Orbit
high Orbit
deep space

this give us six state that will decide which failure may occure.
for Orbit we can also watch the ecc, ped and apd
to see what the player plan to do.

this give us one axis of the table the other axis contain the failure

so we have for example (faked):

-------------------------Left engine--right engine--autopilot--O2--- etc etc
atmospheric flight------- Y---------------Y---------------N-------Y
Low Orbit------------------Y---------------Y---------------Y--------Y
high Orbit----------------- N--------------Y---------------Y--------N
deep space--------------- Y-------------- N---------------Y-------N

We just need now to pick the right failure for a flight phase.
To decide at wich time it may occure we need an history of the past failure
and perhaps how the pilot fly (smooth or hard ?)
well this is a part of the idea.



  • Guest
Reply #47 - 17 January 2004, 02:10:46
I have an idea for the death sound. Its not humorous, but it'd be pretty realistic.

After the crash sound you hear flames and the traffic controller yelling something urgent about you
crashing, then you hear sirens fade in representing the firetrucks rushing to your location.  Add in some
flames(orange/red to gray smoke) and it'd be great.

Also, seeing as you can break the ship and kill yourself, I think that a working ejector seat is in
order. Blow off the canopy and have the pilot blast out of there with a parachute. Only for use in the
atmosphere ofcourse, it'd aleast give you a chance to bail if you misscalculated and fired your hover
engines too late or something(assuming no failures).

As for the passengers. Uh, they were dummies, I swear.

Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #48 - 17 January 2004, 03:22:19
Sound like a cool idea, :)

About ejection I already thought about it but there is much problem/time
to do this.

mhhh new skin ? :doubt:

"time to go to bed....."


  • Guest
Reply #49 - 17 January 2004, 16:20:26
I have some ideas concerning the simulation of failures. It shouldn't be a simple random checking
loop, as it would be braindead and similar to the "boom you exploded" kind of error.
It think there should be some sort of random loop, but it should as you mention take account to
various things/ making it dependent on the pilot and more realistic. If the spacecraft is undergoing
a stressfull manuever, the chances would rapidely rise, and the total stress should be taken into
consideration, so if it doesn't brake during the ascent, it would have become a bit weaker.
And the errors should be dependent on the enviroment, so if you are ín transfer, no dramatic
damages would happens at a regular basis, Structural damage is perhaps more logical during
ascent/descent, and so on.

Very well.. :) :beer:

The deltaglider is so versatile so it's a ship I use very often, and it has become much more fun
after your implentations, so keep up the good work! :top: :applause: