They are objects with a reference to the gun that fired it and everything it could possibly interact with in the game and indeed the game itself. How else is it going to have a “shoot()” method with no arguments?
Gamasutra fortunately is mostly written by actual professionals.
> […] for a moment I feared a solution that every bullet should be an object.
Why not, if you use the flyweight pattern?
Is that really a problem outside of large scale RTS games like Supreme Commander? I would be surprised if something like Counter Strike would see more than maybe a few dozen concurrently flying bullets in any possible situation.
Just fyi. I thought counter strike didn't used projectiles but used raycasts for almost every weapon.
But your point still stands and applies for most shooters.
I think each bullet in Supreme Commander IS it's own object. I know they nearly all are individually simulated. That game is STILL hard to run at high framerates in certain "5000 unit vs 5000 unit" circumstances
I think thijsvandien meant object not in terms of simulation, but in terms of architecture: An instance of a Bullet class, instead of some sort of fancy representation optimized for SIMD.