Coconuts are actually nuts. They are seed of fruit of widespread but beach dwelling coconut palm tree. Often a falling or thrown hazards in videogames
The first video game about Coconuts was released in 1980.
They are also occasionally used as a drinking cup, food bowl, or flotation device; both in videogames and real life. They are often shown only as the nut itself without the surround husk. Even when shown on trees.