No, I think your components should be as generic and reusable as possible. And the examples you gave certainly don't need specific components. Here's an example of the type of components you could be thinking about:
- TransformComponent - Has as
Positionin the world. - SpriteComponent - Has a
Spriteand renders it at TransformComponent.Position - MovableComponent - Has a
Velocityand updates TransformComponent.Position - BoxComponent - Has a
Rectangleand detects collisions with other BoxComponents
Then, all of these have parameters that will vary from entity to entity.
For example, and still thinking about the ball, the SpriteComponent could keep a reference to the ball sprite, the BoxComponent could store the ball size and have a special handler for its collision event, the TransformComponent could store the ball's initial position, and the MovableComponent could store the ball's initial velocity.:
- The
TransformComponentcould store the ball's initial position - The
SpriteComponentcould keep a reference to the ball sprite - The
MovableComponentcould store the ball's initial velocity. - The
BoxComponentcould store the ball size and have a special handler for its collision event
Then your paddles might also have some of these components, but they will probably have different initial parameters for each of them, makingand this is what will make them unique and different from the ball entity. A good component for them might be an InputComponent that handles user input and updates the TransformComponent when the player presses the up or down keys.
PS: If you have never tried Unity3D, I think it's a good place to start wrapping your head around these concepts!