Port a Unity Game to Your Own Engine: Part 16
A concrete look into a data-oriented approach to engine development.
Bullet Runtime
Bullets need non-zero local positions to determine shot direction. Create a ringbuffer for live bullet instances. Implement enemy bullet move and spawn update functions. Like the enemy instance update, given a well-defined data layout and constraints, the update code is a straightforward process. There’s not a lot of variation in what it could be doing. Add time out to enemy update.
Next: Port a Unity Game to Your Own Engine: Part 17
Links to files below for paid subscribers.