this post was submitted on 25 Sep 2023
11 points (100.0% liked)
Game Development
3430 readers
7 users here now
Welcome to the game development community! This is a place to talk about and post anything related to the field of game development.
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Well, firstly you need to decide how accurate you want your wind modeling to be, but generally, the less complicated an equation you can use for your desired level of accuracy, the better. It'll end up being a vector field, but I would probably make simple rules for how the wind interacts with objects in a given tile and the tiles around it, rather than trying to model fluid dynamics precisely.
Another approach might be a ray-tracing style approach, where the rays can bounce off object geometry and lose some momentum, objects can respond to ray impacts and gain momentum, and you do some vector math to figure out what happens when rays and moving objects intersect.
The exact approach depends on the specifics of your game, and the "right" answer might be neither of these.