Plagiarism and copyright infringement are quite different things, although they often go together. Acknowledging the source of a derivative work, making it clear what is someone else's creation and what is one's own creation, generally settles any plagiarism issue. But it only exacerbates a copyright infringement case, by making it very clear that the infringement was knowing.
If a work is clearly based on the specific details of another work, it is a derivative work. the classic derivative work is a translation. but a sequel, or a new work set in the same setting, is often found to be derivative also.
Merely using the general theme or trope of a previous work does not make a new work derivative. Not every doomed romance is derivative of Romeo and Juliet (although West Side Story is). Not every "Santa is real" story is derivative of The Miracle on 34th Street. Not every story with a superhero character is derivative of Superman
But the more of the specific details of the alleged source one uses, the more derivitivev the new work is. There have been several stories about schools for magicians besides Harry Potter. Ursula LeGuin's A Wizard of EarthSea and A College of Magics by Caroline Stevermer come to mind. But if one uses such specific details as the four houses of the school and their characteristics, the importance of wands, the hidden train, the sorting hat, spells that are cast merely by saying the name of the spell, and an aerial soccer-like game, the new work begins to look very much like a derivative of the HP books, and would need Rowling's permission.
One of the rights that a copyright holder has is to create and distribute, or to permit others to create and distribute, derivative works. In US law, this is given by 17 USC 106 "(2) to prepare derivative works based upon the copyrighted work". The Berne Convention covers this in a very limited way in Article 11, section 2, which says:
Authors of dramatic or dramatico-musical works shall enjoy, during the full term of their rights in the original works, the same rights with respect to translations thereof.
Most countries, however, grant copyright holder the right to authorize all derivative works, not just translations, although the exact extent of the right varies.
In the situation described in the question it is said that
The background, the events and the races within the story are very similar ...
That mans that many specific details will be identical or quite similar. This is probably enough to make the new work derivative in copyright law, at least in the US. If so, th4e creator of the new work would need permission from the copyright holder on the source video game. In the absence of such permission, the new work would be a copyright infringement. The holder could sue, and probably obtain damages, and an injunction against further distribution.
If only the general idea was imitated, with the specific details reworked to be notably different, the new work would quite likely not be derivative as far as copyright law is concerned.