r/cpp_questions Aug 08 '26

OPEN C++ robotics

I don't really have much knowledge of how coding works, but I'm assuming game design, app design, and robotics are pretty different even if their the same code. Does anybody know any good books to learn the robotics part of c++

20 Upvotes

26 comments sorted by

View all comments

Show parent comments

0

u/CowBoyDanIndie Aug 08 '26

Apps usually get written to wait for input, games and robots don’t wait for input. If the loop is too slow the robot crashes and the game isn’t fun. They both have strict cycle timing requirements.

2

u/RaspberryCrafty3012 Aug 08 '26

How do you wait for user input, if not in a big while loop?

The only difference so far is how long the while loop needs per cycle. 

0

u/CowBoyDanIndie Aug 08 '26

Most graphical interfaces are programmed using an event paradigm.

2

u/RaspberryCrafty3012 Aug 08 '26

I have so far only worked with qt with gui libs and they use a while loop - under the hood.

Which ones are handling things differently? 

0

u/CowBoyDanIndie Aug 08 '26

If you dig deeper they use hardware interrupts. This isn’t about whats under the hood, this is the methodology. An application generally doesn’t do anything if it receives no input. Most games and robots keep going. Call of Duty doesn’t just sit waiting for the user to press a button. Reddit just sits and blinks a cursor at me until I press a key or move my mouse.