# How to Incorporate two loops: One for Turn Based Gameplay, and another for ongoing actions

I'm working on a roguelike using libtcod.

So far everything works well with the turn-based functions. Essentially, when a player takes a turn, it triggers everything to advance.

What if I have an item, such as a torch, and I want to animate that cell? Whether or not the player has taken a turn, purely for aesthetics, I'd like this torch's cell to rotate between some various colors.

How would you incorporate animation like this?

• I'm not familiar with libtcod specifically so I'm not sure. That said, what you describe sounds similar to how I would do it, which would be something like a boolean advance_turn_now that gets turned on by user input and turned off once the turn actually advances. – jhocking Mar 4 '15 at 16:46