Q: Insert into no duplicate Create Table as follows where id are AI and primary key.
id | game_id | player_id | 
I want to enter values that are not duplicates, but I cannot make player_id and game_id the primary key because player_id is constant and in game_id a player with a different game_id can come and have a game_id the same with another player.
E.g
id | game_id | player_id | 
1      14           5
2      14           6
3      17           5      
4      5            5
5      10           6
6      5            6

I design a table with game_id and id unique but, if a player come with the same game_id as one already inserted it will not be inserted.
I want to introduce players who have the same game_id but different player_id as in the example above. You cannot insert the same game_id and player_id only if game_id or player_id is different

A: You seem to be looking for a composite unique key on the player/game tuple:
CREATE TABLE mytable (
  id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
  game_id int NOT NULL,
  player_id int NOT NULL,
  UNIQUE KEY game_player (game_id,player_id)
);

With this set up in place:
insert into mytable(game_id, player_id) values(1, 1); 
-- ok
insert into mytable(game_id, player_id) values(1, 2); 
-- ok
insert into mytable(game_id, player_id) values(2, 1); 
-- ok
insert into mytable(game_id, player_id) values(1, 1);
-- Error: ER_DUP_ENTRY: Duplicate entry '1-1' for key 'game_player'

Demo on DB Fiddle
