How Game Programming Helped Me in Robotics Software Development.
From virtual worlds to real-world automation.
We play games in real time; in a networked game, we interact with people around the world in real time. But when delving into the underlying code powering these games, video games can be seen as a sequence of character states evolving over time, driven by a “game update loop”. This loop operates at a high frequency, creating the illusion of continuous motion and reality. As players, we control characters within the constraints and physics defined by the game engine. Our brains perceive this simulated reality so vividly that we become deeply engaged, linking the game’s mechanics to our neural reward systems.
Game programmers construct these virtual worlds by importing characters modeled in computer-aided design (CAD) software and developing game logic based on a game design document. The central “update loop” processes each frame at a rapid rate, blending physics simulations and user inputs to animate the characters and environments. This process ensures that each frame, a snapshot of still poses influenced by physics and player actions, transitions fluidly to create an immersive gaming experience.
Efficiency is crucial in game development since the computation for each frame must occur within the limited time allowed by the update rate. Algorithms such as ray tracing for collision detection exemplify this efficiency. They are meticulously optimized to keep the frame processing time within the control loop’s update interval, ensuring smooth gameplay and real-time interactivity.
Robotics development
While video games operate in virtual environments, robots interact with the real world. Like games, robotics systems rely on an "update loop" that processes current sensor inputs, incorporates user commands (if any), and computes the appropriate motor outputs to achieve the desired behavior. These motors operate in the physical world, generating real-world motion influenced by factors like friction and noise. Despite these additional complexities, robotics algorithms share similarities with game programming, particularly in their emphasis on computational efficiency to ensure the update loop completes before the next cycle.
Similarities between game programming and robotics
Real-time systems - Both fields rely on control loops running at high speeds to influence their respective environments—virtual in the case of games and physical for robots. These loops must execute quickly and in real-time to maintain smooth, responsive motion. Achieving this demands a deep understanding of algorithms and optimization techniques to write efficient, high-performance code.
Use of physics engines - Newton’s laws of motion form the foundation for the physics engines in both domains. In video games, physics simulate realistic motion for characters and objects, creating immersive experiences. In robotics, these engines predict natural motions and help refine control strategies to reduce vibrations and enhance the smoothness of robotic movements.
Decision making with AI - When playing against computer-controlled opponents, AI techniques like machine learning guide the behavior and evolution of virtual characters. Similarly, robotics leverages AI for tasks like object detection and adaptive decision-making, enabling robots to autonomously modify their behavior based on their surroundings.
Programming languages - Both fields demand expertise in system programming languages like C or C++, which allow direct manipulation of hardware resources, including CPUs, memory, and GPUs.
Learning game programming provides strong transferable skill sets in robotics software development. The overlap in real-time processing, physics modeling, AI, and programming languages bridges the knowledge gap, especially for someone coming into robotics software development from a mechanical or aerospace engineering background.
How game programming helped me.
I began my journey as a mechanical and aerospace engineering student, working on a variety of algorithms in robot dynamics, path planning, and controls for aerial and space systems. At the time, I primarily relied on MATLAB for simulations and real-world laboratory implementations. However, I quickly realized that industry standards leaned heavily towards C++ for robotics software development.
Faced with a lack of resources tailored to robotics, I turned to game programming as a stepping stone. Game programming shares common ground with robotics, such as real-time simulations and resource-constrained environments. By taking a course in C++ game programming, I gained hands-on experience in resource-efficient coding, version control, and software development practices. This journey helped me merge my robotics expertise with essential software engineering principles, ultimately making me a better robotics software developer.
I hope this post was helpful!



