Question about Code Layout

Is there any reason why you chose to put the DrawTextureRec after the IF/ELSE statements and not put it before them? One would think that you would want to draw the image before running logic. Thx

If we do a Draw → Logic model then the results of the logic are shown on the next frame. Whereas Logic → Draw has the results show on the same frame.

Drawing first can lead to input lag issues and/or unwanted behaviour at the start. We don’t really see these issue in the small projects we do in the course, but for larger projects it would make a difference and typically you’d want to do Logic-first as a result.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms