Gobstones do not appear in the Half-Blood Prince novel. They are a movie-only addition (likely inspired by Gobstopper candies) used as a visual stand-in for a wizarding game.
In the video game, they may appear as a collectible or mini-game, but they have no basis in J.K. Rowling's text.