Tag Info

Hot answers tagged

1

Rather than move your enemy every 500ms you should define how far an enemy should move in 1 second. For example, say an enemy can move 3 distance units every second. If you know the time between the last frame in milliseconds you can simply do this: (pseudo code) enemy_units_per_second = 3.0; delta_time_ms = get_elapsed_time_ms(); enemy_movement_distance = ...



Only top voted, non community-wiki answers of a minimum length are eligible