Flight simulator

I’ve been playing around with some rendering techniques and made this simple demo:

FlightSim.hex (35.9 KB)

Code is here:

It’s completely broken in the embedded emulator for some reason :cry:
It seems to work in the standalone version of ProjectABE :thinking:

What it should look like:

Works in Firefox, just broken in Chrome apparently?


Really interesting, I wonder how much is left to be able to make a game using this.


Amazing, what rendering technique is that please? Mode 7?

Are you planning to share this engine? :slight_smile:

The code is currently a bit of a mess but I can clean it up and share it if there is interest. There is plenty of RAM / program memory left for gameplay but not many CPU cycles.

I guess that the rendering technique is essentially ray tracing? For each pixel it casts a ray which either hits the ground plane (when y < 0) or the cloud plane (when y > 0) and then based on the intersection location it looks up into a texture to see what colour it should be


Really very nice, I’m surprised full raycasting runs so fast, even though it’s only quarter of the screen resolution (if I noticed correctly). I’d love to see the code, even if messy. Maybe it could be optimized to run in full resolution.

Works for me. Do you get an error?

No error reported but the rendering is all messed up:

This is using desktop Chrome Version 76.0.3809.100 (Official Build) (64-bit)

Appears to work ok in mobile Chrome

1 Like

I’ve uploaded the code to github here:

An updated demo, now running at ~30FPS:
FlightSim.ino.hex (47.4 KB)

There are several different render modes which can be cycled through by pressing B:

  • Quarter resolution with interpolation hack (default)
  • Quarter resolution
  • Half resolution
  • Full resolution

One thing that I’ve noticed is that due to the dithering pattern, it isn’t really noticeable to run at any higher than quarter resolution! (Other than causing it to be slower to render)


This reminds me a lot of MS Flight simulator that I had on my 80286 in yellow and black :grinning:


13 posts were split to a new topic: Trouble uploading on Mac

Dude I missed this too, you are amazing.

1 Like