Port a Unity Game to Your Own Engine: Part 16
A concrete look into a data-oriented approach to engine development.
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.
Links to files below for paid subscribers.
AltDevArts is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.