The difficulty in game is really intersting. I mean, the way difficulty increases. You want the player to be challenged, to give him the need to get better, to want to achieve something. If your game is an infinite runner kind of game, you can't controll difficulty with "levels" etc. But you have a lot of ways to increase that difficulty with time. Let's say you can change the "difficulty" integer variable from 0 to infinity (imagine you change speed, obstacle size etc.).
The first strategy is to not touch this variable. IIf you pick a low valuee, your game will be boring and you could play without dying for years. But with a really high value, your game will be an exciting challenge... But in the long term, your game will not be fun to play.
The second strategy is to have a linear increase of this variable. Now it's getting better. The game is interesting, but if you become a good player, each game takes too much time and you end up being frustrated.
The last strategy is to use exponential increase. Even if this will be frustrating for the beginers, it will allow you to have short dynamic and challenging games. Your game will have a "wall" for any user at some point, and it's good to allways have a wall to try to break. It give an "end" to an infinite runner type of game.
Exponential means for every x unit of time/score, the difficulty is multiplied y. For exemple, let's say that to beat a best time by 1 second, it's 1.1 times harder in a speed run of mario bros. It's seams easy... But it means that to beat a time by 1 minute, it will be 304 times harder! (A 4:50 wall seems to exist in the speed run world of super mario bros) This strategy will be exciting for purists, that's why speedrun exists, to add that kind of exponential difficulty aspect.
Pro tip: give some moment with low difficulty to let the player breathe.
Personally, I used the last strategy for my game because I want it to be playable, but I want to have short games (I want you to DIE quickly ahah). What do you think about this analysis, and how do you implement difficulty in your games? (sorry for the mistakes in my post, I'm french)