FPV drone simulator

Updates: implemented fisheye and motion blur. I think with the FPV camera that adds a lot of authenticity. For the TPV camera, the motion blur effect does not consider that the drone is stationary with respect to the camera so it gets blurred heavily but I already know how to fix that.

Next steps are fixing that and also moving the physics into a worker so it does not depend on graphics performance anymore.

It’s already possible to tweak every bit of physics and control by cloning the repo, hosting it locally and editing the configs but I want to make that more convenient with onscreen lil-gui and applying changes right away without reloading.

EDIT: drone is no longer motion blurred! However, the background that shines through the props is also no longer motion blurred which looks a bit weird. But you probably wouldn’t have noticed if I didn’t tell you but here we are, nothing we can do about it now. :stuck_out_tongue:

Is there a way to look around the drone? I find it a bit challenging to orient myself with only the forward view and a small playground to find.

All in all, I would feel better if you created a real sandbox where the playground is sitting on flat ground. You could add 3d trees to the landscape - like my medium poly tree (Aviation/scenery/models/tree.glb at 0abf7c192d40099c2ee13ceedde9c5e2a67e8c61 · PhilCrowther/Aviation · GitHub) to add depth.

Since you will not be flying long distances, you could create an entire landscape in Blender which could include your playground in the center. I have seen this done for flight sims (on YouTube) and they can be either very simple (flat) or very complex (with 3d terrain).

I removed the orbit controls because they are super ugly to use with a moving object. The levels so far are just for testing, I downloaded them from sketchfab, I’m not much of a 3D artist. I hope people contribute maps at some point :stuck_out_tongue: But yeah I can add a ground and some trees.

I think adding the ground and trees will eliminate a lot of the need for orbit-type controls. Once the ground is added, if I lose track of the swing set, I will know it’s altitude and will only need to determine the direction, which I can do by rotating the drone horizontally. You could add cues in the land or sky that will help with directions. But, for now, it doesn’t need to be anything fancy.

Physics now runs in a worker so the update rate is independent from graphics.
Also I’ve added more scenery for @phil_crowther :stuck_out_tongue: (80MB)

Didn’t use your tree tho, it doesn’t have a license.

I will really need someone to design a proper map at some point :smiley:

1 Like

There is now a new map with actual missions! You can fly through all rings or try to find all 8 red coins, I mean 12 pink balloons.

The last step is to make the config tweakable while the game is running instead of requiring a reload. Then I am going to tell drone people on reddit about it and ask for help tuning parameters.

2 Likes

We use WASD because fps champion Dennis “Thresh” Fong popularized it for Quake, and therefore every similar game that came after. A lot of advantages, but especially good thumb/pink access to spacebar and modifier keys.

My understanding is that WASD was not used much before then, so I’d love to know how you were using it in the 80s.

While I would like to say I was ahead of my time, I don’t remember when games started using WASD as the default. I will accept the idea that Dennis Fong was the first ca 1996.

But note that, in Quake, you had to use the keyboard and the mouse. One was used for rotation and the other was used for longitudinal (forward and back) and lateral/strafing (left and right) movement. In an interview, Fong said that he preferred to map the rotational commands to the mouse because he needed more precise control. He did not need this precision for longitudinal and lateral movement. In those days, the default was to map the keyboard commands to the arrow keys. But he realized that there were big advantages (especially for right-handed players) to using the WASD keys.

So I guess I share his belief that rotational commands should be mapped to the mouse, rather than to the keyboard because the mouse allows you more precise control.. Since airplanes do not move laterally, I am able to map all of the basic controls to the mouse. In addition to rotation, I map the throttle to the mouse wheel and the lesser-used rudders to the mouse buttons.

For my helicopter simulation (which might be similar to a drone), things work a little different. The mouse wheel still controls the throttle, which means that (on my simplified helicopter controls), the mouse wheel basically controls vertical movement. The mouse movement controls your direction. At low speeds, a helicopter can move horizontally. But at higher speeds, weather-vaning causes the helicopter to behave more like an airplane.

So, if possible, I would also suggest using the mouse in a similar fashion for a drone. But I am not enough of an expert on the mechanics of drone flight to know if that is possible.

Sorry for the treatise. But I wanted to explain that there is a method to my madness and a reason for my preferences.

And thanks for correcting my understanding of history. Things were happening so fast in the 80s and 90s that it is easy to get confused. (And for a lot of that time I was using an Amiga, rather than a PC.)