4 ms·
Here's a real example from a project I worked on in my homebrew ECS framework and later implemented in Godot: a guided missile. In the ECS project the notion o
by EamonnMR 6y ago
Here's a real example from a project I worked on in my homebrew ECS framework and later implemented in Godot: a guided missile.
In the ECS project the notion of 'thing that can run into other things and do damage' so totally separate from the notion of 'thing that is driven around by AI.' So adding guidance to an existing projectile wasn't too much of a pain. In the Godot project I'm dealing with networking as well, so the division is between fire-and-forget projectiles (derived from Bullet) which know about hitting things and doing damage, and AI driven Ships with AI or player driven movement which needs to be synced over the Network. In that case I had to copypasta the AI driven movement code into a 'guided' class under Bullet. That said, for almost every other task, Godot's composition first model has been way easier to work with, especially because it lets you test elements in isolation. Here are the two projects if you'd like to compare the code:
Homebrew ECS framework on top of the babylonjs engine: https://github.com/EamonnMR/Flythrough.Space https://github.com/EamonnMR/Flythrough.Space
Godot with networking:
https://github.com/EamonnMR/mpevmvp https://github.com/EamonnMR/mpevmvp