Basically setting up a call back means that you tell the program to run a function or some code when a particular event happens such as the player pressing a button or when a length of time has passed.
The alternative is to poll each frame eg, (pseudocode)
if player has pressed x then
do somestuff
end
The problem is with this, you are wasting CPU cycles doing the check each frame. With a callback, the whole thing only gets triggered when the button is pressed. It also allows you to cut dependenices between classes/files/blocks of code making the project more managible especially in a team project.
Bookmarks