Hi everybody, I’m new here and new to Unreal Engine.
I have watched a few tutorials and examined some of the demo games so I feel I know the basics of the engine, but I wanted to start getting my hands dirty and I wanted to start with something simple.
So I was thinking about taking the puzzle template and create a simple puzzle game like a slide puzzle of some sort.
I looked at both the BP and C++ version and I think I want to go with the c++ example, I also looked at how the memory game from the market works.
What I noticed was that the template has two actor types, the tiles and the grid, the grid is in charge of spawning the tiles and handling game logic, in our case add score.
When I opened the memory game I saw that the game logic was implemented in the GameMode blueprint, which is I guess equivalent to the GameMode class in the c++ template.
So I was wondering, where is the best place to put the game logic in a small puzzle game, in my case I need to hold 8 tiles that can be place on a 3x3 grid, one spot is empty and my game logic should determine if clicking on a tile can move it to the empty space and determine when the puzzle is completed if all the tiles are in their right place.
So what do you people suggest?
The other issue is that when spawning a tile it has a pointer to the grid, in my case I need the grid to know the tiles in order to see where they are placed and where the empty space is.
What is the best way to have this kind of dependency? keep pointers to the tiles on a two dimensional array of some sort? what is the best way to do this in UE? TArray?
I would really appreciate your help,