In some cases, the User Experience (UX) is influenced by a UI, in that a badly designed and implemented UI is going to lead to a poor UX. Think of this like going to a supermarket looking for pickles and not having any signs to indicate where they are, so you spend valuable time going down every aisle. If you’re lucky, you won't overlook them.
In the context of games, user experience, or simply UX, is the process used to determine what the experience will be like when a user interacts with your game. UX includes user testing, generating personas (a fictional identity that reflects one of the user groups that you're designing for), scenarios, and storyboards. A good UX should consider the beginning of a player's journey from the acquisition of the game, how problems are handled, the playing of the game, and anything post-game. It's the journey...