Based around a theme of the construction of a game engine, this textbook is for final year undergraduate and graduate students, emphasising formal methods in writing robust code quickly. This book takes an unusual, engineering-inspired approach to illuminate the creation and verification of large software systems . Where other textbooks discuss business practices through generic project management techniques or detailed rigid logic systems, this book examines the interaction between code in a physical machine and the logic applied in creating the software. These elements create an informal and rigorous study of logic, algebra, and geometry through software. Assuming prior experience with C, C++, or Java programming languages, chapters introduce UML, OCL, and Z from scratch. Extensive worked examples motivate readers to learn the languages through the technical side of software science.