Creating the First Flow
Within the Lunar Frontiers engine, the simplest possible flow is the creation of a new building. A player plants a construction site on a suitable piece of the lunar surface. (Technically, the player’s robot, driven by code, does everything, but clarifying that all the time gets a bit tiresome, so the term player will be used throughout this text.) This construction site then advances its construction status on each tick of the game loop. When the construction is complete, the construction site “becomes” a usable building. The word becomes is in quotes because in most game engines (including this one) it’s easier to delete the construction site and spawn[21] the appropriate building than to transform one unit type to ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access