A real-time ballistic solver for moving targets under drag (C++)
Hi HN, I’m sharing a small open-source project I’ve been working on: a native C++ ballistic solver that computes launch angles to intercept moving targets in real time, under gravity and air drag. Instead of relying on vacuum assumptions, closed-form equations, or lookup tables, the solver formulates the intercept as a nonlinear problem and solves it numerically using time integration and iterative methods. The motivation came from game and simulation scenarios where simpler approaches tend to break down: - moving targets - strongly curved trajectories due to drag - real-time constraints The…
What it does
In the maker’s words, at launch
Hi HN, I’m sharing a small open-source project I’ve been working on: a native C++ ballistic solver that computes launch angles to intercept moving targets in real time, under gravity and air drag. Instead of relying on vacuum assumptions, closed-form equations, or lookup tables, the solver formulates the intercept as a nonlinear problem and solves it numerically using time integration and iterative methods. The motivation came from game and simulation scenarios where simpler approaches tend to break down: - moving targets - strongly curved trajectories due to drag - real-time constraints The solver simulates projectile motion (RK-style integration), tracks the closest approach to the target, and iteratively adjusts the launch direction until an intercept is achieved. It’s written in C++ and exposed through a stable C ABI, so it can be used from environments like Python or game engines (e.g. Unity) without rewriting the core logic. Project page: https://github.com/ujinf74/ballistic-solver I’d be very interested in feedback, criticism, or discussion around the numerical approach, performance trade-offs, or edge cases I might have missed.
Does the same job
all alternatives →- PEPermafrost Engine – OpenGL 3.3 Real Time Strategy Engine in C2018 · github.com · ▲144
- OSOpen source balloon simulation with Three.js2019 · alexanderperrin.com.au · ▲307
- CXCygnus-X1 – A Thrust Vectoring Model Rocket Flight Computer2020 · github.com · ▲124
- MAMeatshields – An in-browser turn-based strategy game2017 · ▲113
A few months ago (82 days to be exact!) I posted a link on HN to my game, Meatshields. A bunch of you commented and played my game and gave me some wonderful feedback. Over the last few months I've been playing with many of you and implementing the best of everybody's suggestions. So, thank you, HN for all your help! I feel this is an extreme overhaul I couldn't have done without your input. Since then, I have: Dramatically improved our hosting platform (So it HOPEFULLY won't go down this time (oops.)), Added two new units, Rebalanced all existing units, Added many more maps, Improved the…
- B3BepuPhysics – 3D real-time physics simulation library in C#2019 · github.com · ▲108
- TATack, a fast lightweight scripting language for games and embedding2023 · github.com · ▲6
https://github.com/PlumeCat/tack Hi HN! Tack is a scripting language I've been working on sporadically for the past year or so, and intensely for the past few weeks. It originated out of a desire for something that was like Lua, but with a more familiar syntax, and without some of the other surprises in Lua such as the 1-indexed tables. It's also been a great learning project, and a very satisfying challenge! While the current version is early beta at best, I hope to continue working on it and maybe see some adoption. Despite the relative lack of optimization, I'm very…
More dev tools this month
the category →



Open-source GTM skills for technical founders
Dev tools · 29d ago · gtmcofounder.com

OpenTrailPaper is open-source bike computer firmware for the LilyGO T5S3 4.7" E-Paper PRO. It supports offline maps, GPX routes, FIT recording and Bluetooth sensors.
Dev tools · 1d ago · opentrailpaper.com

Launched alongside, January 2026
the whole month →- IN
Hey HN! I wanted to share something I built over the last few weeks: isometric.nyc is a massive isometric pixel art map of NYC, built with nano banana and coding agents. I didn't write a single line of code. Of course no-code doesn't mean no-engineering. This project took a lot more manual labor than I'd hoped! I wrote a deep dive on the workflow and some thoughts about the future of AI coding and creativity: http://cannoneyed.com/projects/isometric-nyc
AI · Jan 2026 · cannoneyed.com




Automatic AI-powered code reviews the moment you open a PR
Dev tools · Jan 2026 · kilo.ai
