Is DQN limited to working with only image frames?
DQNs don't only accept image frames as input. For instance, this DQN for the CartPole environment takes in a state with only 4 elements (the position and velocity of the cart and the angle and velocity of the pole.)

Images aren't necessarily more efficient representations than other options.  For instance, here is another DQN for the same CartPole environment which uses an image representation and is much less efficient.  A couple reasons people often use image representations include:


It's the only available representation for the task.
Other models  uses image representations and you want to compare.
You want to pass the network the same information available to humans.


If none of these apply, though, if you have a representation which gives you more insight into the position or trajectory of elements in the screen it's probably best to use that rather than a raw image.