Can having the option of fighting an enemy or running away be a form of depth?
But more appropriately, the question generally tends to be, is having the option of fighting an enemy or running past them a form of depth?
NES games are the masters of this. Especially Castlevania 3 and Contra. Enemies in old games tend to have contact damage, they hurt you if you touch them. Then they’re set up in places where they block your way. This means that to get past them, you need to brush up against them, potentially hurting yourself.
This design style largely died when games moved to 3d, because it doesn’t make realistic/diegetic sense, because 3d games tend to be more based on animations for attacks, because it’s hard to see if stuff is touching in 3d.
In 3d games, it’s really easy to run past enemies because there’s 3 dimensions, you can go over, under, or around enemies, unless there’s tightly controlled chokes, which are a lot easier to set up in 2d than 3d, and don’t fuck with the camera. And the enemies won’t deal damage on contact anymore, so even if they’re positioned next to a choke, brushing up against them won’t hurt you, and their attacks need to have a reactable startup time, so that they’re fair, meaning you can usually run past them before they get an attack off. See: Every Dark Souls speedrun.
Desync pulled a cool trick, having its hammer wielding enemies attack immediately on moving close enough to you, very similar to contact damage (And I suggested making them pull the hammers back before reaching you so this was reactable, and a bit more obvious). Maybe we could see more stuff like this, but it doesn’t seem totally likely, except with special enemy types, in 3d action games. In most 3d action games, you have drawn out combat of exchanging melee blows, and having a borderline contact damage attack means if you brush up too close to them while attacking, then you get hit, which can suck. There were contact damage enemies in Nioh, and these kind of sucked because frequently while attacking, you extend your hurtboxes too, your hands, so reaching forward to hit them caused you to trade blows with them. A smart move would be to test contact damage enemies only against the pushbox of the character, not their regular hurtboxes, but that’s another matter.
In classic NES games, fighting enemies or running past them was a question of risk. Fighting them could eliminate them, so they won’t bother you, but put you at risk of getting hit by their attacks. Running past them would let you ignore them, so you don’t need to hit them multiple times to kill them, just instantly get past the encounter, but frequently their movement pattern made it harder to do this than to actually fight them, so you might risk more damage that way. Ideally these two aspects exist in an equilibrium.
In modern games, this tends to fall by the wayside, making it more risky to fight enemies than just run past them, like recent Ys games, where running past enemies is trivial, but they can be super deadly if fought legitimately. Dark Souls balances it decently. EXP can help incentivize fighting monsters, but that has its own issues.