Should I use Actor with Actor Components Array or Pawn with Pawn Array?

Hi All!

As you would notice from my question, I’m quite a newbie in UE4 C++ programing. I am trying to make a boardgame (something like chess but without the diference between black and white tiles) as a learning project and to make the board I doubt which class should I inherit from. At first I thought that I should use a pawn with an array attribute containing each pawn cell but then I looked to actor and actor component class descriptions and started to doubt.

The cells I’m making are all the same, with the same static mesh for all and the same functionality but they are only displayed when are active (boolean attribute) and hide when they stop being active. The board would have the common functionality to get cells neighbors, paths from a cell to another and unreachable and occupied cells. I know there are good toolkits in the store and tutorials to make this with blueprints but as I am doing this to learn, I would appreciate a lot if you could help me with this question.

Thanks for your time, advices and answers :slight_smile:

A Pawn is a subclass of Actor which represents a game entity controlled by a controller (either human or machine). It doesn’t sound like your cells need to be pawns.

Ok, but then the grid should be an actor with 2d array of cell actors or an actor with an array of actor components?

There’s no very definitive answer in this case but I would choose the former because it sounds like you would have less limitations when implementing future requirements.