Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 9 10 11 [12] 13 14 15 ... 19   Go Down

Author Topic: New flight sim project  (Read 53319 times)

0 Members and 6 Guests are viewing this topic.

benitomuso

  • SAS Team
  • member
  • Offline Offline
  • Posts: 2587
  • P.A.L.
Re: New flight sim project
« Reply #132 on: October 22, 2014, 08:10:37 PM »

Hey Stainless, I found this as well!

http://forum.unity3d.com/threads/unityfs-flight-simulation-toolkit.171604/



Yes, it looks as a very powerful tool. Its an Add-On editor for UNity:



Costs $75, but I don't know what happens with what you generate from there. Can be applied on a mid-layer imlpementation of Unity as this simulator in the way?
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: New flight sim project
« Reply #133 on: October 23, 2014, 03:04:46 AM »

It's very nice, but I would have to study it to see if it does all the things we need.

The first thing that springs to mind is that I can't see all of you paying $75 for a tool just to get your mod into another game.

And I don't want you to have to rework the mods at all to get them into my game, works straight out of the box is my design premise.

I do want you lot to be able to ENHANCE your mods. Normal maps are one thing I really want to get in as well as ambient occlusion.

Just the addition of those two techniques will bring the visual look of the mods into this century.
Logged

benitomuso

  • SAS Team
  • member
  • Offline Offline
  • Posts: 2587
  • P.A.L.
Re: New flight sim project
« Reply #134 on: October 23, 2014, 07:37:49 AM »

All the videos I saw of Unity flight simulation (except the one here over which is the best by far) are quite awful. Horrible landscapes, horrible runways, very crude and rough graphics, etc. Is that only a consequence of basic implementations of the people who created those videos?

Regards,
                  Pablo
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: New flight sim project
« Reply #135 on: October 23, 2014, 09:21:46 AM »

Pretty much.

I doubt I'm going to use unity for the final game, but at this stage I want to produce "something" that is useful.

So being able to view a mod in 3d on a web page is the first thing that sprang to mind.

Using Unity can do that pretty quickly and no one has to buy anything.

It also allows me to get the feel for Unity and decide if I want to work with it.
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: New flight sim project
« Reply #136 on: October 24, 2014, 02:52:13 AM »

Had a bit of an epiphany last night.

I've been writing a complex XML based system that basically converts xml tags into code so you can mod all aspects of an aircraft. Horrible code, xml is awful and doing things in a way that is efficient yet flexible is a nightmare.

I was sat on the train and realised I was writing total bollocks. You guys are used to doing stuff in Java, so doing stuff in C# is going to be easy for you.

Especially as I can give you a whole suite of methods to make life easier.

From my part I can compile C# on the fly, so you can just put the C# class file in a directory and the game will load it.

This has taken code like this .....

Code: [Select]
<system name="FCS-roll">

  <channel name="Roll">

   <summer name="Roll Trim Sum">
      <input>fcs/aileron-cmd-norm</input>
      <input>fcs/roll-trim-cmd-norm</input>
      <clipto>
        <min> -1 </min>
        <max>  1 </max>
      </clipto>
   </summer>

   <aerosurface_scale name="Left Aileron Control">
      <input>fcs/roll-trim-sum</input>
      <range>
        <min> -0.35 </min>
        <max>  0.35 </max>
      </range>
      <output>fcs/left-aileron-pos-rad</output>
   </aerosurface_scale>

   <aerosurface_scale name="Right Aileron Control">
      <input>fcs/roll-trim-sum</input>
      <range>
        <min> -0.35 </min>
        <max>  0.35 </max>
      </range>
      <output>fcs/right-aileron-pos-rad</output>
   </aerosurface_scale>

   <aerosurface_scale name="left aileron normalized">
      <input>fcs/left-aileron-pos-rad</input>
      <domain>
        <min>-0.35</min>
        <max> 0.35</max>
      </domain>
      <range>
        <min>-1</min>
        <max> 1</max>
      </range>
      <output>fcs/left-aileron-pos-norm</output>
   </aerosurface_scale>

   <aerosurface_scale name="right aileron normalized">
      <input>fcs/right-aileron-pos-rad</input>
      <domain>
        <min>-0.35</min>
        <max> 0.35</max>
      </domain>
      <range>
        <min>-1</min>
        <max> 1</max>
      </range>
      <output>fcs/right-aileron-pos-norm</output>
   </aerosurface_scale>

  </channel>

</system>

and reduced it to this.....

Code: [Select]
    UpdateAileron_cmd_plus_trim(0.35);

You will have a set of these functions UpdateAileron_cmd() is the base and just takes the joystick input and scales it to the range -1 to 1, UpdateAileron_cmd_gain(double gain) another.

You get the idea.

Also the actual values used my the engine will be exposed, so if you have a really complicated fly by wire system it can be coded in C# and just work.
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: New flight sim project
« Reply #137 on: October 26, 2014, 02:57:24 PM »

I've put a test view of the F4 mod here http://stainlessbeer.weebly.com/uploads/3/2/9/6/3296541/webversion.unity3d

Can't publish it on my site, doesn't work.

Any body willing to get it working?
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: New flight sim project
« Reply #138 on: October 29, 2014, 08:53:37 AM »

Nobody?  Oh well.....

Progress report


Implemented
  • Engines - piston and turbine (more to come)
  • Thrusters - propellers and vectored thrust (more to come)
  • Fuel Tanks - liquid and solid propellent
  • Basic flight control systems

Questions
  • Do we want a fuel management system?
  • Do we want manual engine startup procedures?


The fuel management system would allow you to transfer fuel from tank to tank while in flight. A lot of modern aircraft have this.

Dumping fuel in emergencies I think needs to be implemented anyway.

I am writing automatic engine startup procedures, just need to know if we want all the extra inputs required to do the same thing manually. Remember it can take 10 minutes to start engines in real life.

Logged

Herra Tohtori

  • Modder
  • member
  • Offline Offline
  • Posts: 671
Re: New flight sim project
« Reply #139 on: October 29, 2014, 06:12:47 PM »

I've put a test view of the F4 mod here http://stainlessbeer.weebly.com/uploads/3/2/9/6/3296541/webversion.unity3d

Can't publish it on my site, doesn't work.

Any body willing to get it working?

I haven't really used the Unity SDK so I might be doing something wrong but I couldn't get that thing to work. Tried importing it as a package, opening it, etc. No joy.

Personally I would definitely want to see fuel XFER and engine startup procedures, with an option for automatic management so it doesn't overwhelm people who have no interest in learning such stuff, or distract them from enjoying the sim.
Logged

DD_BadAim

  • member
  • Offline Offline
  • Posts: 372
Re: New flight sim project
« Reply #140 on: October 29, 2014, 06:59:18 PM »

I've been watching this thread with interest almost from day one. Today I think I might have something useful to say. We'll see. If it's not to much work, it might be nice to have three levels. One) Full on realistic flip every switch, twist every knob, etc  Two) Basically realistic, but simplified to the point where you don't have to learn specific start up procedures for 300 planes, but where you have to do the basics, like manage your tanks and mixture and RPMs and the like (sort of in between IL2 and DCS). Three) Automated.

I'd say that if only two options are practical I'd go for Two and Three. I think most simmers would go for slightly more realism like fuel controls and more realisric mixture and Prop controls, but having to learn and perform the intricacies of all of the planes would get old pretty quick for most of us methinks.

That said, it would be cool to do "The full Monty" on your favorite planes.
Logged

Chaoic16

  • Modder
  • member
  • Offline Offline
  • Posts: 930
Re: New flight sim project
« Reply #141 on: October 29, 2014, 07:44:31 PM »

Nobody?  Oh well.....

Progress report


Implemented
  • Engines - piston and turbine (more to come)
  • Thrusters - propellers and vectored thrust (more to come)
  • Fuel Tanks - liquid and solid propellent
  • Basic flight control systems

Questions
  • Do we want a fuel management system?
  • Do we want manual engine startup procedures?


The fuel management system would allow you to transfer fuel from tank to tank while in flight. A lot of modern aircraft have this.

Dumping fuel in emergencies I think needs to be implemented anyway.

I am writing automatic engine startup procedures, just need to know if we want all the extra inputs required to do the same thing manually. Remember it can take 10 minutes to start engines in real life.

Stalinless,

What is truly best approach to this is to create two types of gameplay features:

1) Non-Complex management version: It doesn't involve having to manage fuel, pitch, mixture, temperature, and everything else manually, it is already taken care for any era of aircraft.

2) Complex Management version: It involves full realism for any era specifically where you must do full hardcore procedures before taking off, in-flight, and landing.

The reason why it is a must to include both version is because of this reasons:

Not everyone is hardcore simulation players - I am one of these who TRULY enjoy flying aircraft with basic control for AC (Short for aircraft) without worrying about complex management.  That is why in IL-2 1946, I turned "Engine complex" off, so I just jump into aircraft, start up engine by one button to enjoy automatic start up process and then take care of flap, air brake, landing gears, arrest hooks, trimming, and other basic surface control and only focus on unique flight character of each aircraft.  At the same time, I also have control of weapons in simple ways and that is how I really enjoy IL-2 1946.  If IL-2 1946 were full of hardcore simulation features only without 'simplified" feature, I would have not been here in first place.

By the way, I also turned off high speed stall in IL-2 1946 (by disabling "Stall" in option) since my speaker for my gaming pc is broken now and I can't feel the vibration of plane shaking (by high bass in my subwoofer from my sound tweaking) when approaching high speed stall in dogfight, I would snap into violent spinning or unstable jinxing of aircraft in IL-2 1946.  In case you wonder why the hell am I using speaker to help me with dogfighting, it is because I am deaf so hence i can't tell if plane is approaching to 'edge' between unstable and stable part of hard turning in dogfight.  (I only play offline for your information).

So my point is, there are many who prefer both Non-Complex and complex version of engine/fuel management, so it would be wise to include both, in my honest opinion after 17 years of simming.  More flexible your simulation is, as IL-2 1946 have for flight model, engine management and other option tweaking, the better simulator will be suited for everyone individually.
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: New flight sim project
« Reply #142 on: October 30, 2014, 08:06:12 AM »

I've put a test view of the F4 mod here http://stainlessbeer.weebly.com/uploads/3/2/9/6/3296541/webversion.unity3d

Can't publish it on my site, doesn't work.

Any body willing to get it working?

 It's  a built executable for unity web player.   I put the source code into my site but it doesn't work


The source code is ....

Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Unity Web Player | HIMViewer</title>
<script type='text/javascript' src='https://ssl-webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/jquery.min.js'></script>
<script type="text/javascript">
<!--
var unityObjectUrl = "http://webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/UnityObject2.js";
if (document.location.protocol == 'https:')
unityObjectUrl = unityObjectUrl.replace("http://", "https://ssl-");
document.write('<script type="text\/javascript" src="' + unityObjectUrl + '"><\/script>');
-->
</script>
<script type="text/javascript">
<!--
var config = {
width: 960,
height: 600,
params: { enableDebugging:"0" }

};
var u = new UnityObject2(config);

jQuery(function() {

var $missingScreen = jQuery("#unityPlayer").find(".missing");
var $brokenScreen = jQuery("#unityPlayer").find(".broken");
$missingScreen.hide();
$brokenScreen.hide();

u.observeProgress(function (progress) {
switch(progress.pluginStatus) {
case "broken":
$brokenScreen.find("a").click(function (e) {
e.stopPropagation();
e.preventDefault();
u.installPlugin();
return false;
});
$brokenScreen.show();
break;
case "missing":
$missingScreen.find("a").click(function (e) {
e.stopPropagation();
e.preventDefault();
u.installPlugin();
return false;
});
$missingScreen.show();
break;
case "installed":
$missingScreen.remove();
break;
case "first":
break;
}
});
u.initPlugin(jQuery("#unityPlayer")[0], "Build.unity3d");
});
-->
</script>
<style type="text/css">
<!--
body {
font-family: Helvetica, Verdana, Arial, sans-serif;
background-color: white;
color: black;
text-align: center;
}
a:link, a:visited {
color: #000;
}
a:active, a:hover {
color: #666;
}
p.header {
font-size: small;
}
p.header span {
font-weight: bold;
}
p.footer {
font-size: x-small;
}
div.content {
margin: auto;
width: 960px;
}
div.broken,
div.missing {
margin: auto;
position: relative;
top: 50%;
width: 193px;
}
div.broken a,
div.missing a {
height: 63px;
position: relative;
top: -31px;
}
div.broken img,
div.missing img {
border-width: 0px;
}
div.broken {
display: none;
}
div#unityPlayer {
cursor: default;
height: 600px;
width: 960px;
}
-->
</style>
</head>
<body>
<p class="header"><span>Unity Web Player | </span>HIMViewer</p>
<div class="content">
<div id="unityPlayer">
<div class="missing">
<a href="http://unity3d.com/webplayer/" title="Unity Web Player. Install now!">
<img alt="Unity Web Player. Install now!" src="http://webplayer.unity3d.com/installation/getunity.png" width="193" height="63" />
</a>
</div>
<div class="broken">
<a href="http://unity3d.com/webplayer/" title="Unity Web Player. Install now! Restart your browser after install.">
<img alt="Unity Web Player. Install now! Restart your browser after install." src="http://webplayer.unity3d.com/installation/getunityrestart.png" width="193" height="63" />
</a>
</div>
</div>
</div>
<p class="footer">&laquo; created with <a href="http://unity3d.com/unity/" title="Go to unity3d.com">Unity</a> &raquo;</p>
</body>
</html>
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: New flight sim project
« Reply #143 on: November 06, 2014, 02:12:13 AM »

I've made a lot of progress and have a working design in place.

Aircraft are created as a single C# file which is compiled at run time. I decided on this model because it gives modders massive amounts of leeway to play.

The aerodynamic model uses this interface.

Code: [Select]
#region Aerodynamics
        public abstract double CLalpha();       // lift due to alpha
        public abstract double dCLflap();       // lift due to flaps
        public abstract double dCLsb();         // lift due to speedbrakes
        public abstract double CLde();          // lift due to elevator deflection

        public abstract double CD0();           // drag at zero lift
        public abstract double CDi();           // induced drag
        public abstract double CDmach();        // drag due to mach
        public abstract double CDflap();        // drag due to flaps
        public abstract double CDgear();        // drag due to gear
        public abstract double CDsb();          // drag due to speed brakes
        public abstract double CDbeta();        // drag due to side slip
        public abstract double CDde();          // drag due to elevator displacement

        public abstract double CYb();           // side force due to beta

        public abstract double Clb();           // roll moment due to beta
        public abstract double Clp();           // roll moment due to roll rate
        public abstract double Clr();           // roll moment due to yaw rate
        public abstract double Clda();          // roll moment due to aileron position
        public abstract double Cldr();          // roll moment due to rudder

        public abstract double Cmalpha();       // pitch moment due to alpha
        public abstract double Cmde();          // pitch moment due to elevators
        public abstract double Cmq();           // pitch moment due to pitch rate
        public abstract double Cmadot();        // pitch moment due to alpha rate

        public abstract double Cnb();           // yaw moment due to beta
        public abstract double Cnr();           // yaw moment due to yaw rate
        public abstract double Cndr();          // yaw moment due to rudder
        public abstract double Cnda();          // adverse yaw
#endregion

You have to create all of these functions for an aircraft to fly.

I of course will create a default set of aircraft, and a casual modder can just cut and paste from my code and have an aircraft flying in a few minutes.

However if you have the time and the skill you can create an incredibly accurate model.

It also allows for special case aircraft.  Variable wing geometry, no problem. Future tech like antigravity, no problem. It really is up to the modder.

I have extended this model to everything. So you can set up the keyboard mapping on a per aircraft basis.

I also have in a zoom mode. Zoom mode allows you to display any part of the cockpit full screen. The display code goes in the aircraft file, so you can customise all of these views as well.

This means you can have really realistic start up and flight management systems, because you can have clickable regions of the display and define what they do yourself.

Again I will have done some aitrcraft myslef so you can cut and paste code to get you started.

Getting interesting
Logged
Pages: 1 ... 9 10 11 [12] 13 14 15 ... 19   Go Up
 

Page created in 0.027 seconds with 24 queries.