Hacker news

  • Top
  • New
  • Past
  • Ask
  • Show
  • Jobs

WebGL Flight Simulator with seed generated terrain (https://baron.by.dai.studio)

232 points by ranger_danger 5 days ago | 68 comments | View on ycombinator

kqr 4 days ago |

I'm surprised how well this handled. I usually have large complaints on the flight dynamics in projects like these, and for this (in expert mode) they were not that large. Of course, it's no X-Plane, but I'm trying to keep in mind what sort of project it is. In a good blend of arcade and simulation, it should be a toy that is easy to get into, but someone who has simulator experience should also feel at home and not run into counter-intuitive dynamics.

I suppose I am a little surprised the biplane was able to loop on its own power from level flight.

Interaction-wise, I would have liked

- to be able to invert the Y axis on the mouse control! Nuts that this alternative is not included.

- a vertical speed gauge all the time, not just when the simulator thinks I'm about to land.

- go-arounds to be handled more gracefully, rather than as a very long landing.

- a trim control on the mouse wheel to set the airspeed. (And then the mouse control could keep returning to centre, at least in expert mode.)

- a toggle for opting out of metric units, and instead using more customary knots for speed, feet for altitude, feet per minute for vertical speed etc.

- pre-tuned navigation radios (or even just VFR charts) as an optional replacement for arrows in the sky.

With these changes (and possibly more I think of later) this could be a really fun way to get children into flight simulation, since it's so action packed.

diverted247 4 days ago |

Here is the design https://dai.studio/ted/ex-baron that was used to generate the "baron" flight simulator.

Source: https://github.com/dai-studio/ex-baron (BSD 2-Clause)

Each typed element in the design describes detailed aspects of the game. This is the primary "Context" element. Just select an element to see it's schema/data.

"Baron is an arcade biplane game set in a WWI-inspired, cartoon world. The player builds their aircraft in the hangar, takes off from an airfield, flies over a procedurally generated landscape under procedurally generated clouds, and lands again. There is no combat. Pillars: (1) Flying feels great: quick to learn, satisfying to master. (2) A readable, cheerful cartoon look: toon shading, ink outlines, bold colours. (3) Every flight is different: a seed generates terrain, clouds and airfields. (4) Instant play: opens in a browser tab with no install."

Try pasting the raw diagram into an agent, here is the prompt...

"Build https://dai.studio/ted/ex-baron/raw"

You won't get the identical game but all the specified details will be there in the end result. If you swap out some key dependencies... Unreal Engine vs three.js, you will get some wild result. Have fun and post your results. :)

rossng 4 days ago |

How funny, I have been vibe coding a little paper plane folding and flying simulator this weekend and the agent picked a very similar visual style

https://www.rossng.eu/paper-flight/

aflag 4 days ago |

I think the interesting to know would be how much it cost to build and how much prompting was necessary. Overall it doesn't look like anything that I wouldn't be able to get by just prompting claude in claude code

blaze33 4 days ago |

First WebGL game I tried where my joystick works out of the box, very nice!

I knew it was possible (Gamepad API [1]) but never bothered to code it for my WebGL experiment (that was before ai) although I did buy again the same joystick I had as a kid, the sidewinder precision pro [2], which is certainly the oldest usb device I still use today (released ~30 years ago).

[1] https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API... [2] https://en.wikipedia.org/wiki/Microsoft_SideWinder#Precision...

pampas 4 days ago |

It's really fun but please please add a legend of the keyboard shortcuts I can see while playing.

hypertexthero 4 days ago |

As a flight simulation fan since playing Sopwith years ago, I really liked this!

Good flight feel, nice graphics, nice typography!

Feature suggestions:

+ Missions to deliver letters to random points on map.

+ Damage modelling so you get more points the more pieces remain attached to the plane on landing.

+ Trim control on arrow keys (up arrow for elevator down, down for elevator up, left for rolling left, right for rolling right).

+ Option to have obstacles like bad weather, birds, kites, other planes, including ones armed with paintballs or other projectiles that cause localized damage on your plane or obscure your view from behind the plane with paint or smoke.

+ Ability to move camera around the plane with mouse and zoom in and out with scroll wheel.

+ Better sound overall, especially less repetitive sounds for engines.

+ “Roguelite” progression where you get to keep unlocked perks, with random missions and events (https://hypertexthero.com/roguelite-flight-sims/)

+ Mission and plane editors.

+ Controller support.

I’d buy this on Steam or Itch.

nodesocket 4 days ago |

Ok this is actually pretty awesome. Avid Flight Simulator player. While this clearly is not that, it's surprisingly fun to play with a hint of realistic flight.

em3rgent0rdr 4 days ago |

CTRL-S (slow engine while going up) causes my browser to try to save the webpage, fyi. Cute graphics and feel.

niwrad 4 days ago |

This is fun. However, I couldn't figure out how to bring the throttle back down.

dvh 4 days ago |

Make rotating phone dialog skipable.

simonjgreen 4 days ago |

Love it! I'm especially impressed how well this works on mobile. My feedback:

- Don't auto correct roll back to level (or make it a toggle)

- Ability to change units (eg f vs m)

- Toggle to disable the auto-rudder

- Charts and some for of radio nav as an option rather than the path through the sky

I like the choice of licensing, might have a poke around as this is a really cool little project :)

alfonmga 4 days ago |

Excellent. I wasn't expecting it to work that flawlessly on Safari, based on my previous experience with vibe-coded AI games, but it does. Also, this is what I consider good and useful marketing. I like your DAI Studio project, a tool like that makes sense, and I can see myself using it.

piloto_ciego 4 days ago |

This was fun. I would like the ability to trim and retract the gear on the bigger machines other than that 10/10.

hn_submit 3 days ago |

Please switch the flaps up and down keys. They are currently counter intuitive since you need to push the V (lower positioned key) for up and F (higher positioned key) for flaps down.

Onavo 4 days ago |

And if you want an option with realistic crash physics and graphics there's

https://www.reddit.com/r/vibecoding/comments/1xwdvhf/im_a_hu...

sheepscreek 4 days ago |

I don't know if OP founded dai.studio, but if they did - they would do well to post the DAI/AI graph that generated this game. This will allow people to get a taste for their tool without needing them to invest their time (lower the entry barrier).

undefined 3 days ago |

undefined

indigo945 4 days ago |

Using the Ctrl key for a common control (here: decelerate) in a WebGL game is bad design. This game also makes use of W, which is asking for accidents.

uzerfcwn 3 days ago |

I tried to land the plane by reducing throttle (ctrl) and pointing the nose down (W) and promptly recalled that ctrl-W closes the tab.

voidfunc 4 days ago |

Pilot Wings 64 vibes. Keep working on this, I'd probably be willing to pay $10 for a decent Pilot Wings clone.

wahern 4 days ago |

This reminds me of Corncob 3D, the DOS shareware game. All it lacks are aliens to shoot at.

justinhj 4 days ago |

I'd love if this generated terrain based on google maps and a position

lazybean 4 days ago |

Looks cool!

I'll need to try again, I failed to take off.

I notice the back flap is going into the road.

modinfo 4 days ago |

Interesting! make fun! also nice to have /?debug with settings :D

leetrout 4 days ago |

Like an updated corncob 3d! Source available anywhere?

Can you add rudder and elevator trim?

footoverhand 4 days ago |

Very fun, thanks for posting! Daughter really interested in it :-)

jedbrooke 4 days ago |

wow, this runs pretty well on my old iphone, and controls were fairly intuitive. Nice job!

_joel 4 days ago |

Sound jump scare

Choad_20261104 4 days ago |

Fun

patrick_rtk 4 days ago |

very nice game !

undefined 4 days ago |

undefined

chiengineer3 4 days ago |

Chitown26.com

somid3 4 days ago |

Can we get multi-player with a machine guy?

greggman65 4 days ago |

There are tons of seed generated examples from Claude (and others)

Here's mine:

https://greggman.github.io/gen-city-auto/ (430k, 4 cites, tons of vehicles, trains, signs, water, bridges, rain, road details) - video for highlights: https://x.com/greggman/status/2117605120745881692

https://greggman.github.io/cyber-web-city/ (200k, 10 cities themes) - video for highlights: https://x.com/greggman/status/2109451367941378213

https://greggman.github.io/webgpu-driving/ (170k - 10 environments, several vehicles, tunnels) - video for highlights: https://x.com/greggman/status/2104533425478930568

https://greggman.github.io/webgpu-aquarium/ (102k - several fish, different ocean styles)

note: iOS in particular is really slow to start up these.

Maybe it's all AI slop. None of them are fun games, they're just tech demos.

The interesting things are they are all small. All assets are built at startup. They aren't using any libraries. That suggests there is lots of low-hanging fruit for quick to start web-games.

Telling the LLM to build from scratch and follow AAA practices frees the LLM to use whatever is appropriate, rather than whatever some library dictates. The LLM was also good at optimizing, at least to an extent. It would run experiments, turning features on/off to find where the speed was going. It would also do A/B screenshots to see how much changing techniques effected the output.

Each demo from prompt to first output took 2-3 hours and then a few prompts in my free time to clean up the most outstanding issues.

One thing that helped a bunch was telling the LLM to model cars using NURBS instead of polygons. Another was telling it to have a separate modeling agent, and a separate judging agent.

None of the demos are perfect. They got to a point where I was happy that they showed want I wanted to see. I wasn't planning to take them to perfection. The gen-city-auto demo has the most issues. While it made a giant city, there are lots of places where a road makes no sense. I could prompt through that but all I really wanted to see was a GTA like city in a small amount of code and for that it proved the concept is valid. Given ways for a designer to declare what they wanted where I could see the concept generate much more "designed" cities.

briancarterio 4 days ago |

[dead]

schuhwerk 4 days ago |

[dead]

aislophater 4 days ago |

Oh wow, ai slop that is barely the same quality as the first iphone apps. This site is garbage. Thanks to AI the talentless finally have a voice. Whoopie.