AltDevArts

AltDevArts

Share this post

AltDevArts
AltDevArts
Port a Unity Game to Your Own Engine: Part 18.1
Copy link
Facebook
Email
Notes
More

Port a Unity Game to Your Own Engine: Part 18.1

A concrete look into a data-oriented approach to engine development.

Mike Acton's avatar
Mike Acton
Dec 06, 2023
∙ Paid
6

Share this post

AltDevArts
AltDevArts
Port a Unity Game to Your Own Engine: Part 18.1
Copy link
Facebook
Email
Notes
More
2
Share

Bug fix

Quick patch to export_bin script so extra unnecessary data segments aren’t written to the file.

Build enemy_instances

Create schema for enemy_instances so binary data, c header, etc. can be built from command line.

Build enemy_instances_update

Create schema for enemy_instances_update and enemy_instances_draw. Fix up Makefile. Left at the end with a bug to fix in next part.

Byte pack structures

Binary export doesn’t do standard C structure packing so for now, add an attribute to the C header output for byte packed structures. Todo: Sort out the packing question.

Add game_state

Wrap up this clean up phase by bundling the common game variables into a game_state structure. Now everything that any system accesses needs to be fully declared in the schema file. Introduce a data rule here: A system can only write to its own data (Root, as defined in the context) - every other dependency must be read-only.

Next: Port a Unity Game to Your Own Engine: Part 19

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.

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2025 Matt Yaney
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share

Copy link
Facebook
Email
Notes
More