Jump to content
COMBATSIM Forum
Toumal

Stealth: A retro-style F117A simulator

Recommended Posts

Looks like he didn't make it back from Rome. :(

A pity, since this was looking promising. Now, it's back to waiting for Falcon 5. :)

Share this post


Link to post
Share on other sites

Oh I am busy working on the game, don't worry! I've started on the OPFOR C3 network simulation, which is just a fancy way of saying that I aim to reproduce the "bomb triggered AAA" phenomenon of the first iraq war, where the first destroyed target caused all the defenses in the vincinity to start firing more or less blindly. I'm extending that to radar detections, however brief, causing your trajectory to be relayed to nearby defenses. In essence, AAA will be very deadly if they get a bead on you, but also worrysome if they just have an approx position.

There's two major items that I've been procrastinating until now: Generating ground features / targets, and floating point precision.

The first one I'm trying to address now via real life data. I've been asked multiple times for realistic location and terrain data, and well...

qfdC1x0.png

The textures will be replaced by a splatmap system, so they're just for illustration. But I've got the whole of Iraq:

[Linked Image]

I've also been able to significantly reduce system requirements. But as you can see, real terrain elevation is a lot less interesting than my procedurally generated terrain, especially for the southwest of Iraq which is mostly flat desert. On the plus side I can now draw from real data and derive the positions of airbases, air defenses at the time of the start of the war, as well as roads. For the sake of gameplay, I will not model the actual base location of the F117-A's at that time, because that would involve a trip across the entirety of Saudi Arabia, complete with mid-air refueling. A single mission would take 5-7 hours, which I don't think is what I want to aim for here. Similarly, I am not going to even try to compete with games like DCS when it comes to fidelity of ground features. 

The second big thing I'm tackling right now is really the bane of simulator game developers all over the world: Floating point precision. Simply put, no traditional game engine is designed for handling game areas that are more than 10 - 20 sq km in size. We're in the hundreds of square kilometers and the result is that airplane physics, collision detection and all kinds of other things start to go horribly wrong once you leave the center area. The reason is simply that float32 values start to lose a lot of precision once you go beyond a certain range. Right now I'm busy on making sure that this limitation is not affecting the game in any way. I've got the basics working for singleplayer, but I still need to put in work to make this compatible with multiplayer.

Share this post


Link to post
Share on other sites
19 minutes ago, Toumal said:

The second big thing I'm tackling right now is really the bane of simulator game developers all over the world: Floating point precision.

Have you tried just using double precision?

  1. 10 km from the origin, singles give you precision of 1 cm (closest neighbor of 10'000.0 is 10'000.0009765625)
  2. doubles have that precision even at magnitudes of Sun-Neptune distance (closest neighbor of 5'000'000'000'000.0 is  5'000'000'000'000.0009765625, which is 33 Astronomical Units)

The reason I never used it for TFXplorer was cache locality and SIMD throughput, but if you’re on Unity, that’s hardly a thing to care about :) 

Share this post


Link to post
Share on other sites

Unity does not support double precision unfortunately. That would make things much easier for me. I have to work around that sadly.

EDIT: BTW love TFXplorer, looks amazing! 

Share this post


Link to post
Share on other sites

Ah yes, the map dilemma. I was posting about this on another thread last week.

I think it's good to have the cities and major geographic features in roughly the right place, but not worth trying to fill in more detail than that except for specific targets. The 'crossed swords' statue in F15 Strike Eagle III springs to mind here.
The last time I looked at free height data, it was the SRTM30 dataset, which your picture reminds me of. If I was clever, I'd maybe look at the OpenStreetMap and use it as a base for procedural terrain feature generation based on its zones. Unfortunately, I'm not. :(
...and OpenStreetMap may not be that accurate, as anybody can edit it. I've just built 100 miles of motorway. :)

Share this post


Link to post
Share on other sites

@Toumal: Thanks! When will we get a playable demo of Stealth?

@Mike: The quality of OpenStreetMap here in Europe is quite good. At leasts that’s what my neighbor says – he likes to improve the data sets in his spare time. There is one advantage to it that just can’t be dismissed: Once you integrate it, crowd intelligence will improve the roads over time. No other work for us than upgrading the dataset and DING, instant realism :)

Share this post


Link to post
Share on other sites

Unfortunately OSM doesn't seem to have much data on Iraq. I hope to get the roads in at some point, but eh. Right now I'm battling with getting a decent terrain texturization. And also the floating point stuff is a bit tricky to get working in multiplayer, so that's holding me up a bit too.

You'll get a demo as soon as one can fly a full mission, including placement of ground features, mission success criteria, terrain impact damage, proper death handling, and of course the floating point stuff fixed.

Share this post


Link to post
Share on other sites

7 bucks for a DOS game that had DRM added to it? I don't think so. Plus it's just 2 Euros on GOG, without DRM. A no-brainer, if you ask me.

Share this post


Link to post
Share on other sites

Yeah, seven bucks my ###!

Also, a correction: They released the game on Steam three years ago. At least some reviews are dated to November 2014.

I was more interested in the technical details; i.e. did they bundle it with a DOS emulator? The reviews on their Falcon 4.0 re-release are in part very negative; stating that it doesn’t even install properly.

Share this post


Link to post
Share on other sites

What I do know is that GOG comes with dosbox, which basically means they work even for people with no technical skills. Of course you don't get MT-32 emulation or any of that fancy stuff preconfigured, but you can always add that yourself (as well as hunt for those roland firmware files...)

Share this post


Link to post
Share on other sites

Since we're on that topic I bought it on GOG and it's still just as good as I remembered it. :)

Playing it with an X-Box 360 Joypad and the Quick Reference card on my secondary monitor.

Share this post


Link to post
Share on other sites

I have some bad news. For the time being, I have decided that using real terrain data is out of scope for me. I'm still the only guy working on this and in the past month I've learned that there's definitely a large amount of overpromise and overconfidence in the Unity community. Lots of assets that promise solutions just plain don't work, or only work in a few select cases, with their authors promising the world and being able to deliver very little. To give you an example, I've worked on double precision stuff for quite some time, and Unity doesn't support double precision. So you have to implement workarounds to get this working. I had such a workaround written myself but ran into issues with multiplayer. I found an asset that was quite expensive and the author stated that they have this working in multiplayer too.

 

Lo and behold, turns out they never even thought this through, and not only does it not work, they haven't even considered the problems that I ran into the moment I tried to use it in multiplayer. So as it turns out I'd have to replace most of unity's network code with my own, and frankly I'm not going to do that. 

 

So for now, I'm dialing this back to what I had originally planned: A procedurally generated world with a limited mission area. Unless of course someone experienced wants to join and help me tackle this. 

Share this post


Link to post
Share on other sites

Thanks for the update!

 

Yes, using real world data is probably more trouble than it's worth.

 

In the world of TFX (which was a contemporary of F-117) the basic unit is a tile about 5km square. Each theatre is a 200x200 grid of these tiles giving a 1 million sq.km map with sides 1000km.

Theoretically, it should be possible to pick a centre point of interest on the planet, then use some projection (I was looking at Universal Transverse Mercator) to calculate the WGS-84 coordinates to be able to scrape OpenStreetMap, SRTM etc for data that can ultimately be used to provide a new set of tiles. These new tiles would be in the game's cartesian coordinate system and basic at first, but 'pinned' to WGS-84 so that more detail could be used as technology progresses.

 

Not that my fantasizing about this stuff helps your project though. :)

 

Share this post


Link to post
Share on other sites

Oh I have the data and all that. It's just that unity isn't built for this, and the typical workarounds only work for singleplayer. The reason is simple: Most workarounds involve shifting the world origin, or rather, all the objects in the world, so that whatever you see in the game happens close to the 0/0/0 point. This works fine and dandy, but there's two problems:

 

1) You need to shift by a round number, because of floating point precision. So that means that each tile has to be a round number. And getting real world data in is trouble enough, but it seems like there's no good way to ensure that each imported terrain tile is sized just right so that shifting things around doesn't leave holes or overlaps or otherwise jitter around.

 

2) Unity networking knows nothing about the shift offset. So whenever I shift, the result is that position updates from the server are coming in as real coordinates, and are applied to objects directly. I tried hooking into the code to apply the shift afterwards, but that didn't work, and the only solution I can see is to have a set of ghost objects that are invisible which are handled by unity networking, and copy the positions plus offset to the real objects. But that's a can of worms.

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×