Hey guys, I’m new to game development. Anyway, I was reading stuff on how you’re supposed to completely separate game logic from rendering. So does that mean you shouldn’t use logic statements at all during the rendering portion of the code to determine whether to draw an object or not?
for example:
gameloop(){
//Update
stateTime += delta time;
movementInput();
if(player is at a certain position)
atPosition = true;
//Render
if(stateTime > 5 && atPosition)
draw(something);
else
draw(someOtherThing);
}
If so, what’s a better way of controlling which things to draw to the screen?